diff --git a/certs/test/catalog.txt b/certs/test/catalog.txt new file mode 100644 index 000000000..dcc1393d4 --- /dev/null +++ b/certs/test/catalog.txt @@ -0,0 +1,3 @@ +crit-cert.pem: + Simple self-signed certificate with critical Basic Constraints and Key Usage + extensions. diff --git a/certs/test/crit-cert.pem b/certs/test/crit-cert.pem new file mode 100644 index 000000000..e2c370f54 --- /dev/null +++ b/certs/test/crit-cert.pem @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC7DCCApagAwIBAgIJAKBIQJVDXWL5MA0GCSqGSIb3DQEBBAUAMIHHMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEm +MCQGA1UECgwdSm9obidzIFNvZnR3YXJlIFBsdW1iaW5nLCBMTEMxFDASBgNVBAsM +C0VuZ2luZWVyaW5nMSkwJwYDVQQDDCBlbmdpbmVlcmluZy5zb2Z0d2FyZXBsdW1i +aW5nLmJpejEoMCYGCSqGSIb3DQEJARYZam9obkBzb2Z0d2FyZXBsdW1iaW5nLmJp +ejAeFw0xNDAzMTMxNjUyMzRaFw0xNjEyMDcxNjUyMzRaMIHHMQswCQYDVQQGEwJV +UzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEmMCQGA1UE +CgwdSm9obidzIFNvZnR3YXJlIFBsdW1iaW5nLCBMTEMxFDASBgNVBAsMC0VuZ2lu +ZWVyaW5nMSkwJwYDVQQDDCBlbmdpbmVlcmluZy5zb2Z0d2FyZXBsdW1iaW5nLmJp +ejEoMCYGCSqGSIb3DQEJARYZam9obkBzb2Z0d2FyZXBsdW1iaW5nLmJpejBcMA0G +CSqGSIb3DQEBAQUAA0sAMEgCQQDicEBO1u+ysy7iakWAewKMYPKwzY6Oaq+FUopr +SIjgrX8JIV5gnnvT0HrV/Ju2t4sBy41rZc50cqOdOj9yZctRAgMBAAGjYzBhMB0G +A1UdDgQWBBQYkZqEi8LDLWrQZjw5usbSedJdAzAfBgNVHSMEGDAWgBQYkZqEi8LD +LWrQZjw5usbSedJdAzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIF4DAN +BgkqhkiG9w0BAQQFAANBAEU0nmhsV0h59xJIHESZPqGj7LYEoSnyZ8/vs+KBJmhm +A8XaCALu1m2CWCrW5wjqSGbbqQfy9vFqsnNX+Qt9KiU= +-----END CERTIFICATE----- diff --git a/certs/test/crit-key.pem b/certs/test/crit-key.pem new file mode 100644 index 000000000..893f07eb1 --- /dev/null +++ b/certs/test/crit-key.pem @@ -0,0 +1,9 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIBOQIBAAJBAOJwQE7W77KzLuJqRYB7Aoxg8rDNjo5qr4VSimtIiOCtfwkhXmCe +e9PQetX8m7a3iwHLjWtlznRyo506P3Jly1ECAwEAAQJAG21BPMtn6Rsu+JmqpW9A +1cQAYU3kkHd3nwxqW6hDfAMNY8qZCkGsrBxSAgvIItQwytV7zn+F8FPDwViVz1xQ +gQIhAPWkmZGz7sRIuZB4JQiXzVJvUprsfgpg6ODfpWl+cabJAiEA6/xdEuMqbiY+ +g7xG1MMOe2zstDB+vvxT5pEQxGklXEkCIBo9qC4Zc6NCRZh6TTJ6zPNGcyObqec/ +7QDAw3HekROJAiBm+N7QIAniuJNsvloV+us11kjPM54KzmX55PDxE4R26QIgU5DH +iIm5DKbAJqgaXOXo35v/PUqYZmJUc2bPF158+vg= +-----END RSA PRIVATE KEY----- diff --git a/ctaocrypt/src/error.c b/ctaocrypt/src/error.c index d7ed45194..67b49e42d 100644 --- a/ctaocrypt/src/error.c +++ b/ctaocrypt/src/error.c @@ -243,6 +243,10 @@ void CTaoCryptErrorString(int error, char* buffer) XSTRNCPY(buffer, "ASN NTRU key decode error, invalid input", max); break; + case ASN_CRIT_EXT_E: + XSTRNCPY(buffer, "X.509 Critical extension ignored", max); + break; + case ECC_BAD_ARG_E : XSTRNCPY(buffer, "ECC input argument wrong type, invalid input", max); break;