diff options
Diffstat (limited to 'net/data/verify_signed_data_unittest/rsa-pkcs1-sha1-bad-key-der-null.pem')
-rw-r--r-- | net/data/verify_signed_data_unittest/rsa-pkcs1-sha1-bad-key-der-null.pem | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/net/data/verify_signed_data_unittest/rsa-pkcs1-sha1-bad-key-der-null.pem b/net/data/verify_signed_data_unittest/rsa-pkcs1-sha1-bad-key-der-null.pem new file mode 100644 index 0000000..59559f4 --- /dev/null +++ b/net/data/verify_signed_data_unittest/rsa-pkcs1-sha1-bad-key-der-null.pem @@ -0,0 +1,52 @@ +Same test as rsa-pkcs1-sha1.pem except an extra NULL (0x05, 0x00) has been +appended to the SPKI. + +The DER can still be parsed, however it should fail due to the unconsumed data +at the end. + + + +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH +mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL +I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQABBQA= +-----END PUBLIC KEY----- + +$ openssl asn1parse -i < [PUBLIC KEY] + 0:d=0 hl=3 l= 159 cons: SEQUENCE + 3:d=1 hl=2 l= 13 cons: SEQUENCE + 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption + 16:d=2 hl=2 l= 0 prim: NULL + 18:d=1 hl=3 l= 141 prim: BIT STRING + 162:d=0 hl=2 l= 0 prim: NULL + + + +-----BEGIN ALGORITHM----- +MA0GCSqGSIb3DQEBBQUA +-----END ALGORITHM----- + +$ openssl asn1parse -i < [ALGORITHM] + 0:d=0 hl=2 l= 13 cons: SEQUENCE + 2:d=1 hl=2 l= 9 prim: OBJECT :sha1WithRSAEncryption + 13:d=1 hl=2 l= 0 prim: NULL + + + +-----BEGIN DATA----- +zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu +jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc +vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY +pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A== +-----END DATA----- + + + +-----BEGIN SIGNATURE----- +A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8 +Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/ +wJfKsY6aRY/LY0zc6O41iUxITX +-----END SIGNATURE----- + +$ openssl asn1parse -i < [SIGNATURE] + 0:d=0 hl=3 l= 129 prim: BIT STRING |