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

No password on openssl::export::pkcs12 not working as expected #81

Closed
edestecd opened this issue Jan 8, 2017 · 6 comments
Closed

No password on openssl::export::pkcs12 not working as expected #81

edestecd opened this issue Jan 8, 2017 · 6 comments
Labels

Comments

@edestecd
Copy link
Contributor

edestecd commented Jan 8, 2017

The default of false for out_pass does not work.

Per this, you need to specify a blank password to get no password.
This is our experience as well.
http://stackoverflow.com/questions/27497723/export-a-pkcs12-file-without-an-export-password

A current workaround is to set

out_pass => ''

However this is not a permanent solution and the default should really work.

I think this code should fix it:

      $passout_opt = $out_pass ? {
        false   => '-passout pass:',
        default => "-passout pass:${out_pass}",
      }
@edestecd
Copy link
Contributor Author

edestecd commented Jan 8, 2017

Another option is to change the default to undef:

define openssl::export::pkcs12(
  $basedir,
  $pkey,
  $cert,
  $ensure    = present,
  $chaincert = false,
  $in_pass   = false,
  $out_pass  = undef,
) {

@edestecd
Copy link
Contributor Author

edestecd commented Jan 8, 2017

Let me know your opinion and I'll gladly make a PR.

@raphink
Copy link
Member

raphink commented Jan 10, 2017

I think a PR for that would be fine. @cjeanneret do you see any issue with that?

@raphink
Copy link
Member

raphink commented Sep 18, 2017

Imo, the undef option would be better.

@raphink
Copy link
Member

raphink commented Oct 19, 2018

Any interest in providing a PR for this still?

@stale
Copy link

stale bot commented Apr 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 19, 2021
@stale stale bot closed this as completed Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants