Index: net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-wrong-signature-format.pem |
diff --git a/net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-wrong-signature-format.pem b/net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-wrong-signature-format.pem |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d51317ceeab1591b4a37bb11d61b7489e7b53e66 |
--- /dev/null |
+++ b/net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-wrong-signature-format.pem |
@@ -0,0 +1,47 @@ |
+This is the same as ecdsa-prime256v1-sha512.pem, except the signature is wrong. |
+ |
+Rather than encoding the signature into a DER-encoded Ecdsa-Sig-Value, it is a |
+concatenation of the r and s values. This is the format that WebCrypto uses for |
+ECDSA signature, but not what is used for digital signatures. |
+ |
+ |
+ |
+-----BEGIN PUBLIC KEY----- |
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS |
+o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== |
+-----END PUBLIC KEY----- |
+ |
+$ openssl asn1parse -i < [PUBLIC KEY] |
+ 0:d=0 hl=2 l= 89 cons: SEQUENCE |
+ 2:d=1 hl=2 l= 19 cons: SEQUENCE |
+ 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey |
+ 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 |
+ 23:d=1 hl=2 l= 66 prim: BIT STRING |
+ |
+ |
+ |
+-----BEGIN ALGORITHM----- |
+MAoGCCqGSM49BAME |
+-----END ALGORITHM----- |
+ |
+$ openssl asn1parse -i < [ALGORITHM] |
+ 0:d=0 hl=2 l= 10 cons: SEQUENCE |
+ 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512 |
+ |
+ |
+ |
+-----BEGIN DATA----- |
+bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV |
+SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 |
+APuEMjWr/5jiQb37VTjD4= |
+-----END DATA----- |
+ |
+ |
+ |
+-----BEGIN SIGNATURE----- |
+A0EAS5+R5ChShyYaHRySPPYZzVLBdc/n8b5gpSWMYQNIuj0oxF+QHXHEGymGOOwNaoXX/LDDO7/ |
+sWpyBCEa2OSiahA== |
+-----END SIGNATURE----- |
+ |
+$ openssl asn1parse -i < [SIGNATURE] |
+ 0:d=0 hl=2 l= 65 prim: BIT STRING |