Closed abremora closed 2 years ago
Thanks for your contribution. The pull request introduces several types to the code base, including a duplicate approach for PEM decoding.
I'm going to pick individual bits from the pull request as it makes sense to revise our certificate and private key support for PEM and DER encoding. It also makes sense to include elliptic curve support.
I am happy to support you. Please do not hesitate to contact me if you need further assistance.
Thank you for your contribution. That's merged and polished now.
Support for PEM encoded certificates added. Although there is a parser for PEM files already available (see
PemObject
), I introduced a new one calledPemReader
. This implementation has no dependencies to RSA. This seems to be reasonable because there are more algorithms available. Further I looked for a solution to add easily more private key implementations. The result was aPrivateKeyFactory
which holds a list of private key strategies (RsaPrivateKeyStrategy
,EcPrivateKeyStrategy
).RsaPrivateKeyStrategy
is just a wrapper forKeystoreUtil.getRSAPrivateKeySpec()
. To prove the concept, I quickly develop aEcPrivateKeyStrategy
. That's why the support for EC is already present here. If you like to split these two features into separate PRs just give me a note.Fixes gh-678 Fixes gh-683