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

Side by Side Diff: net/cert/x509_util_openssl.cc

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 unified diff | Download patch
« no previous file with comments | « net/cert/mock_client_cert_verifier.cc ('k') | net/net.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "net/cert/x509_util_openssl.h" 5 #include "net/cert/x509_util_openssl.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <openssl/asn1.h> 8 #include <openssl/asn1.h>
9 #include <openssl/mem.h> 9 #include <openssl/mem.h>
10 10
(...skipping 17 matching lines...) Expand all
28 namespace { 28 namespace {
29 29
30 using ScopedASN1_INTEGER = 30 using ScopedASN1_INTEGER =
31 crypto::ScopedOpenSSL<ASN1_INTEGER, ASN1_INTEGER_free>; 31 crypto::ScopedOpenSSL<ASN1_INTEGER, ASN1_INTEGER_free>;
32 using ScopedASN1_OCTET_STRING = 32 using ScopedASN1_OCTET_STRING =
33 crypto::ScopedOpenSSL<ASN1_OCTET_STRING, ASN1_OCTET_STRING_free>; 33 crypto::ScopedOpenSSL<ASN1_OCTET_STRING, ASN1_OCTET_STRING_free>;
34 using ScopedASN1_STRING = crypto::ScopedOpenSSL<ASN1_STRING, ASN1_STRING_free>; 34 using ScopedASN1_STRING = crypto::ScopedOpenSSL<ASN1_STRING, ASN1_STRING_free>;
35 using ScopedASN1_TIME = crypto::ScopedOpenSSL<ASN1_TIME, ASN1_TIME_free>; 35 using ScopedASN1_TIME = crypto::ScopedOpenSSL<ASN1_TIME, ASN1_TIME_free>;
36 using ScopedX509_EXTENSION = 36 using ScopedX509_EXTENSION =
37 crypto::ScopedOpenSSL<X509_EXTENSION, X509_EXTENSION_free>; 37 crypto::ScopedOpenSSL<X509_EXTENSION, X509_EXTENSION_free>;
38 using ScopedX509_NAME = crypto::ScopedOpenSSL<X509_NAME, X509_NAME_free>;
39 38
40 const EVP_MD* ToEVP(x509_util::DigestAlgorithm alg) { 39 const EVP_MD* ToEVP(x509_util::DigestAlgorithm alg) {
41 switch (alg) { 40 switch (alg) {
42 case x509_util::DIGEST_SHA1: 41 case x509_util::DIGEST_SHA1:
43 return EVP_sha1(); 42 return EVP_sha1();
44 case x509_util::DIGEST_SHA256: 43 case x509_util::DIGEST_SHA256:
45 return EVP_sha256(); 44 return EVP_sha256();
46 } 45 }
47 return NULL; 46 return NULL;
48 } 47 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 internal_cache = new_cache.get(); 299 internal_cache = new_cache.get();
301 X509_set_ex_data(x509, x509_der_cache_index, new_cache.release()); 300 X509_set_ex_data(x509, x509_der_cache_index, new_cache.release());
302 } 301 }
303 *der_cache = base::StringPiece(internal_cache->data); 302 *der_cache = base::StringPiece(internal_cache->data);
304 return true; 303 return true;
305 } 304 }
306 305
307 } // namespace x509_util 306 } // namespace x509_util
308 307
309 } // namespace net 308 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/mock_client_cert_verifier.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698