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

Unified Diff: net/ssl/scoped_openssl_types.h

Issue 1474983003: Support for client certs in ssl_server_socket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 4 years, 10 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/ssl/openssl_ssl_util.cc ('k') | net/ssl/ssl_cert_request_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/scoped_openssl_types.h
diff --git a/net/ssl/scoped_openssl_types.h b/net/ssl/scoped_openssl_types.h
index a8c3c345975336f7781ef1222c6e6034d0319fea..92ce7d760ae6402f3716afc803b43ef4d90cd533 100644
--- a/net/ssl/scoped_openssl_types.h
+++ b/net/ssl/scoped_openssl_types.h
@@ -6,18 +6,31 @@
#define NET_SSL_SCOPED_OPENSSL_TYPES_H_
#include <openssl/ssl.h>
+#include <openssl/stack.h>
#include <openssl/x509.h>
#include "crypto/scoped_openssl_types.h"
namespace net {
+inline void FreeX509Stack(STACK_OF(X509)* ptr) {
+ sk_X509_pop_free(ptr, X509_free);
+}
+
+inline void FreeX509NameStack(STACK_OF(X509_NAME)* ptr) {
+ sk_X509_NAME_pop_free(ptr, X509_NAME_free);
+}
+
using ScopedPKCS8_PRIV_KEY_INFO =
crypto::ScopedOpenSSL<PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_free>;
using ScopedSSL = crypto::ScopedOpenSSL<SSL, SSL_free>;
using ScopedSSL_CTX = crypto::ScopedOpenSSL<SSL_CTX, SSL_CTX_free>;
using ScopedSSL_SESSION = crypto::ScopedOpenSSL<SSL_SESSION, SSL_SESSION_free>;
using ScopedX509 = crypto::ScopedOpenSSL<X509, X509_free>;
+using ScopedX509_NAME = crypto::ScopedOpenSSL<X509_NAME, X509_NAME_free>;
+using ScopedX509Stack = crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>;
+using ScopedX509NameStack =
+ crypto::ScopedOpenSSL<STACK_OF(X509_NAME), FreeX509NameStack>;
} // namespace net
« no previous file with comments | « net/ssl/openssl_ssl_util.cc ('k') | net/ssl/ssl_cert_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698