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

Cannot create SSLConfig from a single pfx file #231

Open
sairus7 opened this issue Feb 20, 2021 · 1 comment
Open

Cannot create SSLConfig from a single pfx file #231

sairus7 opened this issue Feb 20, 2021 · 1 comment

Comments

@sairus7
Copy link

sairus7 commented Feb 20, 2021

Seems like SSLConfig only accepts .cert and .key files, but does not accept a single pfx cert file with a key in it.

@fchorney
Copy link

fchorney commented Nov 8, 2021

I came across a similar issue, and solved it by making cert and key files out of a pfx cert.

PFX="/path/to/file.pfx"
PASSWORD="PFX_PASSWORD"

openssl pkcs12 -in $PFX -nocerts -nodes -password pass:$PASSWORD -out cert-key.pem
openssl pkcs12 -in $PFX -nokeys -nodes -clcerts -password pass:$PASSWORD -out cert.pem
openssl rsa -in cert-key.pem -out key.pem

From there you can use cert.pem and key.pem to create an SSLConfig object

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

No branches or pull requests

2 participants