| 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_cert_types.h" | 5 #include "net/cert/x509_cert_types.h" |
| 6 | 6 |
| 7 #include <cstdlib> | 7 #include <cstdlib> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/string_piece.h" | 12 #include "base/strings/string_piece.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "net/cert/x509_certificate.h" | 14 #include "net/cert/x509_certificate.h" |
| 15 | 15 |
| 16 namespace net { | 16 namespace net { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Helper for ParseCertificateDate. |*field| must contain at least | 20 // Helper for ParseCertificateDate. |*field| must contain at least |
| 21 // |field_len| characters. |*field| will be advanced by |field_len| on exit. | 21 // |field_len| characters. |*field| will be advanced by |field_len| on exit. |
| 22 // |*ok| is set to false if there is an error in parsing the number, but left | 22 // |*ok| is set to false if there is an error in parsing the number, but left |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 valid &= exploded.HasValidValues(); | 120 valid &= exploded.HasValidValues(); |
| 121 | 121 |
| 122 if (!valid) | 122 if (!valid) |
| 123 return false; | 123 return false; |
| 124 | 124 |
| 125 *time = base::Time::FromUTCExploded(exploded); | 125 *time = base::Time::FromUTCExploded(exploded); |
| 126 return true; | 126 return true; |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace net | 129 } // namespace net |
| OLD | NEW |