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

Unified Diff: net/cert/x509_util_ios.h

Issue 2864133002: Convert iOS to use X509CertificateBytes. (Closed)
Patch Set: static_cast, more unittest Created 3 years, 7 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_certificate_ios.cc ('k') | net/cert/x509_util_ios.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_util_ios.h
diff --git a/net/cert/x509_util_ios.h b/net/cert/x509_util_ios.h
index bf3473ffcab247aec098a78b67a7e7ccb0864495..cfc9827fe571a4b866a6365518927ac336bd850a 100644
--- a/net/cert/x509_util_ios.h
+++ b/net/cert/x509_util_ios.h
@@ -7,7 +7,10 @@
#include <Security/Security.h>
+#include <vector>
+
#include "base/mac/scoped_cftyperef.h"
+#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"
namespace net {
@@ -16,10 +19,22 @@ class X509Certificate;
namespace x509_util {
+// Creates a SecCertificate handle from the DER-encoded representation.
+// Returns NULL on failure.
+NET_EXPORT base::ScopedCFTypeRef<SecCertificateRef>
+CreateSecCertificateFromBytes(const uint8_t* data, size_t length);
+
// Returns a SecCertificate representing |cert|, or NULL on failure.
NET_EXPORT base::ScopedCFTypeRef<SecCertificateRef>
CreateSecCertificateFromX509Certificate(const X509Certificate* cert);
+// Creates an X509Certificate representing |sec_cert| with intermediates
+// |sec_chain|.
+NET_EXPORT scoped_refptr<X509Certificate>
+CreateX509CertificateFromSecCertificate(
+ SecCertificateRef sec_cert,
+ const std::vector<SecCertificateRef>& sec_chain);
+
} // namespace x509_util
} // namespace net
« no previous file with comments | « net/cert/x509_certificate_ios.cc ('k') | net/cert/x509_util_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698