[GH-ISSUE #315] [feature request] support loading encrypted private keys #201

Closed
opened 2026-02-25 22:32:51 +03:00 by kerem · 2 comments
Owner

Originally created by @lopezator on GitHub (Nov 27, 2020).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/315

I'm not only using mkcert to generate & load certificates but also to load certificates from 3rd parties.

When trying to load one that has encription I get this error:

ERROR: failed to parse the CA key: asn1: structure error: length too larg

Is related with this issue?

https://github.com/golang/go/issues/18692

I'm not into certificates, crypto, etc.. so sorry if this is a silly request/issue.

Thank you for this awesome tool @FiloSottile !

Originally created by @lopezator on GitHub (Nov 27, 2020). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/315 I'm not only using mkcert to generate & load certificates but also to load certificates from 3rd parties. When trying to load one that has encription I get this error: > ERROR: failed to parse the CA key: asn1: structure error: length too larg Is related with this issue? https://github.com/golang/go/issues/18692 I'm not into certificates, crypto, etc.. so sorry if this is a silly request/issue. Thank you for this awesome tool @FiloSottile !
kerem closed this issue 2026-02-25 22:32:51 +03:00
Author
Owner

@FiloSottile commented on GitHub (Nov 27, 2020):

Hi! Replacing the mkcert CA is not really supported. I am glad it works for you, but it's not something we'll introduce extra complexity to make work in more cases. mkcert generates those files, and expects them to look like the files it generates. In your case, you might be able to make it work by decrypting the key with openssl in advance, but no promises!

<!-- gh-comment-id:734839284 --> @FiloSottile commented on GitHub (Nov 27, 2020): Hi! Replacing the mkcert CA is not really supported. I am glad it works for you, but it's not something we'll introduce extra complexity to make work in more cases. mkcert generates those files, and expects them to look like the files it generates. In your case, you might be able to make it work by decrypting the key with openssl in advance, but no promises!
Author
Owner

@lopezator commented on GitHub (Nov 27, 2020):

Thanks for your response @FiloSottile !!

I completely understand.

Best.

<!-- gh-comment-id:734843705 --> @lopezator commented on GitHub (Nov 27, 2020): Thanks for your response @FiloSottile !! I completely understand. Best.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#201
No description provided.