mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
No password for custom certificate #407
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arihantjain0894 on GitHub (Feb 28, 2022).
Hi,
I have a scenario where my custom certificate has no password. I am not able to use it, i guess because of the below code.
Any suggestion?
@StefH commented on GitHub (Feb 28, 2022):
Hi @arihantjain0894,
Good point.
I think that a simple solution would be to change it to:
But also I need to add some logic to detect empty pwd.
Which means that if you provide an empty string
""as X509CertificatePassword, thisIsDefinedwill returntrue.OR
I could remove the check for X509CertificatePassword here, But also I need to add some logic to detect empty pwd.
@StefH commented on GitHub (Feb 28, 2022):
@arihantjain0894
Can you try preview version
1.4.36-ci-15933? (https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions)@StefH commented on GitHub (Feb 28, 2022):
@arihantjain0894
Does the preview version work correct for you?
@arihantjain0894 commented on GitHub (Mar 1, 2022):
@StefH , thanks for the fix. Its working.
Should we remove entire "!string.IsNullOrEmpty(X509CertificatePassword)" or change the X509CertificatePassword != null as suggested earlier?
7f57d0ddbe@StefH commented on GitHub (Mar 1, 2022):
The exception will be like:
"X509StoreName and X509StoreLocation OR X509CertificateFilePath are mandatory. Note that X509CertificatePassword is optional.I think this fine?
@arihantjain0894 commented on GitHub (Mar 1, 2022):
My initial thought was to let "X509CertificatePassword" still be mandatory, but including string.Empty as one of the valid password. If we are making Password as optional altogether then we are good.
@StefH commented on GitHub (Mar 1, 2022):
OK
A new version will be released tomorrow.
@StefH commented on GitHub (Mar 1, 2022):
https://github.com/WireMock-Net/WireMock.Net/pull/732