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

Side by Side Diff: net/base/x509_openssl_util.h

Issue 6612013: Add X509Certificate::VerifyCertName(string) API. This will be used... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « net/base/x509_certificate_unittest.cc ('k') | net/base/x509_openssl_util.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BASE_X509_OPENSSL_UTIL_H_ 5 #ifndef NET_BASE_X509_OPENSSL_UTIL_H_
6 #define NET_BASE_X509_OPENSSL_UTIL_H_ 6 #define NET_BASE_X509_OPENSSL_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <openssl/asn1.h> 9 #include <openssl/asn1.h>
10 #include <openssl/x509v3.h> 10 #include <openssl/x509v3.h>
(...skipping 15 matching lines...) Expand all
26 int index, 26 int index,
27 std::string* key, 27 std::string* key,
28 std::string* value); 28 std::string* value);
29 29
30 bool ParsePrincipalValueByIndex(X509_NAME* name, int index, std::string* value); 30 bool ParsePrincipalValueByIndex(X509_NAME* name, int index, std::string* value);
31 31
32 bool ParsePrincipalValueByNID(X509_NAME* name, int nid, std::string* value); 32 bool ParsePrincipalValueByNID(X509_NAME* name, int nid, std::string* value);
33 33
34 bool ParseDate(ASN1_TIME* x509_time, base::Time* time); 34 bool ParseDate(ASN1_TIME* x509_time, base::Time* time);
35 35
36 // Verifies that |hostname| matches one of the names in |cert_names|, based on
37 // TLS name matching rules, specifically following http://tools.ietf.org/html/dr aft-saintandre-tls-server-id-check-09#section-4.4.3
38 // The members of |cert_names| must have been extracted from the Subject CN or
39 // SAN fields of a certificate.
40 bool VerifyHostname(const std::string& hostname,
41 const std::vector<std::string>& cert_names);
42
43 } // namespace x509_openssl_util 36 } // namespace x509_openssl_util
44 37
45 } // namespace net 38 } // namespace net
46 39
47 #endif // NET_BASE_X509_OPENSSL_UTIL_H_ 40 #endif // NET_BASE_X509_OPENSSL_UTIL_H_
OLDNEW
« no previous file with comments | « net/base/x509_certificate_unittest.cc ('k') | net/base/x509_openssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698