| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_CERT_UTIL_H_ | 5 #ifndef NET_TOOLS_TRANSPORT_SECURITY_STATE_GENERATOR_CERT_UTIL_H_ |
| 6 #define NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_CERT_UTIL_H_ | 6 #define NET_TOOLS_TRANSPORT_SECURITY_STATE_GENERATOR_CERT_UTIL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| 11 #include "third_party/boringssl/src/include/openssl/x509v3.h" | 11 #include "third_party/boringssl/src/include/openssl/x509v3.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 namespace transport_security_state { | 15 namespace transport_security_state { |
| 16 class SPKIHash; | 16 class SPKIHash; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 36 bool ExtractSubjectNameFromCertificate(X509* certificate, std::string* name); | 36 bool ExtractSubjectNameFromCertificate(X509* certificate, std::string* name); |
| 37 | 37 |
| 38 // Decodes the PEM block in |pem_key| and sets |*out_hash| to the SHA256 digest | 38 // Decodes the PEM block in |pem_key| and sets |*out_hash| to the SHA256 digest |
| 39 // of the resulting structure. The encoded PEM block in |pem_key| is expected to | 39 // of the resulting structure. The encoded PEM block in |pem_key| is expected to |
| 40 // be a SubjectPublicKeyInfo structure. Returns true on success and false on | 40 // be a SubjectPublicKeyInfo structure. Returns true on success and false on |
| 41 // failure. | 41 // failure. |
| 42 bool CalculateSPKIHashFromKey( | 42 bool CalculateSPKIHashFromKey( |
| 43 base::StringPiece pem_key, | 43 base::StringPiece pem_key, |
| 44 net::transport_security_state::SPKIHash* out_hash); | 44 net::transport_security_state::SPKIHash* out_hash); |
| 45 | 45 |
| 46 #endif // NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_CERT_UTIL_H_ | 46 #endif // NET_TOOLS_TRANSPORT_SECURITY_STATE_GENERATOR_CERT_UTIL_H_ |
| OLD | NEW |