Skip to content

Commit

Permalink
add testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
fate0 committed May 31, 2020
1 parent 25fd534 commit ba84934
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/client/testdata/ca-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDCKZiW/gDKygWST6H2EWbSnln/DeaTA9tZzExaPjhGLeluQAY+2k24c
qo4fM4LouV+gBwYFK4EEACKhZANiAAQkLBpmhd9cRaPGV5PXca0MZTb9u98KJusf
NRElfAyKDLrQ8jPEaN7i0uVHeK7gwAGEWsSUhmUC+0YF78jZosaecZiNZ71AgJZ7
2DKij0x9PLrGfQmSOPtjzxqWbKmgzt8=
-----END EC PRIVATE KEY-----
15 changes: 15 additions & 0 deletions pkg/client/testdata/ca.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-----BEGIN CERTIFICATE-----
MIICaDCCAe6gAwIBAgIUeox07oT2mMosFiT0SIpi5G+wcngwCgYIKoZIzj0EAwMw
ajELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh
biBGcmFuY2lzY28xEjAQBgNVBAoTCWNhc3Nvd2FyeTEaMBgGA1UECxMRQ2Fzc293
YXJ5IFRlc3RpbmcwIBcNMjAwNTMxMDUxNDAwWhgPMjEyMDA1MDcwNTE0MDBaMGox
CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g
RnJhbmNpc2NvMRIwEAYDVQQKEwljYXNzb3dhcnkxGjAYBgNVBAsTEUNhc3Nvd2Fy
eSBUZXN0aW5nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEJCwaZoXfXEWjxleT13Gt
DGU2/bvfCibrHzURJXwMigy60PIzxGje4tLlR3iu4MABhFrElIZlAvtGBe/I2aLG
nnGYjWe9QICWe9gyoo9MfTy6xn0Jkjj7Y88almypoM7fo1MwUTAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUIccCwpEWbeI0v2vEhPf4
ONBdr68wDwYDVR0RBAgwBocEfwAAATAKBggqhkjOPQQDAwNoADBlAjEA5xrv47yu
jUHorUWBJVMhDnUyav55W052ho0fNGB4cRgoFAXUX4teVgvLzrnVGRZUAjBaHyhK
ojG8Pg/iJnJNzmCgyJW1dKZTyskifuW28JRyM6LgnOYT5tGT9yH6g10UjvA=
-----END CERTIFICATE-----
19 changes: 19 additions & 0 deletions pkg/client/testdata/ca_csr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"hosts" : ["127.0.0.1"],
"key": {
"algo": "ecdsa",
"size": 384
},
"ca": {
"expiry": "876000h"
},
"names": [
{
"C": "US",
"L": "San Francisco",
"O": "cassowary",
"OU": "Cassowary Testing",
"ST": "California"
}
]
}
6 changes: 6 additions & 0 deletions pkg/client/testdata/client-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDAc90Blw/NfCnWMXTC4Dbo5+LaA4evCIIfZDbPaI7UVz6UwTBsEFGK/
/rWIEskJOO+gBwYFK4EEACKhZANiAARTfENUulB4IBZPQFORPmyErND774l+jH4V
JiKPLENCCUKHUDNih+skoincGS2fLjTplrC/ZLACeuvsevr0czcaH0MTkL3aA5FT
9RNbgBMcKKkqC/DtJZ+imr6RwGu3iow=
-----END EC PRIVATE KEY-----
16 changes: 16 additions & 0 deletions pkg/client/testdata/client.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICejCCAgCgAwIBAgIUWpA0KuqhONq0Q7xJwp/vXdMdnC4wCgYIKoZIzj0EAwMw
ajELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh
biBGcmFuY2lzY28xEjAQBgNVBAoTCWNhc3Nvd2FyeTEaMBgGA1UECxMRQ2Fzc293
YXJ5IFRlc3RpbmcwIBcNMjAwNTMxMDUxNDAwWhgPMjEyMDA1MDcwNTE0MDBaMGox
CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g
RnJhbmNpc2NvMRIwEAYDVQQKEwljYXNzb3dhcnkxGjAYBgNVBAsTEUNhc3Nvd2Fy
eSBUZXN0aW5nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEU3xDVLpQeCAWT0BTkT5s
hKzQ+++Jfox+FSYijyxDQglCh1AzYofrJKIp3Bktny406Zawv2SwAnrr7Hr69HM3
Gh9DE5C92gORU/UTW4ATHCipKgvw7SWfopq+kcBrt4qMo2UwYzAOBgNVHQ8BAf8E
BAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4E
FgQUu8dTMk2IWBGGnTG6KWvVnPzFEHUwDwYDVR0RBAgwBocEfwAAATAKBggqhkjO
PQQDAwNoADBlAjBfb1Ts88t8kd8nU4/eSVeKRR91VQI/uOIxNVHDuOsyBinx0jgh
eZ+MfZZ/exv319ICMQC0plJI7JSB+lDHbmIEYOiXZUXbONZkbO9ALRRMTqxzh00S
vAju6beNGIFpwQ/q7dg=
-----END CERTIFICATE-----
16 changes: 16 additions & 0 deletions pkg/client/testdata/csr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosts" : ["127.0.0.1"],
"key": {
"algo": "ecdsa",
"size": 384
},
"names": [
{
"C": "US",
"L": "San Francisco",
"O": "cassowary",
"OU": "Cassowary Testing",
"ST": "California"
}
]
}
4 changes: 4 additions & 0 deletions pkg/client/testdata/gencert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cfssl gencert -initca ca_csr.json |cfssljson -bare ca
cfssl gencert -ca ca.pem -ca-key ca-key.pem -config signing.json -profile client csr.json |cfssljson -bare client
cfssl gencert -ca ca.pem -ca-key ca-key.pem -config signing.json -profile server csr.json |cfssljson -bare server
rm *.csr
6 changes: 6 additions & 0 deletions pkg/client/testdata/server-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDAN6AKzYbaqN9dm5YsDP4qFF0m+jM2lbodOsvmwpYryEhtoq9NuWBKr
s7ycpCBd/N+gBwYFK4EEACKhZANiAAQ1+v02VGuU/Ld5sRQG/vVf9hcAUUA+dqoe
zooZ3Af4yJagE8jCtfG/yXZTmJpYmAKGI8USRdVGG5EL1bS6DULhItaLOVFTlLvC
QJjaZWTI1YGVZgboH0dS+i6XB4O0H70=
-----END EC PRIVATE KEY-----
16 changes: 16 additions & 0 deletions pkg/client/testdata/server.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICejCCAgCgAwIBAgIUJvol07hW1JSVOf3K8XPYEQW/KSAwCgYIKoZIzj0EAwMw
ajELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh
biBGcmFuY2lzY28xEjAQBgNVBAoTCWNhc3Nvd2FyeTEaMBgGA1UECxMRQ2Fzc293
YXJ5IFRlc3RpbmcwIBcNMjAwNTMxMDUxNDAwWhgPMjEyMDA1MDcwNTE0MDBaMGox
CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4g
RnJhbmNpc2NvMRIwEAYDVQQKEwljYXNzb3dhcnkxGjAYBgNVBAsTEUNhc3Nvd2Fy
eSBUZXN0aW5nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAENfr9NlRrlPy3ebEUBv71
X/YXAFFAPnaqHs6KGdwH+MiWoBPIwrXxv8l2U5iaWJgChiPFEkXVRhuRC9W0ug1C
4SLWizlRU5S7wkCY2mVkyNWBlWYG6B9HUvoulweDtB+9o2UwYzAOBgNVHQ8BAf8E
BAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADAdBgNVHQ4E
FgQUHGnd67JENhm/66BAP4vQkBuMpS8wDwYDVR0RBAgwBocEfwAAATAKBggqhkjO
PQQDAwNoADBlAjEA1fY2EeJuqZYu08Fr718nUPgcuPUXmaPFA07X5Zabhch5ciUU
4I1izXoLGC3j1x/KAjAzUIqldhF3eGcyuNa9E1k/XO2MAkfoMN2M2DlKSJOFSv6Q
ROesXoL+5ecGGzBv12s=
-----END CERTIFICATE-----
32 changes: 32 additions & 0 deletions pkg/client/testdata/signing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"signing": {
"default": {
"expiry": "876000h",
"usages": [
"signing",
"key encipherment",
"server auth",
"client auth"
]
},
"profiles": {
"client": {
"expiry": "876000h",
"usages": [
"signing",
"key encipherment",
"client auth"
]
},

"server": {
"expiry": "876000h",
"usages": [
"signing",
"key encipherment",
"server auth"
]
}
}
}
}

0 comments on commit ba84934

Please sign in to comment.