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

Side by Side Diff: net/quic/crypto/proof_verifier.h

Issue 14287009: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Tot Created 7 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/crypto_server_config_protobuf.h ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_QUIC_CRYPTO_PROOF_VERIFIER_H_
6 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "net/base/net_export.h"
12
13 namespace net {
14
15 // A ProofVerifier checks the signature on a server config, and the certificate
16 // chain that backs the public key.
17 class NET_EXPORT_PRIVATE ProofVerifier {
18 public:
19 virtual ~ProofVerifier() {}
20
21 // VerifyProof checks that |signature| is a valid signature of
22 // |server_config| by the public key in the leaf certificate of |certs|, and
23 // that |certs| is a valid chain for |hostname|. On success, it returns true.
24 // On failure, it returns false and sets |*error_details| to a description of
25 // the problem.
26 //
27 // The signature uses SHA-256 as the hash function and PSS padding in the
28 // case of RSA.
29 //
30 // Note: this is just for testing. The CN of the certificate is ignored and
31 // wildcards in the SANs are not supported.
32 virtual bool VerifyProof(const std::string& hostname,
33 const std::string& server_config,
34 const std::vector<std::string>& certs,
35 const std::string& signature,
36 std::string* error_details) const = 0;
37 };
38
39 } // namespace net
40
41 #endif // NET_QUIC_CRYPTO_PROOF_VERIFIER_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_server_config_protobuf.h ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698