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

Creating a CSR for an encrypted key #49

Merged
merged 3 commits into from
Feb 27, 2015

Conversation

DullReferenceException
Copy link
Contributor

Added the ability to specify the password for a private key when creating a CSR.

Added the ability to specify the password for a private key when creating a CSR.
@DullReferenceException DullReferenceException mentioned this pull request Feb 25, 2015
@Dexus
Copy link
Owner

Dexus commented Feb 25, 2015

Hi @DullReferenceException

please use for all passwords the file:tmp_passwd_file.xxx instand pass:my!secure"password
and create the file with the password as content

@DullReferenceException
Copy link
Contributor Author

Very good point. I'll work on that.

@DullReferenceException
Copy link
Contributor Author

Strangely, I can't get openssl to break with any input. Seems like spawn is doing all the right things when it comes to escaping the argument. Here's a sample of what I've tried:

var password = 'my:secure! "password';

@Dexus
Copy link
Owner

Dexus commented Feb 25, 2015

Okay, i will try it tomorrow again, perhaps i have make a misstake.

@DullReferenceException
Copy link
Contributor Author

I finally broke it by having an \n in the password. Will try using the temporary file to pass the password and see if the tests pass.

When generating a CSR, changed to using a temporary file for passing the password parameter; this avoids command line escaping issues.
@DullReferenceException
Copy link
Contributor Author

@Dexus: fixed to write to the temporary file using the same pattern as when generating an encrypted private key.

@Dexus
Copy link
Owner

Dexus commented Feb 26, 2015

@DullReferenceException you need to unlink the tempfile see my commend

@DullReferenceException
Copy link
Contributor Author

Fixed, @Dexus.

Dexus added a commit that referenced this pull request Feb 27, 2015
@Dexus Dexus merged commit 2d9ee29 into Dexus:master Feb 27, 2015
@DullReferenceException DullReferenceException deleted the csr-with-password branch April 8, 2015 15:27
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

Successfully merging this pull request may close these issues.

3 participants