handle untrusted root as well as self-signed

This commit is contained in:
Brendan Forster 2017-05-02 11:25:51 +10:00
parent 541efc3b93
commit e5648072dc

View file

@ -81,8 +81,9 @@ void ShowCertificateTrust(atom::NativeWindow* parent_window,
NULL, NULL,
&chain_context)) { &chain_context)) {
auto error_status = chain_context->TrustStatus.dwErrorStatus; auto error_status = chain_context->TrustStatus.dwErrorStatus;
if (error_status == CERT_TRUST_IS_SELF_SIGNED) { if (error_status == CERT_TRUST_IS_SELF_SIGNED
// this is the only scenario we're interested in supporting for now || error_status == CERT_TRUST_IS_UNTRUSTED_ROOT) {
// this is the only scenario we're interested in supporting
AddToTrustedRootStore(cert_context, cert); AddToTrustedRootStore(cert_context, cert);
} }