| 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 NET_CERT_X509_UTIL_OPENSSL_H_ | 5 #ifndef NET_CERT_X509_UTIL_OPENSSL_H_ |
| 6 #define NET_CERT_X509_UTIL_OPENSSL_H_ | 6 #define NET_CERT_X509_UTIL_OPENSSL_H_ |
| 7 | 7 |
| 8 #include <openssl/asn1.h> | 8 #include <openssl/asn1.h> |
| 9 #include <openssl/x509v3.h> | 9 #include <openssl/x509v3.h> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // A collection of helper functions to fetch data from OpenSSL X509 certificates | 22 // A collection of helper functions to fetch data from OpenSSL X509 certificates |
| 23 // into more convenient std / base datatypes. | 23 // into more convenient std / base datatypes. |
| 24 namespace x509_util { | 24 namespace x509_util { |
| 25 | 25 |
| 26 bool NET_EXPORT ParsePrincipalKeyAndValueByIndex(X509_NAME* name, | 26 bool NET_EXPORT ParsePrincipalKeyAndValueByIndex(X509_NAME* name, |
| 27 int index, | 27 int index, |
| 28 std::string* key, | 28 std::string* key, |
| 29 std::string* value); | 29 std::string* value); |
| 30 | 30 |
| 31 bool NET_EXPORT ParsePrincipalValueByIndex(X509_NAME* name, | 31 bool NET_EXPORT |
| 32 int index, | 32 ParsePrincipalValueByIndex(X509_NAME* name, int index, std::string* value); |
| 33 std::string* value); | |
| 34 | 33 |
| 35 bool NET_EXPORT ParsePrincipalValueByNID(X509_NAME* name, | 34 bool NET_EXPORT |
| 36 int nid, | 35 ParsePrincipalValueByNID(X509_NAME* name, int nid, std::string* value); |
| 37 std::string* value); | |
| 38 | 36 |
| 39 bool NET_EXPORT ParseDate(ASN1_TIME* x509_time, base::Time* time); | 37 bool NET_EXPORT ParseDate(ASN1_TIME* x509_time, base::Time* time); |
| 40 | 38 |
| 41 } // namespace x509_util | 39 } // namespace x509_util |
| 42 | 40 |
| 43 } // namespace net | 41 } // namespace net |
| 44 | 42 |
| 45 #endif // NET_CERT_X509_UTIL_OPENSSL_H_ | 43 #endif // NET_CERT_X509_UTIL_OPENSSL_H_ |
| OLD | NEW |