From 0e69214f30288563e27aaa74d6e35e01cd971470 Mon Sep 17 00:00:00 2001 From: Tal Moran Date: Wed, 11 Nov 2015 18:25:17 +0200 Subject: [PATCH] Added basic OpenSSL CA with generated intermediate CAs and certificates for testing purposes --- .../src/test/resources/certs/README.md | 6 ++ .../user1-key-with-password-secret.pem | 8 +++ .../certs/enduser-certs/user1-key.pem | 5 ++ .../resources/certs/enduser-certs/user1.crt | 19 ++++++ .../resources/certs/enduser-certs/user1.csr | 9 +++ .../certs/enduser-certs/user2-key.pem | 5 ++ .../resources/certs/enduser-certs/user2.crt | 19 ++++++ .../resources/certs/enduser-certs/user2.csr | 9 +++ .../resources/certs/enduser-certs/user2.der | Bin 0 -> 794 bytes .../certs/intermediate-ca-1/1000.pem | 19 ++++++ .../certs/intermediate-ca-1/1001.pem | 19 ++++++ .../certs/intermediate-ca-1/certindex | 2 + .../certs/intermediate-ca-1/certindex.attr | 1 + .../intermediate-ca-1/certindex.attr.old | 1 + .../certs/intermediate-ca-1/certindex.old | 1 + .../certs/intermediate-ca-1/certserial | 1 + .../certs/intermediate-ca-1/certserial.old | 1 + .../certs/intermediate-ca-1/crlnumber | 1 + .../intermediate-ca-1-private-key.pem | 5 ++ .../intermediate-ca-1/intermediate-ca-1.crt | 21 ++++++ .../intermediate-ca-1/intermediate-ca-1.csr | 10 +++ .../openssl-intermediate-ca.conf | 46 +++++++++++++ .../src/test/resources/certs/root-ca/1000.pem | 21 ++++++ .../test/resources/certs/root-ca/certindex | 1 + .../resources/certs/root-ca/certindex.attr | 1 + .../resources/certs/root-ca/certindex.old | 0 .../test/resources/certs/root-ca/certserial | 1 + .../resources/certs/root-ca/certserial.old | 1 + .../test/resources/certs/root-ca/crlnumber | 1 + .../resources/certs/root-ca/openssl-ca.conf | 61 ++++++++++++++++++ ...ot-ca-private-key-with-password-secret.pem | 8 +++ .../certs/root-ca/root-ca-private-key.der | Bin 0 -> 118 bytes .../certs/root-ca/root-ca-private-key.pem | 5 ++ .../test/resources/certs/root-ca/root-ca.crt | 17 +++++ .../src/test/resources/certs/secp256k1.pem | 3 + 35 files changed, 328 insertions(+) create mode 100644 meerkat-common/src/test/resources/certs/README.md create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user1-key-with-password-secret.pem create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user1-key.pem create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user1.crt create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user1.csr create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user2-key.pem create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user2.crt create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user2.csr create mode 100644 meerkat-common/src/test/resources/certs/enduser-certs/user2.der create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/1000.pem create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/1001.pem create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/certindex create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/certindex.attr create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/certindex.attr.old create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/certindex.old create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/certserial create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/certserial.old create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/crlnumber create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/intermediate-ca-1-private-key.pem create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/intermediate-ca-1.crt create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/intermediate-ca-1.csr create mode 100644 meerkat-common/src/test/resources/certs/intermediate-ca-1/openssl-intermediate-ca.conf create mode 100644 meerkat-common/src/test/resources/certs/root-ca/1000.pem create mode 100644 meerkat-common/src/test/resources/certs/root-ca/certindex create mode 100644 meerkat-common/src/test/resources/certs/root-ca/certindex.attr create mode 100644 meerkat-common/src/test/resources/certs/root-ca/certindex.old create mode 100644 meerkat-common/src/test/resources/certs/root-ca/certserial create mode 100644 meerkat-common/src/test/resources/certs/root-ca/certserial.old create mode 100644 meerkat-common/src/test/resources/certs/root-ca/crlnumber create mode 100644 meerkat-common/src/test/resources/certs/root-ca/openssl-ca.conf create mode 100644 meerkat-common/src/test/resources/certs/root-ca/root-ca-private-key-with-password-secret.pem create mode 100644 meerkat-common/src/test/resources/certs/root-ca/root-ca-private-key.der create mode 100644 meerkat-common/src/test/resources/certs/root-ca/root-ca-private-key.pem create mode 100644 meerkat-common/src/test/resources/certs/root-ca/root-ca.crt create mode 100644 meerkat-common/src/test/resources/certs/secp256k1.pem diff --git a/meerkat-common/src/test/resources/certs/README.md b/meerkat-common/src/test/resources/certs/README.md new file mode 100644 index 0000000..f7283d9 --- /dev/null +++ b/meerkat-common/src/test/resources/certs/README.md @@ -0,0 +1,6 @@ +Certs and private keys for testing generated using OpenSSL + +.crt and .pem files are in PEM format +.der files are in binary DER format + +files that have a name of the form *-with-password-xxxx.pem are encrypted with the password xxxx diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user1-key-with-password-secret.pem b/meerkat-common/src/test/resources/certs/enduser-certs/user1-key-with-password-secret.pem new file mode 100644 index 0000000..e859995 --- /dev/null +++ b/meerkat-common/src/test/resources/certs/enduser-certs/user1-key-with-password-secret.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-256-CBC,243D718A0D80C59590E582A26E87A49C + +RG6ITUTIdbJdWYX57oMn3tTCzHJSTjXAIZLjoVxy/v4UFYjluaFhGonIlbH1q2pP +ueu29Q3eT6144ypB8ARUJ1x0kRX1OL9zNHgdF9ulrCf9/nhGyC2nL+tHZ0YPbxoQ ++6yCQcRWvjUXLVzPEUnwMuHXJDpaXES8X0R4CISQKIA= +-----END EC PRIVATE KEY----- diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user1-key.pem b/meerkat-common/src/test/resources/certs/enduser-certs/user1-key.pem new file mode 100644 index 0000000..6619e37 --- /dev/null +++ b/meerkat-common/src/test/resources/certs/enduser-certs/user1-key.pem @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQge8JqCoaLoZq61aQki5Xm +GppcfAAkhHDGNQw/wLof5LmhRANCAAQJD1kW6BsNkRY9tslaugpOJOaoKX4uBz4S +Q96lPaPWkatNVgQchwNeB/hdjZwNuwE7A7XAwr69HFmhXRhsM005 +-----END PRIVATE KEY----- diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user1.crt b/meerkat-common/src/test/resources/certs/enduser-certs/user1.crt new file mode 100644 index 0000000..d80093f --- /dev/null +++ b/meerkat-common/src/test/resources/certs/enduser-certs/user1.crt @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDFjCCArygAwIBAgICEAAwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr +YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl +MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN +ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MTM1NFoXDTI1MTEwODE2MTM1 +NFowbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDExEzARBgNVBAgMClNvbWUt +U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugb +DZEWPbbJWroKTiTmqCl+Lgc+EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+ +vRxZoV0YbDNNOaOCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLamS8o2 +hFNd0vWy/irEBNWVNwFXMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp +MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg +N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp +YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp +LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr +BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC +A0gAMEUCIQD6QbhNNmB3AVVqhmXuiLA7WF6raShw6n0g/VloVGQebQIgEvxYclpO +MMynt5wH6X65rtn4Q1EGaDMvNbFweCDsldk= +-----END CERTIFICATE----- diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user1.csr b/meerkat-common/src/test/resources/certs/enduser-certs/user1.csr new file mode 100644 index 0000000..20e1efc --- /dev/null +++ b/meerkat-common/src/test/resources/certs/enduser-certs/user1.csr @@ -0,0 +1,9 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBOjCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx +ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMTBW +MBAGByqGSM49AgEGBSuBBAAKA0IABAkPWRboGw2RFj22yVq6Ck4k5qgpfi4HPhJD +3qU9o9aRq01WBByHA14H+F2NnA27ATsDtcDCvr0cWaFdGGwzTTmgADAKBggqhkjO +PQQDAgNIADBFAiEA8gmIhALr7O5M1QLReGH3jheildTIr1mDWl14WyMf9U4CIF23 +mInyo4VqNHLzxMLg5Cn3Oddokng3OXa63y4nTfv+ +-----END CERTIFICATE REQUEST----- diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user2-key.pem b/meerkat-common/src/test/resources/certs/enduser-certs/user2-key.pem new file mode 100644 index 0000000..2d31bb8 --- /dev/null +++ b/meerkat-common/src/test/resources/certs/enduser-certs/user2-key.pem @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgYpBEO+XWm/n6VPeMVK76 +mrZkDTpiwLsDykG7M4fU5RKhRANCAAR71/kVGyA3hdxcLBBT3NPQF6R3LholmLRN +qhnvHqzJWuy7ev+Xbuxtt9AN0ajyeFDy8Oe1bUSidnLyQi+nXC0f +-----END PRIVATE KEY----- diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user2.crt b/meerkat-common/src/test/resources/certs/enduser-certs/user2.crt new file mode 100644 index 0000000..a211365 --- /dev/null +++ b/meerkat-common/src/test/resources/certs/enduser-certs/user2.crt @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDFjCCArygAwIBAgICEAEwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr +YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl +MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN +ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MjAzM1oXDTI1MTEwODE2MjAz +M1owbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDIxEzARBgNVBAgMClNvbWUt +U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsg +N4XcXCwQU9zT0Bekdy4aJZi0TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1E +onZy8kIvp1wtH6OCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKCdquYj +DGHqAHt+4PIDlw0h2UvuMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp +MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg +N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp +YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp +LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr +BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC +A0gAMEUCIQDpo5B0vvEJSax3YzOMfE8l0pfDUIKLdBWJVGeq0VLtIgIgVr0+4/0e +n+R+l1OVOLh2GirloOgbv5Ch5BQ2pQNAG2Y= +-----END CERTIFICATE----- diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user2.csr b/meerkat-common/src/test/resources/certs/enduser-certs/user2.csr new file mode 100644 index 0000000..bb3c2d0 --- /dev/null +++ b/meerkat-common/src/test/resources/certs/enduser-certs/user2.csr @@ -0,0 +1,9 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBOzCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx +ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMjBW +MBAGByqGSM49AgEGBSuBBAAKA0IABHvX+RUbIDeF3FwsEFPc09AXpHcuGiWYtE2q +Ge8erMla7Lt6/5du7G230A3RqPJ4UPLw57VtRKJ2cvJCL6dcLR+gADAKBggqhkjO +PQQDAgNJADBGAiEA6Ls/ojRaZT+u4YeOBYcPbRcJE3jSTe1Sm/lR7fDyEhMCIQCk +UOca+e2b8+CqM3CURBv6TqUMmZ3HeMRvEAxFPqOWSw== +-----END CERTIFICATE REQUEST----- diff --git a/meerkat-common/src/test/resources/certs/enduser-certs/user2.der b/meerkat-common/src/test/resources/certs/enduser-certs/user2.der new file mode 100644 index 0000000000000000000000000000000000000000..8e784093b249900ab82c852d5257c6e338711969 GIT binary patch literal 794 zcmXqLViq%KV%oESnTe5!iAjLbfQyYotIgw_EekV~L1UAlrhz&eb0`ZlkAiP%YEgD# zi9%R@NoHQUf@fYyYEf=#N@ik7s)Dnlf}x?XfgngJ2MWL72`${0w2gt>Wy(d-CGP0Tfr6X!KFH3R`OBLidO zC~;mRAlJYG$~DL{lroS2>1XB<49L&P0XYt2cV>Q`f)V+S5;qWqIEoL|Q3hcK0&MKy zAYx)(1!MycOjE+F?oy!-*mz3*Csm|EqyGruC+?tb7Z+2Jx zpPu(7cl!n2iz_}=1bq7Nd~2@DqOzh-PWsDZbmbQ}F`5}PF&Y{00Iii3W@P-&!eqc; zAPeI0v52vVESS6MnKDn}D~9U22cMXy^D5r-erF&Ll2&GsFc51H5#O}m-TLX1UpBXw z$@K@PC)Dn{u4%vxQozpwj7`=B;Lw*+qo`~hvA#t01me4gqr(^mZ8swk{1_djD z1ON)5L<2$q1fnR&U|n`@kTkW(@