diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2014-01-23 16:03:32 +0400 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2014-01-26 03:48:36 +0400 |
commit | cc4b6e6e582e868cba9f84195f62a51721f8cbad (patch) | |
tree | 27c7f00c127d6918d6cf71a7d16422ec74123472 /test/fixtures/keys | |
parent | a454063ea17f94a5d456bb2666502076c0d51795 (diff) | |
download | node-new-cc4b6e6e582e868cba9f84195f62a51721f8cbad.tar.gz |
crypto: clear error in GetPeerCertificate
fix #6945
Diffstat (limited to 'test/fixtures/keys')
-rw-r--r-- | test/fixtures/keys/Makefile | 15 | ||||
-rw-r--r-- | test/fixtures/keys/ec-cert.pem | 13 | ||||
-rw-r--r-- | test/fixtures/keys/ec-csr.pem | 9 | ||||
-rw-r--r-- | test/fixtures/keys/ec-key.pem | 8 | ||||
-rw-r--r-- | test/fixtures/keys/ec.cnf | 17 |
5 files changed, 61 insertions, 1 deletions
diff --git a/test/fixtures/keys/Makefile b/test/fixtures/keys/Makefile index 0c75a55724..c063377d97 100644 --- a/test/fixtures/keys/Makefile +++ b/test/fixtures/keys/Makefile @@ -1,4 +1,4 @@ -all: agent1-cert.pem agent2-cert.pem agent3-cert.pem agent4-cert.pem ca2-crl.pem +all: agent1-cert.pem agent2-cert.pem agent3-cert.pem agent4-cert.pem ca2-crl.pem ec-cert.pem # @@ -130,6 +130,19 @@ ca2-crl.pem: ca2-key.pem ca2-cert.pem ca2.cnf -out ca2-crl.pem \ -passin 'pass:password' +ec-key.pem: + openssl ecparam -genkey -out ec-key.pem -name prime256v1 + +ec-csr.pem: ec-key.pem + openssl req -new -config ec.cnf -key ec-key.pem -out ec-csr.pem + +ec-cert.pem: ec-csr.pem ec-key.pem + openssl x509 -req \ + -days 9999 \ + -in ec-csr.pem \ + -signkey ec-key.pem \ + -out ec-cert.pem + clean: rm -f *.pem *.srl ca2-database.txt ca2-serial diff --git a/test/fixtures/keys/ec-cert.pem b/test/fixtures/keys/ec-cert.pem new file mode 100644 index 0000000000..f2084198aa --- /dev/null +++ b/test/fixtures/keys/ec-cert.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB6DCCAY8CCQDxe0NTwQvhajAJBgcqhkjOPQQBMH0xCzAJBgNVBAYTAlVTMQsw +CQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzANBgNVBAoTBkpveWVudDEQMA4GA1UE +CxMHTm9kZS5qczEPMA0GA1UEAxMGYWdlbnQyMSAwHgYJKoZIhvcNAQkBFhFyeUB0 +aW55Y2xvdWRzLm9yZzAeFw0xNDAxMjUyMzQ1NTRaFw00MTA2MTEyMzQ1NTRaMH0x +CzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzANBgNVBAoT +BkpveWVudDEQMA4GA1UECxMHTm9kZS5qczEPMA0GA1UEAxMGYWdlbnQyMSAwHgYJ +KoZIhvcNAQkBFhFyeUB0aW55Y2xvdWRzLm9yZzBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABMF+Qkla0cb0tH6NcJDnd2drh0xr74hkJY8SWtsZ/7WyL8VHN8SfoDOo +2BZDByoBmHkFy1BEC0b7JFYOCAs/ShwwCQYHKoZIzj0EAQNIADBFAiEAwcJ6lRH6 +EhV5Iywr9VlmDsPDypEGIXMWLvw4Sbe+2+cCIC/TOweK9vmYiY2Y1ewAqhO7TGeX +9nTgmSQD2OBZrrOf +-----END CERTIFICATE----- diff --git a/test/fixtures/keys/ec-csr.pem b/test/fixtures/keys/ec-csr.pem new file mode 100644 index 0000000000..c77a6562de --- /dev/null +++ b/test/fixtures/keys/ec-csr.pem @@ -0,0 +1,9 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBNjCB3wIBADB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcT +AlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMT +BmFnZW50MjEgMB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwWTATBgcq +hkjOPQIBBggqhkjOPQMBBwNCAATBfkJJWtHG9LR+jXCQ53dna4dMa++IZCWPElrb +Gf+1si/FRzfEn6AzqNgWQwcqAZh5BctQRAtG+yRWDggLP0ocoAAwCQYHKoZIzj0E +AQNHADBEAiBqnVIhsMk35UAXt3/dgIAKUpnE652YTQ4rgidrxgbvqQIgDXs1gfj0 +3HACt3JASAlNgFGGUYmmDvKTj/7H1gQRB7Q= +-----END CERTIFICATE REQUEST----- diff --git a/test/fixtures/keys/ec-key.pem b/test/fixtures/keys/ec-key.pem new file mode 100644 index 0000000000..85c8d08a8b --- /dev/null +++ b/test/fixtures/keys/ec-key.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEINozA3blScV9x7C5R9RCaSqV4KOkrm0Gh0Qx7vr6VcnOoAoGCCqGSM49 +AwEHoUQDQgAEwX5CSVrRxvS0fo1wkOd3Z2uHTGvviGQljxJa2xn/tbIvxUc3xJ+g +M6jYFkMHKgGYeQXLUEQLRvskVg4ICz9KHA== +-----END EC PRIVATE KEY----- diff --git a/test/fixtures/keys/ec.cnf b/test/fixtures/keys/ec.cnf new file mode 100644 index 0000000000..83ac65c00a --- /dev/null +++ b/test/fixtures/keys/ec.cnf @@ -0,0 +1,17 @@ +[ req ] +default_bits = 1024 +days = 999 +distinguished_name = req_distinguished_name +attributes = req_attributes +prompt = no + +[ req_distinguished_name ] +C = US +ST = CA +L = SF +O = Joyent +OU = Node.js +CN = agent2 +emailAddress = ry@tinyclouds.org + +[ req_attributes ] |