question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RSA key check fails if header is -----BEGIN PRIVATE KEY-----

See original GitHub issue

Hi, I’m using Nginx Proxy Manager version 2.7.1 (latest pulled from dockerhub)

When uploading a custom SSL certificate an error occurs if the private key has the -----BEGIN PRIVATE KEY----- instead of the -----BEGIN RSA PRIVATE KEY-----

By looking at the code, the following line in certificate.js is responsible for the error let key_type = private_key.includes('-----BEGIN RSA') ? 'rsa' : 'ec'; This causes the check to fail because the key is interpreted as ec instead of rsa. I tried to manually run the openssl check command with my key and I get the expected result: RSA key ok

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

1reaction
chaptergycommented, Dec 14, 2020

Could you please check whether the issue still persists in this new pull request?
Use image jc21/nginx-proxy-manager:github-pr-774 for this. Just change the tag from :latest to :github-pr-774 in your docker-compose file.

0reactions
goncaloGITcommented, Dec 22, 2020

This image ( jc21/nginx-proxy-manager:github-pr-774 ) worked for me , thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

RSA key check fails if header is -----BEGIN PRIVATE KEY
Hi, I'm using Nginx Proxy Manager version 2.7.1 (latest pulled from dockerhub) When uploading a custom SSL certificate an error occurs if ......
Read more >
What can I do if I'm getting an RSA Private Key is invalid error ...
If you are getting an RSA Private Key is invalid error when you try adding your .key file under Server > HTTPS &...
Read more >
Differences between "BEGIN RSA PRIVATE KEY" and "BEGIN ...
For RSA keys, PKCS#1 contains CRT parameters, PKCS#8 doesn't. You can confirm this by looking at sizes. PKCS#8 is smaller even with more...
Read more >
Questions on the variations of RSA keys
If the key is encrypted (PEM form only) it will contain extra header lines to indicate the encryption and IV, e.g.: -----BEGIN RSA...
Read more >
ssh - Differences between "BEGIN RSA PRIVATE KEY" and ...
So as a result, OpenSSH created its own format for storing private keys (the one with BEGIN OPENSSH PRIVATE KEY headers), which uses...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found