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

Side by Side Diff: net/cert/internal/verify_signed_data_unittest.cc

Issue 1647953004: Roll src/third_party/boringssl/src 6c22f542f..2cdf39877 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/cert/internal/verify_signed_data.h" 5 #include "net/cert/internal/verify_signed_data.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "net/cert/internal/signature_algorithm.h" 9 #include "net/cert/internal/signature_algorithm.h"
10 #include "net/cert/internal/signature_policy.h" 10 #include "net/cert/internal/signature_policy.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 TEST(VerifySignedDataTest, RsaPssSha256Salt12UsingPssKeyWithNullParams) { 204 TEST(VerifySignedDataTest, RsaPssSha256Salt12UsingPssKeyWithNullParams) {
205 RunTestCase(FAILURE, 205 RunTestCase(FAILURE,
206 "rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem"); 206 "rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem");
207 } 207 }
208 208
209 TEST(VerifySignedDataTest, EcdsaPrime256v1Sha512SpkiParamsNull) { 209 TEST(VerifySignedDataTest, EcdsaPrime256v1Sha512SpkiParamsNull) {
210 RunTestCase(FAILURE, "ecdsa-prime256v1-sha512-spki-params-null.pem"); 210 RunTestCase(FAILURE, "ecdsa-prime256v1-sha512-spki-params-null.pem");
211 } 211 }
212 212
213 TEST(VerifySignedDataTest, RsaPkcs1Sha256UsingIdEaRsa) { 213 TEST(VerifySignedDataTest, RsaPkcs1Sha256UsingIdEaRsa) {
214 // TODO(eroman): This should fail! (shouldn't recognize this weird OID). 214 RunTestCase(FAILURE, "rsa-pkcs1-sha256-using-id-ea-rsa.pem");
davidben 2016/01/28 22:32:28 +eroman FYI
eroman 2016/01/28 23:32:00 lgtm
215 // See https://crbug.com/522228
216 RunTestCase(SUCCESS, "rsa-pkcs1-sha256-using-id-ea-rsa.pem");
217 } 215 }
218 216
219 TEST(VerifySignedDataTest, RsaPkcs1Sha256SpkiNonNullParams) { 217 TEST(VerifySignedDataTest, RsaPkcs1Sha256SpkiNonNullParams) {
220 // TODO(eroman): This should fail! (shouldn't recognize bogus params in rsa 218 // TODO(eroman): This should fail! (shouldn't recognize bogus params in rsa
221 // SPKI). See https://crbug.com/522228 219 // SPKI). See https://crbug.com/522228
222 RunTestCase(SUCCESS, "rsa-pkcs1-sha256-spki-non-null-params.pem"); 220 RunTestCase(SUCCESS, "rsa-pkcs1-sha256-spki-non-null-params.pem");
223 } 221 }
224 222
225 TEST(VerifySignedDataTest, EcdsaPrime256v1Sha512UnusedBitsSignature) { 223 TEST(VerifySignedDataTest, EcdsaPrime256v1Sha512UnusedBitsSignature) {
226 RunTestCase(FAILURE, "ecdsa-prime256v1-sha512-unused-bits-signature.pem"); 224 RunTestCase(FAILURE, "ecdsa-prime256v1-sha512-unused-bits-signature.pem");
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 RunTestCaseUsingPolicy(SUCCESS, "ecdsa-secp384r1-sha256.pem", &policy); 302 RunTestCaseUsingPolicy(SUCCESS, "ecdsa-secp384r1-sha256.pem", &policy);
305 RunTestCaseUsingPolicy(SUCCESS, "rsa-pkcs1-sha256.pem", &policy); 303 RunTestCaseUsingPolicy(SUCCESS, "rsa-pkcs1-sha256.pem", &policy);
306 RunTestCaseUsingPolicy(SUCCESS, "rsa-pss-sha256-salt10.pem", &policy); 304 RunTestCaseUsingPolicy(SUCCESS, "rsa-pss-sha256-salt10.pem", &policy);
307 RunTestCaseUsingPolicy(FAILURE, "rsa-pss-sha256-mgf1-sha512-salt33.pem", 305 RunTestCaseUsingPolicy(FAILURE, "rsa-pss-sha256-mgf1-sha512-salt33.pem",
308 &policy); 306 &policy);
309 } 307 }
310 308
311 } // namespace 309 } // namespace
312 310
313 } // namespace net 311 } // namespace net
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698