Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: net/tools/domain_security_preload_generator/cert_util.h

Issue 2551153003: Add static domain security state generator tool. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_CERT_UTIL_H_
6 #define NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_CERT_UTIL_H_
7
8 #include <stdint.h>
9
10 #include "base/strings/string_piece.h"
11
12 namespace net {
13 class SPKIHash;
14 } // namespace net
15
16 // Extracts the SubjectPublicKeyInfo from the PEM encoded certificate and copies
17 // the SHA256 digest to |out_hash|. Returns true on success and false on
18 // failure.
19 bool CalculateSPKIHashFromCertificate(base::StringPiece pem_certificate,
20 net::SPKIHash* out_hash);
21
22 // Calculates the SHA256 of the SubjectPublicKeyInfo in the PEM encoded
23 // |pem_key| and copies the digest to |out_hash|. Returns true on success and
24 // false on failure.
25 bool CalculateSPKIHashFromKey(base::StringPiece pem_key,
26 net::SPKIHash* out_hash);
27
28 // Initializes BoringSSL.
29 void InitializeCryptoLibrary();
30
31 #endif // NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_CERT_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698