Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Encryption algorithms other than RSA #554

Open
dxxvi opened this issue Dec 21, 2016 · 2 comments
Open

Encryption algorithms other than RSA #554

dxxvi opened this issue Dec 21, 2016 · 2 comments
Labels
enhancement help wanted pinned exempt from being marked as stale

Comments

@dxxvi
Copy link

dxxvi commented Dec 21, 2016

Description

My docker registry gives me a key encrypted with the ECDSA algoritm. At least, that's what I think when I read the key.pem

PEMParser pemParser = new PEMParser(new BufferedReader(new FileReader("key.pem")));
Object object = pemParser.readObject();
JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC");
if (object instanceof PEMKeyPair) {
  PEMKeyPair pair = (PEMKeyPair) object;
  converter.getPrivateKey(pair.getPrivateKeyInfo()).getAlgorithm()
}

Then DockerCertificates throws exception maybe because of line 97.

How to reproduce

Don't know. If your docker registry gives you ECDSA-encrypted key, then you can try.

What do you expect

Maybe bouncycastle can be used to find the encryption algorithm.

What happened instead

exception java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: Invalid RSA private key: Version must be 0
[Describe the actual results]

Software:

docker-maven-plugin:0.4.13

Full backtrace

[Paste full backtrace here]
@stale
Copy link

stale bot commented Sep 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 24, 2018
@davidxia davidxia added enhancement help wanted pinned exempt from being marked as stale and removed stale labels Sep 25, 2018
@dmandalidis
Copy link
Contributor

Hi @dxxvi ,

Since this project went on mature status, please re-open this issue (if it still stands) to https://github.com/dmandalidis/docker-client. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement help wanted pinned exempt from being marked as stale
Projects
None yet
Development

No branches or pull requests

3 participants