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

Side by Side Diff: net/quic/test_tools/crypto_test_utils_openssl.cc

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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/quic/test_tools/crypto_test_utils.h" 5 #include "net/quic/test_tools/crypto_test_utils.h"
6 6
7 #include <openssl/bn.h> 7 #include <openssl/bn.h>
8 #include <openssl/ec.h> 8 #include <openssl/ec.h>
9 #include <openssl/ecdsa.h> 9 #include <openssl/ecdsa.h>
10 #include <openssl/evp.h> 10 #include <openssl/evp.h>
11 #include <openssl/obj_mac.h> 11 #include <openssl/obj_mac.h>
12 #include <openssl/sha.h> 12 #include <openssl/sha.h>
13 13
14 #include "crypto/openssl_util.h" 14 #include "crypto/openssl_util.h"
15 #include "crypto/secure_hash.h" 15 #include "crypto/secure_hash.h"
16 #include "net/base/test_data_directory.h"
16 #include "net/quic/crypto/channel_id.h" 17 #include "net/quic/crypto/channel_id.h"
18 #include "net/quic/crypto/proof_verifier_openssl.h"
17 19
18 using base::StringPiece; 20 using base::StringPiece;
19 using std::string; 21 using std::string;
20 22
21 namespace { 23 namespace {
22 24
23 void EvpMdCtxCleanUp(EVP_MD_CTX *ctx) { 25 void EvpMdCtxCleanUp(EVP_MD_CTX *ctx) {
24 (void)EVP_MD_CTX_cleanup(ctx); 26 (void)EVP_MD_CTX_cleanup(ctx);
25 } 27 }
26 28
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // static 168 // static
167 ChannelIDSigner* CryptoTestUtils::ChannelIDSignerForTesting() { 169 ChannelIDSigner* CryptoTestUtils::ChannelIDSignerForTesting() {
168 return new TestChannelIDSigner(); 170 return new TestChannelIDSigner();
169 } 171 }
170 172
171 // static 173 // static
172 string CryptoTestUtils::ChannelIDKeyForHostname(const string& hostname) { 174 string CryptoTestUtils::ChannelIDKeyForHostname(const string& hostname) {
173 return TestChannelIDSigner::KeyForHostname(hostname); 175 return TestChannelIDSigner::KeyForHostname(hostname);
174 } 176 }
175 177
178 // static
179 ProofVerifier* CryptoTestUtils::ProofVerifierForTesting() {
180 base::FilePath certs_dir = GetTestCertsDirectory();
181 return new ProofVerifierOpenSSL(certs_dir.value() + "/proof_verify.crt");
182 }
183
176 } // namespace test 184 } // namespace test
177 185
178 } // namespace net 186 } // namespace net
OLDNEW
« net/quic/test_tools/crypto_test_utils.cc ('K') | « net/quic/test_tools/crypto_test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698