-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add Password parameter to Get-PfxCertificate cmdlet #6113
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
Changes from all commits
15bf04e
b02f60c
b3955f5
6312afd
8592a2e
64bd54a
415b92e
f46750f
17c1c41
fd5d9f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,21 @@ OksttXT1kXf+aez9EzDlsgQU4ck78h0WTy01zHLwSKNWK4wFFQM= | |
| return $certLocation | ||
| } | ||
|
|
||
| Function New-ProtectedCertificate | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do have 2 password protected PFX in the project already
Maybe they could just be copied to the test drive or accessed directly?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, but is it good to rely on WebListener's location and certs? If WebListener change in future you'll have to find what it'll break in rather unusual places like this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While that seems like a logical point.. that change would break the tests here and we would know about it. it's not like moving the certs would leave this tests here passing. Yes, we would have to update the tests at that time. But WebListener is a part of the test suite so we might as well reuse what we can form it. There is an open issue for consolidating all certs for all tests anyway as they exists in far to many places. My comment is an attempt to keep the complexity of certs in our tests at the current level without increasing it further.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that we should try to have the test certs used commonly rather than having different ones. However, I would be fine having an issue open to refactor this as a separate PR. |
||
| { | ||
| <# | ||
| .SYNOPSIS | ||
| Return existing password-protected pfx certificate | ||
|
|
||
| .NOTES | ||
| Password: "password" | ||
| #> | ||
|
|
||
| $certLocation = ".\test\tools\Modules\WebListener\ServerCert.pfx" | ||
|
|
||
| return $certLocation | ||
| } | ||
|
|
||
| Function New-BadCertificate | ||
| { | ||
| $codeSigningCert = " | ||
|
|
@@ -164,4 +179,4 @@ function Remove-TestCertificates | |
| else { | ||
| throw 'Not supported on non-windows platforms' | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not change the behavior to prompt using the Host.UI when a password is not supplied.