test/common/ssl: check-in expired SSL certs to avoid OS X generation failure#2396
Conversation
…failure (fixes envoyproxy#2395) Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
test/common/ssl/context_impl_test.cc
Outdated
| { | ||
| "cert_chain_file": "{{ test_tmpdir }}/unittestcert_expired.pem", | ||
| "private_key_file": "{{ test_tmpdir }}/unittestkey_expired.pem" | ||
| "cert_chain_file": "{{ test_rundir }}/test/common/ssl/test_data/unittest_expired_cert.pem", |
There was a problem hiding this comment.
If you're going to move it to test data, then you should probably rename it to expired_{cert,key}.pem.
| - **Unit Test Expired**: A self-signed, expired certificate *unittest_expired_cert.pem*, | ||
| using the config *unittest_expired_cert.cnf*. *unitest_expired_key.pem* is its private | ||
| key. | ||
|
|
There was a problem hiding this comment.
Nit: remove extra whitespace.
test/common/ssl/test_data/README.md
Outdated
| - **Self-signed**: The self-signed certificate *selfsigned_cert.pem*, using the | ||
| config *selfsigned_cert.cfg*. *selfsigned_key.pem* is its private key. | ||
| - **Unit Test Expired**: A self-signed, expired certificate *unittest_expired_cert.pem*, | ||
| using the config *unittest_expired_cert.cnf*. *unitest_expired_key.pem* is its private |
test/common/ssl/test_data/certs.sh
Outdated
| openssl rand 80 > ticket_key_b | ||
| openssl rand 79 > ticket_key_wrong_len | ||
|
|
||
| # Generate unittest_expired_cert.pem (will fail on Mac OS 10.13+, see README.md). |
There was a problem hiding this comment.
The README.md doesn't really explain why it fails, so it's useless reference... Maybe just say that's because of negative -days parameter?
| @@ -0,0 +1,27 @@ | |||
| [ req ] | |||
There was a problem hiding this comment.
Could you copy one of the existing files in this directory, perhaps selfsigned_cert.cfg to match the style?
Alternatively, you could just use selfsigned_cert.cfg when generating cert.
test/common/ssl/test_data/certs.sh
Outdated
| openssl rand 80 > ticket_key_b | ||
| openssl rand 79 > ticket_key_wrong_len | ||
|
|
||
| # Generate unittest_expired_cert.pem (will fail on Mac OS 10.13+, see README.md). |
There was a problem hiding this comment.
Nit: move this before generation of ticket keys.
Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
htuch
left a comment
There was a problem hiding this comment.
LGTM pending @PiotrSikora approval.
…y#2396) This increases release binary size from 34.58 MB to 48.41 MB. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Mirroring what was done for Android in envoyproxy/envoy-mobile#2379 and leveraging the recent changes in Envoy in #21913. Risk Level: Moderate. Testing: Unit tests, integration tests & being exercised in the experimental app. Tested with the experimental app in the iOS Simulator and on an iPhone 13 Pro, verified that an IPv4 address gets mapped to a valid IPv6 address. Docs Changes: Added. Release Notes: Added. Signed-off-by: JP Simard <jp@jpsim.com>
Mirroring what was done for Android in envoyproxy/envoy-mobile#2379 and leveraging the recent changes in Envoy in #21913. Risk Level: Moderate. Testing: Unit tests, integration tests & being exercised in the experimental app. Tested with the experimental app in the iOS Simulator and on an iPhone 13 Pro, verified that an IPv4 address gets mapped to a valid IPv6 address. Docs Changes: Added. Release Notes: Added. Signed-off-by: JP Simard <jp@jpsim.com>
Fixes expired certification generation error that occurs on OS X starting with version 10.13.
Risk Level: Low
Testing: Fixes tests.
Docs Changes: Updated README.md in test/common/ssl/test_data to include information on regenerating the expired certificates, where possible.
Release Notes: N/A
Fixes: #2395
Signed-off-by: Stephan Zuercher stephan@turbinelabs.io