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/cert/x509_util.h" | 5 #include "net/cert/x509_util.h" |
6 #include "net/cert/x509_util_openssl.h" | 6 #include "net/cert/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/strings/string_piece.h" |
12 #include "net/cert/x509_cert_types.h" | 12 #include "net/cert/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 IsSupportedValidityRange(base::Time not_valid_before, | 18 bool IsSupportedValidityRange(base::Time not_valid_before, |
19 base::Time not_valid_after) { | 19 base::Time not_valid_after) { |
20 if (not_valid_before > not_valid_after) | 20 if (not_valid_before > not_valid_after) |
21 return false; | 21 return false; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 x509_time->length); | 110 x509_time->length); |
111 | 111 |
112 CertDateFormat format = x509_time->type == V_ASN1_UTCTIME ? | 112 CertDateFormat format = x509_time->type == V_ASN1_UTCTIME ? |
113 CERT_DATE_FORMAT_UTC_TIME : CERT_DATE_FORMAT_GENERALIZED_TIME; | 113 CERT_DATE_FORMAT_UTC_TIME : CERT_DATE_FORMAT_GENERALIZED_TIME; |
114 return ParseCertificateDate(str_date, format, time); | 114 return ParseCertificateDate(str_date, format, time); |
115 } | 115 } |
116 | 116 |
117 } // namespace x509_util | 117 } // namespace x509_util |
118 | 118 |
119 } // namespace net | 119 } // namespace net |
OLD | NEW |