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

tls: failed to parse private key #64

Closed
kahwooi opened this issue Aug 1, 2017 · 7 comments
Closed

tls: failed to parse private key #64

kahwooi opened this issue Aug 1, 2017 · 7 comments

Comments

@kahwooi
Copy link

kahwooi commented Aug 1, 2017

I bought an SSL, key is one I generate using openssl, and crt is downloaded from CA:

I generated using a password.

certificate-file = "mm_hhprint_com.crt"
private-key-file = "mm.hhprint.com.key"

but I got this:

level=error msg="failed to start server: tls: failed to parse private key" pid=14328

Am I missing out something?

@kahwooi
Copy link
Author

kahwooi commented Aug 1, 2017

Solve it by removing key password:

openssl rsa -in key.pem -out key.unencrypted.pem -passin pass:TYPE_YOUR_PASS

@kahwooi kahwooi closed this as completed Aug 1, 2017
@safeerk
Copy link

safeerk commented Apr 4, 2018

HI , Got something similiar liek this for me
I have purchased the certificate - I installed it on my machine - I put the crt & key file on the federation root folder - But when i run the federation server its poping me error.

Regards
S

@bartekn
Copy link
Contributor

bartekn commented Apr 4, 2018

@safeerk there are many possible reasons, one of them is password (check @kahwooi message). Please search tls: failed to parse private key on Google, we are using standard Golang libraries and you will certainly find an answer. If not, please ask on our Stack Exchange.

@safeerk
Copy link

safeerk commented Apr 16, 2018

Thanks i figured out the issue - SSL was succesfully configured. (Private key error)

Right now my federation URL works based on SSL
But https://necpaymentsuat.com:8002/federation?q=safeer_kk%2Anecpaymentsuat.com&type=name

But on federation application am getting bad certificate error?? Screenshot below
image

@ghost
Copy link

ghost commented Apr 23, 2019

openssl rsa -in client.key -out key.unencrypted.pem this worked for me.

@coregiu
Copy link

coregiu commented Sep 2, 2020

But it's not safety to save unenrcrypted private key on disk. Any other way? @alwayscodemonkey

@somnusx
Copy link

somnusx commented Dec 25, 2020

对我也有用

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

5 participants