add custom root cert pinning support #1194
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes adds support to custom trusted root certificate pinning support for HTTP Wininet library. Consumers will be able to ping root CA certificate based on certificate thumbprint and leaf and intermediate certificate can be validated based on subject metadata.
Following 6APIs are added to HttpClient_WinInet.
SetCustomRootCheck ==> SDK consumers need to set call this api to set or un set custom root certificate validation.
IsCustomRootCheckRequired ==> Return current state of custom root check validation.
AddCustomRootCertSHA256Thumbprint ==> Adds one trusted root certificate SHA256 thumbprint. Consumers can add multiple trusted root certificates.
AddCustomTrustedSubjectOrg == > Adds one trusted subject organization. This is only used to validate leaf and intermediary CA certificates. As these can rotate often consumers can leverage subject metadata based pinning.
IsTrustedSubjectOrg ==> Used internally by WinInetRequestWrapper to validate the ongoing http request certificate chain.
IsTrustedRootCert==> Used internally by WinInetRequestWrapper to validate the ongoing http request certificate chain.