| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_CERTIFICATE_H_ | 5 #ifndef NET_BASE_X509_CERTIFICATE_H_ |
| 6 #define NET_BASE_X509_CERTIFICATE_H_ | 6 #define NET_BASE_X509_CERTIFICATE_H_ |
| 7 | 7 |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #elif defined(OS_LINUX) | 68 #elif defined(OS_LINUX) |
| 69 typedef struct CERTCertificateStr* OSCertHandle; | 69 typedef struct CERTCertificateStr* OSCertHandle; |
| 70 #else | 70 #else |
| 71 // TODO(ericroman): not implemented | 71 // TODO(ericroman): not implemented |
| 72 typedef void* OSCertHandle; | 72 typedef void* OSCertHandle; |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 // Principal represent an X.509 principal. | 75 // Principal represent an X.509 principal. |
| 76 struct Principal { | 76 struct Principal { |
| 77 Principal() { } | 77 Principal() { } |
| 78 explicit Principal(std::string name) : common_name(name) { } | 78 explicit Principal(const std::string& name) : common_name(name) { } |
| 79 | 79 |
| 80 // The different attributes for a principal. They may be "". | 80 // The different attributes for a principal. They may be "". |
| 81 // Note that some of them can have several values. | 81 // Note that some of them can have several values. |
| 82 | 82 |
| 83 std::string common_name; | 83 std::string common_name; |
| 84 std::string locality_name; | 84 std::string locality_name; |
| 85 std::string state_or_province_name; | 85 std::string state_or_province_name; |
| 86 std::string country_name; | 86 std::string country_name; |
| 87 | 87 |
| 88 std::vector<std::string> street_addresses; | 88 std::vector<std::string> street_addresses; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 // Where the certificate comes from. | 302 // Where the certificate comes from. |
| 303 Source source_; | 303 Source source_; |
| 304 | 304 |
| 305 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 305 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 306 }; | 306 }; |
| 307 | 307 |
| 308 } // namespace net | 308 } // namespace net |
| 309 | 309 |
| 310 #endif // NET_BASE_X509_CERTIFICATE_H_ | 310 #endif // NET_BASE_X509_CERTIFICATE_H_ |
| OLD | NEW |