| This test specifies an RSA PKCS#1 v1.5 signature algorithm (and a valid RSA |
| signature), HOWEVER it provides an EC key. Verification should fail. |
| |
| |
| $ 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 PUBLIC KEY----- |
| MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS |
| o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== |
| -----END PUBLIC KEY----- |
| |
| $ openssl asn1parse -i < [ALGORITHM] |
| 0:d=0 hl=2 l= 13 cons: SEQUENCE |
| 2:d=1 hl=2 l= 9 prim: OBJECT :sha256WithRSAEncryption |
| 13:d=1 hl=2 l= 0 prim: NULL |
| -----BEGIN ALGORITHM----- |
| MA0GCSqGSIb3DQEBCwUA |
| -----END ALGORITHM----- |
| |
| -----BEGIN DATA----- |
| MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN |
| VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1 |
| UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ |
| VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 |
| ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp |
| 1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA |
| 0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/ |
| cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw |
| FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w== |
| -----END DATA----- |
| |
| $ openssl asn1parse -i < [SIGNATURE] |
| 0:d=0 hl=3 l= 129 prim: BIT STRING |
| -----BEGIN SIGNATURE----- |
| A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK |
| oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6 |
| +Gqf3saGdr8/LnvFAdNQvkalQt |
| -----END SIGNATURE----- |