repository: allow DSA and ECDSA keys

There are tests for RSA and DSA keys, but I couldn't find out how to generate ECDSA keys on the fly, but I tested that API manually.

Close travis-ci/travis-ci#2720.