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

Side by Side Diff: chrome/common/net/x509_certificate_model.h

Issue 6793026: Initial support for HSTS certificate locking. This isn't a finished work, but (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ 5 #ifndef CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_
6 #define CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ 6 #define CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "net/base/cert_database.h" 9 #include "net/base/cert_database.h"
10 #include "net/base/cert_type.h" 10 #include "net/base/cert_type.h"
11 #include "net/base/x509_certificate.h" 11 #include "net/base/x509_certificate.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Hash a certificate using the given algorithm, return the result as a 93 // Hash a certificate using the given algorithm, return the result as a
94 // colon-seperated hex string. 94 // colon-seperated hex string.
95 std::string HashCertSHA256(net::X509Certificate::OSCertHandle cert_handle); 95 std::string HashCertSHA256(net::X509Certificate::OSCertHandle cert_handle);
96 std::string HashCertSHA1(net::X509Certificate::OSCertHandle cert_handle); 96 std::string HashCertSHA1(net::X509Certificate::OSCertHandle cert_handle);
97 97
98 // For host values, if they contain IDN Punycode-encoded A-labels, this will 98 // For host values, if they contain IDN Punycode-encoded A-labels, this will
99 // return a string suitable for display that contains both the original and the 99 // return a string suitable for display that contains both the original and the
100 // decoded U-label form. Otherwise, the string will be returned as is. 100 // decoded U-label form. Otherwise, the string will be returned as is.
101 std::string ProcessIDN(const std::string& input); 101 std::string ProcessIDN(const std::string& input);
102 102
103 void GetCertChainFromCert(net::X509Certificate::OSCertHandle cert_handle,
104 net::X509Certificate::OSCertHandles* cert_handles);
105 void DestroyCertChain(net::X509Certificate::OSCertHandles* cert_handles);
106
107 std::string GetDerString(net::X509Certificate::OSCertHandle cert_handle); 103 std::string GetDerString(net::X509Certificate::OSCertHandle cert_handle);
108 std::string GetCMSString(const net::X509Certificate::OSCertHandles& cert_chain, 104 std::string GetCMSString(const net::X509Certificate::OSCertHandles& cert_chain,
109 size_t start, size_t end); 105 size_t start, size_t end);
110 106
111 std::string ProcessSecAlgorithmSignature( 107 std::string ProcessSecAlgorithmSignature(
112 net::X509Certificate::OSCertHandle cert_handle); 108 net::X509Certificate::OSCertHandle cert_handle);
113 std::string ProcessSecAlgorithmSubjectPublicKey( 109 std::string ProcessSecAlgorithmSubjectPublicKey(
114 net::X509Certificate::OSCertHandle cert_handle); 110 net::X509Certificate::OSCertHandle cert_handle);
115 std::string ProcessSecAlgorithmSignatureWrap( 111 std::string ProcessSecAlgorithmSignatureWrap(
116 net::X509Certificate::OSCertHandle cert_handle); 112 net::X509Certificate::OSCertHandle cert_handle);
(...skipping 20 matching lines...) Expand all
137 #if defined(USE_NSS) 133 #if defined(USE_NSS)
138 // Format a buffer as a space separated string, with 16 bytes on each line. 134 // Format a buffer as a space separated string, with 16 bytes on each line.
139 // |data_length| is the length in bits. 135 // |data_length| is the length in bits.
140 std::string ProcessRawBits(const unsigned char* data, 136 std::string ProcessRawBits(const unsigned char* data,
141 size_t data_length); 137 size_t data_length);
142 #endif // USE_NSS 138 #endif // USE_NSS
143 139
144 } // namespace x509_certificate_model 140 } // namespace x509_certificate_model
145 141
146 #endif // CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ 142 #endif // CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698