mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
reload the current cert database if the certificate was added
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "net/cert/cert_database.h"
|
||||
|
||||
namespace certificate_trust {
|
||||
|
||||
@@ -35,6 +36,13 @@ void ShowCertificateTrust(atom::NativeWindow* parent_window,
|
||||
CERT_STORE_ADD_REPLACE_EXISTING,
|
||||
NULL);
|
||||
|
||||
if (result) {
|
||||
auto cert_db = net::CertDatabase::GetInstance();
|
||||
// Force Chromium to reload the certificate since it might be trusted
|
||||
// now.
|
||||
cert_db->NotifyObserversCertDBChanged(cert.get());
|
||||
}
|
||||
|
||||
CertCloseStore(hCertStore, CERT_CLOSE_STORE_FORCE_FLAG);
|
||||
|
||||
CertFreeCertificateContext(pCertContext);
|
||||
|
||||
Reference in New Issue
Block a user