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

Cannot decrypt/edit PKCS7 eyaml files using JRuby #61

Closed
clarenceb opened this issue Jan 10, 2014 · 1 comment
Closed

Cannot decrypt/edit PKCS7 eyaml files using JRuby #61

clarenceb opened this issue Jan 10, 2014 · 1 comment

Comments

@clarenceb
Copy link

It seems that JRuby is not happy with the X509 Certificate (public key) generated by the eyaml command. Therefore, you cannot use hiera-eyaml with JRuby.

eyaml wants the cert to have an "issuer" (see below):

$ bin/eyaml edit test.eyaml
[hiera-eyaml-core] !!! Empty issuer DN not allowed in X509Certificates
[hiera-eyaml-core] ["org/jruby/ext/openssl/X509Cert.java:161:in initialize'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/encryptors/pkcs7.rb:48:indecrypt'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/parser/encrypted_tokens.rb:15:in encrypted_value'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/parser/encrypted_tokens.rb:80:increate_enc_token'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/parser/encrypted_tokens.rb:110:in create_token'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/parser/parser.rb:71:inparse_scanner'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/parser/parser.rb:74:in parse_scanner'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/parser/parser.rb:36:inparse'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/subcommands/edit.rb:36:in execute'", "/Users/clarence/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/hiera-eyaml-2.0.0/lib/hiera/backend/eyaml/CLI.rb:45:inexecute'", "bin/eyaml:13:in `(root)'"]

@sihil
Copy link
Collaborator

sihil commented Mar 3, 2014

More details about this in pull request #77 but there is now a command line parameter for specifying the subject to set when creating PKCS7 keys.

@sihil sihil closed this as completed 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

No branches or pull requests

2 participants