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

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

Issue 1742873002: Switch //net to the new SPKI and PKCS#8 APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spki-crypto
Patch Set: tweak keygen_handler_openssl.cc Created 4 years, 9 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 | « net/cert/internal/verify_signed_data.cc ('k') | net/cert/jwk_serializer_openssl.cc » ('j') | 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 TEST(VerifySignedDataTest, RsaPkcs1Sha256) { 95 TEST(VerifySignedDataTest, RsaPkcs1Sha256) {
96 RunTestCase(SUCCESS, "rsa-pkcs1-sha256.pem"); 96 RunTestCase(SUCCESS, "rsa-pkcs1-sha256.pem");
97 } 97 }
98 98
99 TEST(VerifySignedDataTest, Rsa2048Pkcs1Sha512) { 99 TEST(VerifySignedDataTest, Rsa2048Pkcs1Sha512) {
100 RunTestCase(SUCCESS, "rsa2048-pkcs1-sha512.pem"); 100 RunTestCase(SUCCESS, "rsa2048-pkcs1-sha512.pem");
101 } 101 }
102 102
103 TEST(VerifySignedDataTest, RsaPkcs1Sha256KeyEncodedBer) { 103 TEST(VerifySignedDataTest, RsaPkcs1Sha256KeyEncodedBer) {
104 // TODO(eroman): This should fail! (SPKI should be DER-encoded). See 104 RunTestCase(FAILURE, "rsa-pkcs1-sha256-key-encoded-ber.pem");
105 // https://crbug.com/522228
106 RunTestCase(SUCCESS, "rsa-pkcs1-sha256-key-encoded-ber.pem");
107 } 105 }
108 106
109 TEST(VerifySignedDataTest, EcdsaSecp384r1Sha256) { 107 TEST(VerifySignedDataTest, EcdsaSecp384r1Sha256) {
110 RunTestCase(SUCCESS, "ecdsa-secp384r1-sha256.pem"); 108 RunTestCase(SUCCESS, "ecdsa-secp384r1-sha256.pem");
111 } 109 }
112 110
113 TEST(VerifySignedDataTest, EcdsaPrime256v1Sha512) { 111 TEST(VerifySignedDataTest, EcdsaPrime256v1Sha512) {
114 RunTestCase(SUCCESS, "ecdsa-prime256v1-sha512.pem"); 112 RunTestCase(SUCCESS, "ecdsa-prime256v1-sha512.pem");
115 } 113 }
116 114
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 RunTestCaseUsingPolicy(SUCCESS, "ecdsa-secp384r1-sha256.pem", &policy); 296 RunTestCaseUsingPolicy(SUCCESS, "ecdsa-secp384r1-sha256.pem", &policy);
299 RunTestCaseUsingPolicy(SUCCESS, "rsa-pkcs1-sha256.pem", &policy); 297 RunTestCaseUsingPolicy(SUCCESS, "rsa-pkcs1-sha256.pem", &policy);
300 RunTestCaseUsingPolicy(SUCCESS, "rsa-pss-sha256-salt10.pem", &policy); 298 RunTestCaseUsingPolicy(SUCCESS, "rsa-pss-sha256-salt10.pem", &policy);
301 RunTestCaseUsingPolicy(FAILURE, "rsa-pss-sha256-mgf1-sha512-salt33.pem", 299 RunTestCaseUsingPolicy(FAILURE, "rsa-pss-sha256-mgf1-sha512-salt33.pem",
302 &policy); 300 &policy);
303 } 301 }
304 302
305 } // namespace 303 } // namespace
306 304
307 } // namespace net 305 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/verify_signed_data.cc ('k') | net/cert/jwk_serializer_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698