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

Side by Side Diff: net/spdy/spdy_credential_builder_unittest.cc

Issue 12221136: Add CLIENT_CERT_TYPE_DSS_SIGN to net::SSLClientCertType (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spdy/spdy_credential_builder.h" 5 #include "net/spdy/spdy_credential_builder.h"
6 6
7 #include "base/threading/sequenced_worker_pool.h" 7 #include "base/threading/sequenced_worker_pool.h"
8 #include "crypto/ec_signature_creator.h" 8 #include "crypto/ec_signature_creator.h"
9 #include "crypto/ec_private_key.h" 9 #include "crypto/ec_private_key.h"
10 #include "net/base/asn1_util.h" 10 #include "net/base/asn1_util.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #else 105 #else
106 #define MAYBE_FailsWithRSACert FailsWithRSACert 106 #define MAYBE_FailsWithRSACert FailsWithRSACert
107 #endif 107 #endif
108 108
109 TEST_F(SpdyCredentialBuilderTest, MAYBE_FailsWithRSACert) { 109 TEST_F(SpdyCredentialBuilderTest, MAYBE_FailsWithRSACert) {
110 EXPECT_EQ(ERR_BAD_SSL_CLIENT_AUTH_CERT, 110 EXPECT_EQ(ERR_BAD_SSL_CLIENT_AUTH_CERT,
111 BuildWithType(CLIENT_CERT_RSA_SIGN)); 111 BuildWithType(CLIENT_CERT_RSA_SIGN));
112 } 112 }
113 113
114 #if defined(USE_OPENSSL) 114 #if defined(USE_OPENSSL)
115 #define MAYBE_FailsWithDSACert DISABLED_FailsWithDSACert
116 #else
117 #define MAYBE_FailsWithDSACert FailsWithDSACert
118 #endif
119
120 TEST_F(SpdyCredentialBuilderTest, MAYBE_FailsWithDSACert) {
121 EXPECT_EQ(ERR_BAD_SSL_CLIENT_AUTH_CERT,
122 BuildWithType(CLIENT_CERT_DSS_SIGN));
123 }
124
125 #if defined(USE_OPENSSL)
115 #define MAYBE_SetsSlotCorrectly DISABLED_SetsSlotCorrectly 126 #define MAYBE_SetsSlotCorrectly DISABLED_SetsSlotCorrectly
116 #else 127 #else
117 #define MAYBE_SetsSlotCorrectly SetsSlotCorrectly 128 #define MAYBE_SetsSlotCorrectly SetsSlotCorrectly
118 #endif 129 #endif
119 130
120 TEST_F(SpdyCredentialBuilderTest, MAYBE_SetsSlotCorrectly) { 131 TEST_F(SpdyCredentialBuilderTest, MAYBE_SetsSlotCorrectly) {
121 ASSERT_EQ(OK, Build()); 132 ASSERT_EQ(OK, Build());
122 EXPECT_EQ(kSlot, credential_.slot); 133 EXPECT_EQ(kSlot, credential_.slot);
123 } 134 }
124 135
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 crypto::ECSignatureCreator::Create(private_key.get())); 173 crypto::ECSignatureCreator::Create(private_key.get()));
163 std::string secret = GetCredentialSecret(); 174 std::string secret = GetCredentialSecret();
164 creator->Sign(reinterpret_cast<const unsigned char *>(secret.data()), 175 creator->Sign(reinterpret_cast<const unsigned char *>(secret.data()),
165 secret.length(), &proof_data); 176 secret.length(), &proof_data);
166 177
167 std::string proof(proof_data.begin(), proof_data.end()); 178 std::string proof(proof_data.begin(), proof_data.end());
168 EXPECT_EQ(proof, credential_.proof); 179 EXPECT_EQ(proof, credential_.proof);
169 } 180 }
170 181
171 } // namespace net 182 } // namespace net
OLDNEW
« net/base/ssl_client_cert_type.h ('K') | « net/base/ssl_client_cert_type.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698