TomPoulton/hiera-eyaml — pull request #62 by clarenceb (2014-01-10 04:24:13+00:00)
Title: Fix to allow decrypting eyaml (PKCS7) when using JRuby.

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.