reload the current cert database if the certificate was added
This commit is contained in:
parent
304c8b9562
commit
ac3385124a
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue