Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1298: Handle only private key info from PEM #1299

Conversation

tazmaniax
Copy link
Collaborator

@tazmaniax tazmaniax commented Mar 10, 2019

Task-Url: #1298

Pull Request Checklist

Helpful things

Fixes

Fixes #1298

Purpose

It appears some PEM's only contain a private key and not a pair containing the private and public key as is the case with LetsEncrypt so added an additional test to check if just the private key was provided. Also updated BouncyCastle version to v1.61 and unified the logic to first retrieve the private key info from all of the various PEM formats and then retrieve the private key from the private key info. I tested this locally with a self certified certificate that is processed as a PEMKeyPair and LetsEncrypt certificate that is processed as a PrivateKeyInfo. Finally, now an exception is thrown if there is an unrecognised PEM format for retrieving the private key.

@tazmaniax tazmaniax changed the title #1298: Handle ASN1 private key info from PEM #1298: Handle only private key info from PEM Mar 11, 2019
@xael-fry xael-fry added this to the 1.5.3 milestone Apr 8, 2019
@xael-fry xael-fry merged commit ea7661a into playframework:master Apr 8, 2019
@xael-fry
Copy link
Member

xael-fry commented Apr 8, 2019

Merged and pushed in master
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SslHttpServerContextFactory does not support private key only PEM content
2 participants