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

Side by Side Diff: net/ssl/scoped_openssl_types.h

Issue 1742873002: Switch //net to the new SPKI and PKCS#8 APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spki-crypto
Patch Set: tweak keygen_handler_openssl.cc Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/cert/jwk_serializer_openssl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SSL_SCOPED_OPENSSL_TYPES_H_ 5 #ifndef NET_SSL_SCOPED_OPENSSL_TYPES_H_
6 #define NET_SSL_SCOPED_OPENSSL_TYPES_H_ 6 #define NET_SSL_SCOPED_OPENSSL_TYPES_H_
7 7
8 #include <openssl/ssl.h> 8 #include <openssl/ssl.h>
9 #include <openssl/stack.h> 9 #include <openssl/stack.h>
10 #include <openssl/x509.h> 10 #include <openssl/x509.h>
11 11
12 #include "crypto/scoped_openssl_types.h" 12 #include "crypto/scoped_openssl_types.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 inline void FreeX509Stack(STACK_OF(X509)* ptr) { 16 inline void FreeX509Stack(STACK_OF(X509)* ptr) {
17 sk_X509_pop_free(ptr, X509_free); 17 sk_X509_pop_free(ptr, X509_free);
18 } 18 }
19 19
20 inline void FreeX509NameStack(STACK_OF(X509_NAME)* ptr) { 20 inline void FreeX509NameStack(STACK_OF(X509_NAME)* ptr) {
21 sk_X509_NAME_pop_free(ptr, X509_NAME_free); 21 sk_X509_NAME_pop_free(ptr, X509_NAME_free);
22 } 22 }
23 23
24 using ScopedPKCS8_PRIV_KEY_INFO =
25 crypto::ScopedOpenSSL<PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_free>;
26 using ScopedSSL = crypto::ScopedOpenSSL<SSL, SSL_free>; 24 using ScopedSSL = crypto::ScopedOpenSSL<SSL, SSL_free>;
27 using ScopedSSL_CTX = crypto::ScopedOpenSSL<SSL_CTX, SSL_CTX_free>; 25 using ScopedSSL_CTX = crypto::ScopedOpenSSL<SSL_CTX, SSL_CTX_free>;
28 using ScopedSSL_SESSION = crypto::ScopedOpenSSL<SSL_SESSION, SSL_SESSION_free>; 26 using ScopedSSL_SESSION = crypto::ScopedOpenSSL<SSL_SESSION, SSL_SESSION_free>;
29 using ScopedX509 = crypto::ScopedOpenSSL<X509, X509_free>; 27 using ScopedX509 = crypto::ScopedOpenSSL<X509, X509_free>;
30 using ScopedX509_NAME = crypto::ScopedOpenSSL<X509_NAME, X509_NAME_free>; 28 using ScopedX509_NAME = crypto::ScopedOpenSSL<X509_NAME, X509_NAME_free>;
31 using ScopedX509Stack = crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>; 29 using ScopedX509Stack = crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>;
32 using ScopedX509NameStack = 30 using ScopedX509NameStack =
33 crypto::ScopedOpenSSL<STACK_OF(X509_NAME), FreeX509NameStack>; 31 crypto::ScopedOpenSSL<STACK_OF(X509_NAME), FreeX509NameStack>;
34 32
35 } // namespace net 33 } // namespace net
36 34
37 #endif // NET_SSL_SCOPED_OPENSSL_TYPES_H_ 35 #endif // NET_SSL_SCOPED_OPENSSL_TYPES_H_
OLDNEW
« no previous file with comments | « net/cert/jwk_serializer_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698