Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/base/x509_util.h" | 5 #include "net/base/x509_util.h" |
| 6 #include "net/base/x509_util_openssl.h" | 6 #include "net/base/x509_util_openssl.h" |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
| 12 #include "net/base/x509_cert_types.h" | 12 #include "net/base/x509_cert_types.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 namespace x509_util { | 16 namespace x509_util { |
| 17 | 17 |
| 18 bool CreateOriginBoundCertEC( | 18 bool CreateServerBoundCertEC( |
|
wtc
2012/03/15 23:46:38
This should be DomainBound.
mattm
2012/03/16 22:22:00
Done.
| |
| 19 crypto::ECPrivateKey* key, | 19 crypto::ECPrivateKey* key, |
| 20 const std::string& origin, | 20 const std::string& server, |
| 21 uint32 serial_number, | 21 uint32 serial_number, |
| 22 base::Time not_valid_before, | 22 base::Time not_valid_before, |
| 23 base::Time not_valid_after, | 23 base::Time not_valid_after, |
| 24 std::string* der_cert) { | 24 std::string* der_cert) { |
| 25 NOTIMPLEMENTED(); | 25 NOTIMPLEMENTED(); |
| 26 return false; | 26 return false; |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool ParsePrincipalKeyAndValueByIndex(X509_NAME* name, | 29 bool ParsePrincipalKeyAndValueByIndex(X509_NAME* name, |
| 30 int index, | 30 int index, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 x509_time->length); | 77 x509_time->length); |
| 78 | 78 |
| 79 CertDateFormat format = x509_time->type == V_ASN1_UTCTIME ? | 79 CertDateFormat format = x509_time->type == V_ASN1_UTCTIME ? |
| 80 CERT_DATE_FORMAT_UTC_TIME : CERT_DATE_FORMAT_GENERALIZED_TIME; | 80 CERT_DATE_FORMAT_UTC_TIME : CERT_DATE_FORMAT_GENERALIZED_TIME; |
| 81 return ParseCertificateDate(str_date, format, time); | 81 return ParseCertificateDate(str_date, format, time); |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace x509_util | 84 } // namespace x509_util |
| 85 | 85 |
| 86 } // namespace net | 86 } // namespace net |
| OLD | NEW |