OLD | NEW |
1 // Copyright (c) 2011 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 | 7 |
8 #include "net/cert/cert_type.h" | 8 #include "net/cert/cert_type.h" |
9 #include "net/cert/x509_certificate.h" | 9 #include "net/cert/x509_certificate.h" |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // Hash a certificate using the given algorithm, return the result as a | 79 // Hash a certificate using the given algorithm, return the result as a |
80 // colon-seperated hex string. | 80 // colon-seperated hex string. |
81 std::string HashCertSHA256(net::X509Certificate::OSCertHandle cert_handle); | 81 std::string HashCertSHA256(net::X509Certificate::OSCertHandle cert_handle); |
82 std::string HashCertSHA1(net::X509Certificate::OSCertHandle cert_handle); | 82 std::string HashCertSHA1(net::X509Certificate::OSCertHandle cert_handle); |
83 | 83 |
84 // For host values, if they contain IDN Punycode-encoded A-labels, this will | 84 // For host values, if they contain IDN Punycode-encoded A-labels, this will |
85 // return a string suitable for display that contains both the original and the | 85 // return a string suitable for display that contains both the original and the |
86 // decoded U-label form. Otherwise, the string will be returned as is. | 86 // decoded U-label form. Otherwise, the string will be returned as is. |
87 std::string ProcessIDN(const std::string& input); | 87 std::string ProcessIDN(const std::string& input); |
88 | 88 |
89 void GetCertChainFromCert(net::X509Certificate::OSCertHandle cert_handle, | |
90 net::X509Certificate::OSCertHandles* cert_handles); | |
91 void DestroyCertChain(net::X509Certificate::OSCertHandles* cert_handles); | |
92 | |
93 std::string GetCMSString(const net::X509Certificate::OSCertHandles& cert_chain, | 89 std::string GetCMSString(const net::X509Certificate::OSCertHandles& cert_chain, |
94 size_t start, size_t end); | 90 size_t start, size_t end); |
95 | 91 |
96 std::string ProcessSecAlgorithmSignature( | 92 std::string ProcessSecAlgorithmSignature( |
97 net::X509Certificate::OSCertHandle cert_handle); | 93 net::X509Certificate::OSCertHandle cert_handle); |
98 std::string ProcessSecAlgorithmSubjectPublicKey( | 94 std::string ProcessSecAlgorithmSubjectPublicKey( |
99 net::X509Certificate::OSCertHandle cert_handle); | 95 net::X509Certificate::OSCertHandle cert_handle); |
100 std::string ProcessSecAlgorithmSignatureWrap( | 96 std::string ProcessSecAlgorithmSignatureWrap( |
101 net::X509Certificate::OSCertHandle cert_handle); | 97 net::X509Certificate::OSCertHandle cert_handle); |
102 | 98 |
(...skipping 17 matching lines...) Expand all Loading... |
120 #if defined(USE_NSS) | 116 #if defined(USE_NSS) |
121 // Format a buffer as a space separated string, with 16 bytes on each line. | 117 // Format a buffer as a space separated string, with 16 bytes on each line. |
122 // |data_length| is the length in bits. | 118 // |data_length| is the length in bits. |
123 std::string ProcessRawBits(const unsigned char* data, | 119 std::string ProcessRawBits(const unsigned char* data, |
124 size_t data_length); | 120 size_t data_length); |
125 #endif // USE_NSS | 121 #endif // USE_NSS |
126 | 122 |
127 } // namespace x509_certificate_model | 123 } // namespace x509_certificate_model |
128 | 124 |
129 #endif // CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ | 125 #endif // CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ |
OLD | NEW |