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 #13

Open
dmouse opened this issue Oct 11, 2019 · 3 comments
Open

tls: failed to parse private key #13

dmouse opened this issue Oct 11, 2019 · 3 comments
Labels
enhancement New feature or request hacktoberfest

Comments

@dmouse
Copy link

dmouse commented Oct 11, 2019

After to clone and go build I ran:

mkdir tls
openssl req -x509 -newkey rsa:4096 -keyout tls/key.pem -out tls/cert.pem -days 365
In this command I added the PEM pass phrase

$ docker run -it -v (pwd)/:/app golang:1.13 bash
root@9e73b18f1a60:/app# go build
root@9e73b18f1a60:/app# UPSTREAM='http://172.18.0.2' ADDR=':3000' KEY_FILE='tls/key.pem' CERT_FILE='tls/cert.pem' ./vulcain
INFO[0000] Vulcain started                               addr=":3000" protocol=https
FATA[0000] tls: failed to parse private key

I think is because vulcain does not know the phrase key

@dunglas
Copy link
Owner

dunglas commented Oct 12, 2019

Yes passphrases aren't supported yet!

@dunglas dunglas added enhancement New feature or request hacktoberfest labels Oct 12, 2019
@laurent35240
Copy link

Hi,

I found one post about this issue
https://medium.com/@prateeknischal25/using-encrypted-private-keys-with-golang-server-379919955854

If I have time I will try to backport their solution in vulcain.

Laurent

@saurabhgupta11
Copy link

saurabhgupta11 commented Jul 15, 2020

Hi,

if you are making self signed certificates for a demo project, then you can use -nodes option while making CA certificate
then it won't throw error:

1. generate CA's private key and self-signed certificate

openssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout ca-key.pem -out ca-cert.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants