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

Fix to allow decrypting eyaml (PKCS7) when using JRuby. #62

Closed
wants to merge 2 commits into from

Conversation

clarenceb
Copy link

Here is a fix for Issue #61. I have tested it under JRuby 1.7.4.

Both the subject and issuer need to be set on the X509 Cert that is created for decrypting of eyaml keys to work under JRuby.

I have just used an arbitrary DN for the X509 Name ("/DC=org/DC=example/CN=eyaml"). You can change this to something else if you think it is important.

A simple way to reproduce the bug is to install MRI Ruby 1.9.3 using rbenv (or RVM) and also JRuby 1.7.4 (or later). Then encrypt some text in an .eyaml file with the PKCS7 key. When you try to decrypt the values using the eyaml or hiera command under JRuby you will see an error.

Install this patch and try again. Decrypting will succeed under JRuby. Note: You will need to create new PKCS7 keys (so that the cert contains the issuer and subject) and re-encrypt the eyaml values again.

@sihil
Copy link
Collaborator

sihil commented Feb 19, 2014

Hi @clarenceb - can you please merge in from master and re-push this branch. I've fixed the problem with the build - see discussion on #73.

Hopefully we'll get around to reviewing your pull request later this week - apologies that it has taken so long.

@sihil
Copy link
Collaborator

sihil commented Mar 3, 2014

This is definitely a bug, but I'm not sure that hardcoding an example CN is a particularly great solution. I think adding an option to override this makes more sense so I've created a new pull request as #77.

I'm closing this - reopen if #77 doesn't solve your issue.

@sihil sihil closed this Mar 3, 2014
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.

None yet

2 participants