Add X509CertificateBytes which uses CRYPTO_BUFFER instead of macOS-native certificate types.
https://codereview.chromium.org/2746103003
This commit is contained in:
parent
3d700ee49f
commit
49fbb52b01
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include "atom/browser/native_window.h"
|
#include "atom/browser/native_window.h"
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "net/cert/cert_database.h"
|
#include "net/cert/cert_database.h"
|
||||||
|
#include "net/cert/x509_util_mac.h"
|
||||||
|
|
||||||
@interface TrustDelegate : NSObject {
|
@interface TrustDelegate : NSObject {
|
||||||
@private
|
@private
|
||||||
|
@ -85,7 +86,8 @@ void ShowCertificateTrust(atom::NativeWindow* parent_window,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const ShowTrustCallback& callback) {
|
const ShowTrustCallback& callback) {
|
||||||
auto sec_policy = SecPolicyCreateBasicX509();
|
auto sec_policy = SecPolicyCreateBasicX509();
|
||||||
auto cert_chain = cert->CreateOSCertChainForCert();
|
auto cert_chain =
|
||||||
|
net::x509_util::CreateSecCertificateArrayForX509Certificate(cert.get());
|
||||||
SecTrustRef trust = nullptr;
|
SecTrustRef trust = nullptr;
|
||||||
SecTrustCreateWithCertificates(cert_chain, sec_policy, &trust);
|
SecTrustCreateWithCertificates(cert_chain, sec_policy, &trust);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue