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

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

Issue 17385010: OpenSSL/NSS implementation of ProofVerfifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added known answer test from wtc Created 7 years, 6 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
OLDNEW
(Empty)
1 // Copyright 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_OPENSSL_H_
6 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_OPENSSL_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "net/base/net_export.h"
14 #include "net/quic/crypto/proof_verifier.h"
15
16 struct x509_store_st;
17 typedef struct x509_store_st X509_STORE;
18 struct x509_st;
19 typedef struct x509_st X509;
20
21 namespace net {
22
23 // ProofVerifierOpenSSL implements the QUIC ProofVerifier interface using
24 // OpenSSL.
25 class NET_EXPORT_PRIVATE ProofVerifierOpenSSL : public ProofVerifier {
26 public:
27 explicit ProofVerifierOpenSSL(const std::string& root_ca_filename);
28 virtual ~ProofVerifierOpenSSL();
29
30 // ProofVerifier interface
31 virtual bool VerifyProof(const std::string& hostname,
32 const std::string& server_config,
33 const std::vector<std::string>& certs,
34 const std::string& signature,
35 std::string* error_details) const OVERRIDE;
36
37 private:
38 X509* VerifyChain(const std::vector<std::string>& certs) const;
39 static bool VerifySignature(const std::string& signed_data,
40 const std::string& signature,
41 X509* cert);
42 static bool VerifyLeafForHost(X509* cert, const std::string& hostname);
43
44 X509_STORE* store_;
45
46 DISALLOW_COPY_AND_ASSIGN(ProofVerifierOpenSSL);
47 };
48
49 } // namespace net
50
51 #endif // NET_QUIC_CRYPTO_PROOF_VERIFIER_OPENSSL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698