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

Make the password parameter optional #65

Merged
merged 9 commits into from
Feb 2, 2018
Merged

Conversation

rnelson0
Copy link
Contributor

No description provided.

Not all environments will require a password on a certificate
@rnelson0
Copy link
Contributor Author

Fixes #64

@rnelson0
Copy link
Contributor Author

I can only guarantee that this allows the user to skip providing the password. Someone who uses the module will have to try it to ensure the two powershell scripts work properly when provided with a password of "" (empty string).

@natemccurdy
Copy link
Contributor

@rnelson0 Thanks for making this!

Quick clarification, your patch will allow a password of either a String[1] or undef, not the empty string. But that should be fine.... assuming the PowerShell scripts can handle that (a quick look makes me think they can).

With your patch, this should be possible now (note the lack of a password):

sslcertificate { "Install-PFX-Certificate" :
  name       => 'mycert.pfx',
  location   => 'C:\',
  thumbprint => '07E5C1AF7F5223CB975CC29B5455642F5570798B'
}

But this will still throw an error (which is fine if the above works):

sslcertificate { "Install-PFX-Certificate" :
  name       => 'mycert.pfx',
  password   => '',
  location   => 'C:\',
  thumbprint => '07E5C1AF7F5223CB975CC29B5455642F5570798B'
}

@rnelson0
Copy link
Contributor Author

@natemccurdy I was referring to the underlying powershell script's cmdlet receiving "" in the password argument when $password = undef. To use an actual password should definitely require a non-null string.

@rnelson0 rnelson0 changed the title Rnelson0 patch 1 Make the password parameter optional Jan 29, 2018
@juniorsysadmin juniorsysadmin added the enhancement New feature or request label Feb 1, 2018
@bastelfreak bastelfreak merged commit 0ba30c4 into master Feb 2, 2018
@bastelfreak bastelfreak deleted the rnelson0-patch-1 branch February 2, 2018 09:48
@Ramesh7 Ramesh7 added the feature New Feature label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants