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

Side by Side Diff: net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-signature-not-bitstring.pem

Issue 1209283004: Implement VerifySignedData() for ECDSA, RSA PKCS#1 and RSA PSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parse_pss
Patch Set: add a test for non-BIT STRING signature value Created 5 years, 5 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
(Empty)
1 This is the same test as ecdsa-prime256v1-sha512.pem, except the signature
2 value is not wrapped in a BIT STRING and is just the straight up
3 Ecdsa-Sig-Value.
4
5 This should fail to verify since the expectation is that the signature be a BIT STRING.
6
7
8 $ openssl asn1parse -i < [PUBLIC KEY]
9 0:d=0 hl=2 l= 89 cons: SEQUENCE
10 2:d=1 hl=2 l= 19 cons: SEQUENCE
11 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey
12 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1
13 23:d=1 hl=2 l= 66 prim: BIT STRING
14 -----BEGIN PUBLIC KEY-----
15 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS
16 o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA==
17 -----END PUBLIC KEY-----
18
19
20 $ openssl asn1parse -i < [ALGORITHM]
21 0:d=0 hl=2 l= 10 cons: SEQUENCE
22 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512
23 -----BEGIN ALGORITHM-----
24 MAoGCCqGSM49BAME
25 -----END ALGORITHM-----
26
27
28 -----BEGIN DATA-----
29 bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV
30 SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1
31 APuEMjWr/5jiQb37VTjD4=
32 -----END DATA-----
33
34
35 $ openssl asn1parse -i < [SIGNATURE]
36 0:d=0 hl=2 l= 68 cons: SEQUENCE
37 2:d=1 hl=2 l= 32 prim: INTEGER :4B9F91E4285287261A1D1C923CF619C D52C175CFE7F1BE60A5258C610348BA3D
38 36:d=1 hl=2 l= 32 prim: INTEGER :28C45F901D71C41B298638EC0D6A85D 7FCB0C33BBFEC5A9C810846B639289A84
39 -----BEGIN SIGNATURE-----
40 MEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoXX/LD
41 DO7/sWpyBCEa2OSiahA==
42 -----END SIGNATURE-----
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698