Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: net/cert/x509_util_ios.cc

Issue 2746103003: Add X509CertificateBytes which uses CRYPTO_BUFFER instead of macOS-native certificate types. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/x509_util_ios.h ('k') | net/cert/x509_util_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_util_ios.cc
diff --git a/net/cert/x509_util_ios.cc b/net/cert/x509_util_ios.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9bf41850efa7a0aee487c7a862cc959f11989211
--- /dev/null
+++ b/net/cert/x509_util_ios.cc
@@ -0,0 +1,22 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/cert/x509_util_ios.h"
+
+#include "net/cert/x509_certificate.h"
+
+namespace net {
+
+namespace x509_util {
+
+base::ScopedCFTypeRef<SecCertificateRef>
+CreateSecCertificateFromX509Certificate(const X509Certificate* cert) {
+ return base::ScopedCFTypeRef<SecCertificateRef>(
+ reinterpret_cast<SecCertificateRef>(
+ const_cast<void*>(CFRetain(cert->os_cert_handle()))));
+}
+
+} // namespace x509_util
+
+} // namespace net
« no previous file with comments | « net/cert/x509_util_ios.h ('k') | net/cert/x509_util_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698