Skip to content

Commit

Permalink
tests: fix certs on integration (new nginx with minimum size >1024 fo…
Browse files Browse the repository at this point in the history
…r RSA)
  • Loading branch information
morpheu authored and wpjunior committed Oct 18, 2024
1 parent 4c5a233 commit 9cdad02
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 27 deletions.
68 changes: 43 additions & 25 deletions examples/tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ stringData:
-----END PRIVATE KEY-----
---
# TLS certificate generated with:
# go run $(go env GOROOT)/src/crypto/tls/generate_cert.go -start-date 'Jan 1 00:00:00 2021' -duration 87600h -host www.example.com -rsa-bits 1024
# go run $(go env GOROOT)/src/crypto/tls/generate_cert.go -start-date 'Jan 1 00:00:00 2021' -duration 87600h -host www.example.com -rsa-bits 2048
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -87,32 +87,50 @@ type: kubernetes.io/tls
stringData:
tls.crt: |-
-----BEGIN CERTIFICATE-----
MIIB+jCCAWOgAwIBAgIQRLwc7m5PNh3qNWW9jbWIPzANBgkqhkiG9w0BAQsFADAS
MIIC/zCCAeegAwIBAgIQJKzZzFX2lwtGlsY/YDXhBDANBgkqhkiG9w0BAQsFADAS
MRAwDgYDVQQKEwdBY21lIENvMB4XDTIxMDEwMTAwMDAwMFoXDTMwMTIzMDAwMDAw
MFowEjEQMA4GA1UEChMHQWNtZSBDbzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
gYEAuZKXvIBthYPiXh1hBY8hJI8/uOLjushGDklmjI25Qfzs8TH6kPw647JXMMtr
5afvgg9oMpJYeoVkBXL21iFe/yba/scyVb6Q9gsPtxppXv1m3SsqVqPu7SQtnvxP
ikBKiz76M7bl35do/M5j9iaKqzY0qhhcQBtGWkppN/JamvUCAwEAAaNRME8wDgYD
VR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAw
GgYDVR0RBBMwEYIPd3d3LmV4YW1wbGUuY29tMA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k+EU5/LbBUBfyGMx/
+550VetiSYPOTxK1kNsafZzG5wab8izsf2DAmC65g0jr51w0bqtTy8FnAoGBAIKF
U4Hcxtxike4hhFK9KDmpCLTdO0YfwCrXe3LDj5kvwUSfHSD1XHePr+sUEOBUspgy
FecLfnp/k9Sz9aco+uTVnJFosaK63iWAkcnEjUzK0PZYTI+ssOrDBETMIDomLqUa
6DSmPCtXx70JPCCaaO6VoFvHA0C3WbK99xr9s5U1AoGAV+nyUxsoiX/OXHEvp5R8
8EPPm8B/lUWlVTLW0p3jpeG2R8tB/qh33M3MJmUjf5LBZOvbNBQPnVXNfWeo4p8N
gExPrJ6FMR5uzQ/rwc2Dhx3lxB/f2QaOhs8Zn/Nv8k6vwGxqrEG5T6IRmWp4It6u
mKlDHmDO7rr7LOAHAAd3NtA=
-----END PRIVATE KEY-----
4 changes: 2 additions & 2 deletions test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func Test_Operator(t *testing.T) {
}{
{
filename: "/etc/nginx/certs/my-rsa-cert/tls.crt",
expectedSha256: "6a95f3b95972f4beae4b54918498817d95f3d8cfb766c053cae656839e392430",
expectedSha256: "256bfbf7960e7f2fa4af64701a64525e794ffc4d6eab3d3ef79a0580a2f92fa5",
},
{
filename: "/etc/nginx/certs/my-rsa-cert/tls.key",
expectedSha256: "f8a6da5db392519513597345931237dbb1a0a28fb89b7ce3b41562f988f9ef67",
expectedSha256: "68694230fe7bca079f5b83549289b6fc65d3009803cc9100156147bbe8d62ff5",
},
{
filename: "/etc/nginx/certs/my-ecdsa-cert/tls.crt",
Expand Down

0 comments on commit 9cdad02

Please sign in to comment.