Skip to content

Commit

Permalink
fix test cert creation, you can now recreate via makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
szuecs committed Jan 23, 2018
1 parent c58677e commit c3d49a5
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 61 deletions.
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,38 @@ build.docker:

build.push: build.docker
docker push "$(IMAGE):$(TAG)"

define TEST_CNF
[req]
default_bits = 2048
default_md = sha256
distinguished_name = req_distinguished_name
x509_extensions = x509_ext
req_extensions = v3_req
string_mask = utf8only
[req_distinguished_name]
commonName = Common Name (e.g. server FQDN or YOUR name)
commonName_default = /
[x509_ext]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer
basicConstraints = CA:TRUE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[v3_req]
subjectKeyIdentifier = hash
basicConstraints = CA:TRUE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = *.domain.name
IP.1 = 127.0.0.1
endef

recreate.ca: recreate.cnf
openssl req -config kubernetes/testdata/test.cnf -new -x509 -sha256 -nodes -keyout kubernetes/testdata/key.pem -days $$((10*365)) -out kubernetes/testdata/ca.crt -subj "/"
cp kubernetes/testdata/ca.crt kubernetes/testdata/cert.pem

export TEST_CNF
recreate.cnf:
@echo "$$TEST_CNF" > kubernetes/testdata/test.cnf
34 changes: 17 additions & 17 deletions kubernetes/testdata/ca.crt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDBzCCAe+gAwIBAgIRANxR1TqqRznal3Tp6JByI70wDQYJKoZIhvcNAQELBQAw
EjEQMA4GA1UEChMHQWNtZSBDbzAeFw0xNzAxMjIyMTI2NTJaFw0xODAxMjIyMTI2
NTJaMBIxEDAOBgNVBAoTB0FjbWUgQ28wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
gg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/Ab3NduK1xo4dRL2IOKVCSAoWtYyZyi9ayhWS+v6iXLutz30syNgHCS0
iM4cIaSiaSOtE4Bb2MauvRkrW9a02Ruy57IUBxxio/OpjHi7IZ4XMz5/PEImH/dV
8kp9fvqRidWgpUxbnwdf0j+7RXOQGFa+oVBHgWD97doZmsGJ0oXcsKjGTfrOaJDd
Qfu5FUqGO+dM0cfZ2CuTApWGgxy7+l4xyePQMwLFcb8pEXXV+W9oOx7CT8/1jGU6
mz2K9rFP54p0huekoSaWwXiqXInaff+PS+8aWwIDAQABo30wezAdBgNVHQ4EFgQU
txY94TeScd7WJKmL8yl6jKm0qLYwHwYDVR0jBBgwFoAUtxY94TeScd7WJKmL8yl6
jKm0qLYwDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCBeAwHgYDVR0RBBcwFYINKi5k
b21haW4ubmFtZYcEfwAAATANBgkqhkiG9w0BAQsFAAOCAQEAK27QBAgPNRsFYDQj
GXupo1vx6jP043TdrsZa6nRXR22tY+9JU+UWaxEOOpbuRqThdrIWAwSkbsqq37Jc
klbgLbJ5s6kAl+hIhZHRb2MHAUZ4AcZUXMm6Zr6zwEXhbI5qpxBbAXN708LbhBNE
xswmwsjzLxFkpKrm5jpeAcekVczWL7tPAGwqr7VIKeJYl0ag7Goyr11aKRMgXY+M
kimc3zhVCfEn/hjAftCXSQbvUKENP0LX1bgZ0zOmo9XnjkhECMsp91DwUkiYd6pS
6aVFgckgIlla6zvWHw7VIolzQOr6nLuO5XGMi5YbwzU5cTuNksUEjNKOdyNmn7h+
OrZMpA==
-----END CERTIFICATE-----
34 changes: 17 additions & 17 deletions kubernetes/testdata/cert.pem
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDBzCCAe+gAwIBAgIRANxR1TqqRznal3Tp6JByI70wDQYJKoZIhvcNAQELBQAw
EjEQMA4GA1UEChMHQWNtZSBDbzAeFw0xNzAxMjIyMTI2NTJaFw0xODAxMjIyMTI2
N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IIBCgKCAQEApY/B65k/O8DPNh76DPQk78XkJ/PD6qh7CO2Ih7lVh2YbW2xA
EucO7gN5/Ab3NduK1xo4dRL2IOKVCSAoWtYyZyi9ayhWS+v6iXLutz30syNgHCS0
iM4cIaSiaSOtE4Bb2MauvRkrW9a02Ruy57IUBxxio/OpjHi7IZ4XMz5/PEImH/dV
8kp9fvqRidWgpUxbnwdf0j+7RXOQGFa+oVBHgWD97doZmsGJ0oXcsKjGTfrOaJDd
Qfu5FUqGO+dM0cfZ2CuTApWGgxy7+l4xyePQMwLFcb8pEXXV+W9oOx7CT8/1jGU6
mz2K9rFP54p0huekoSaWwXiqXInaff+PS+8aWwIDAQABo30wezAdBgNVHQ4EFgQU
txY94TeScd7WJKmL8yl6jKm0qLYwHwYDVR0jBBgwFoAUtxY94TeScd7WJKmL8yl6
jKm0qLYwDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCBeAwHgYDVR0RBBcwFYINKi5k
b21haW4ubmFtZYcEfwAAATANBgkqhkiG9w0BAQsFAAOCAQEAK27QBAgPNRsFYDQj
GXupo1vx6jP043TdrsZa6nRXR22tY+9JU+UWaxEOOpbuRqThdrIWAwSkbsqq37Jc
klbgLbJ5s6kAl+hIhZHRb2MHAUZ4AcZUXMm6Zr6zwEXhbI5qpxBbAXN708LbhBNE
xswmwsjzLxFkpKrm5jpeAcekVczWL7tPAGwqr7VIKeJYl0ag7Goyr11aKRMgXY+M
kimc3zhVCfEn/hjAftCXSQbvUKENP0LX1bgZ0zOmo9XnjkhECMsp91DwUkiYd6pS
6aVFgckgIlla6zvWHw7VIolzQOr6nLuO5XGMi5YbwzU5cTuNksUEjNKOdyNmn7h+
OrZMpA==
-----END CERTIFICATE-----
55 changes: 28 additions & 27 deletions kubernetes/testdata/key.pem
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpgIBAAKCAQEAsu0d6Ug1sXpWMrFSbqRO0WDwdm+60LCQVKk2cn8a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