coding style fixes

This commit is contained in:
Brendan Forster 2017-04-21 12:17:01 +10:00
parent 5f1bcd2d16
commit b3baf9976f

View file

@ -13,17 +13,25 @@ void ShowCertificateTrust(atom::NativeWindow* parent_window,
const scoped_refptr<net::X509Certificate>& cert,
const std::string& message,
const ShowTrustCallback& callback) {
BOOL result = false;
HCERTSTORE hCertStore = NULL;
PCCERT_CONTEXT pCertContext = cert->CreateOSCertChainForCert();
// opening the Trusted Root Certificate store for the current user
hCertStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, NULL, CERT_SYSTEM_STORE_CURRENT_USER, L"Root");
hCertStore = CertOpenStore(
CERT_STORE_PROV_SYSTEM,
0,
NULL,
CERT_SYSTEM_STORE_CURRENT_USER,
L"Root");
// NOTE: this is a blocking call which displays a prompt to the user to
// confirm they trust this certificate
result = CertAddCertificateContextToStore(hCertStore, pCertContext, CERT_STORE_ADD_REPLACE_EXISTING, NULL);
result = CertAddCertificateContextToStore(
hCertStore,
pCertContext,
CERT_STORE_ADD_REPLACE_EXISTING,
NULL);
// close certificate store
CertCloseStore(hCertStore, CERT_CLOSE_STORE_FORCE_FLAG);