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

Side by Side Diff: net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-unused-bits-signature.pem

Issue 1658693006: Normalize the PEM format used in some certificate test data. (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
OLDNEW
1 This is the same test as ecdsa-prime256v1-sha512.pem, however the SIGNATURE has 1 This is the same test as ecdsa-prime256v1-sha512.pem, however the SIGNATURE has
2 been changed to a (valid) BIT STRING containing two unused bits. 2 been changed to a (valid) BIT STRING containing two unused bits.
3 3
4 Note that the last two bits of the original signature were 0, so the 4 Note that the last two bits of the original signature were 0, so the
5 DER-encoded bytes portion of the mutated BIT STRING remains the same. All that 5 DER-encoded bytes portion of the mutated BIT STRING remains the same. All that
6 changes is the octet at the start which indicates the number of unused bits. 6 changes is the octet at the start which indicates the number of unused bits.
7 7
8 In other words SIGNATURE changes from: 8 In other words SIGNATURE changes from:
9 03 47 00 30 ... 84 9 03 47 00 30 ... 84
10 To: 10 To:
11 03 47 02 30 ... 84 11 03 47 02 30 ... 84
12 12
13 13
14
15 -----BEGIN PUBLIC KEY-----
16 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS
17 o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA==
18 -----END PUBLIC KEY-----
19
20 $ openssl asn1parse -i < [PUBLIC KEY] 14 $ openssl asn1parse -i < [PUBLIC KEY]
21 0:d=0 hl=2 l= 89 cons: SEQUENCE 15 0:d=0 hl=2 l= 89 cons: SEQUENCE
22 2:d=1 hl=2 l= 19 cons: SEQUENCE 16 2:d=1 hl=2 l= 19 cons: SEQUENCE
23 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey 17 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey
24 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 18 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1
25 23:d=1 hl=2 l= 66 prim: BIT STRING 19 23:d=1 hl=2 l= 66 prim: BIT STRING
20 -----BEGIN PUBLIC KEY-----
21 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS
22 o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA==
23 -----END PUBLIC KEY-----
26 24
27 25 $ openssl asn1parse -i < [ALGORITHM]
28 26 0:d=0 hl=2 l= 10 cons: SEQUENCE
27 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512
29 -----BEGIN ALGORITHM----- 28 -----BEGIN ALGORITHM-----
30 MAoGCCqGSM49BAME 29 MAoGCCqGSM49BAME
31 -----END ALGORITHM----- 30 -----END ALGORITHM-----
32 31
33 $ openssl asn1parse -i < [ALGORITHM]
34 0:d=0 hl=2 l= 10 cons: SEQUENCE
35 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512
36
37
38
39 -----BEGIN DATA----- 32 -----BEGIN DATA-----
40 bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV 33 bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV
41 SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 34 SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1
42 APuEMjWr/5jiQb37VTjD4= 35 APuEMjWr/5jiQb37VTjD4=
43 -----END DATA----- 36 -----END DATA-----
44 37
45 38 $ openssl asn1parse -i < [SIGNATURE]
46 39 0:d=0 hl=2 l= 71 prim: BIT STRING
47 -----BEGIN SIGNATURE----- 40 -----BEGIN SIGNATURE-----
48 A0cCMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX 41 A0cCMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX
49 X/LDDO7/sWpyBCEa2OSiahA== 42 X/LDDO7/sWpyBCEa2OSiahA==
50 -----END SIGNATURE----- 43 -----END SIGNATURE-----
51
52 $ openssl asn1parse -i < [SIGNATURE]
53 0:d=0 hl=2 l= 71 prim: BIT STRING
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698