Skip to content

test/common/ssl: check-in expired SSL certs to avoid OS X generation failure#2396

Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
turbinelabs:stephan/static-expired-cert
Jan 18, 2018
Merged

test/common/ssl: check-in expired SSL certs to avoid OS X generation failure#2396
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
turbinelabs:stephan/static-expired-cert

Conversation

@zuercher
Copy link
Member

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

…failure (fixes envoyproxy#2395)

Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
{
"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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove extra whitespace.

- **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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's .cfg, not .cnf.

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: move this before generation of ticket keys.

Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending @PiotrSikora approval.

@mattklein123 mattklein123 merged commit a32bc51 into envoyproxy:master Jan 18, 2018
@zuercher zuercher deleted the stephan/static-expired-cert branch January 19, 2018 00:04
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
…y#2396)

This increases release binary size from 34.58 MB to 48.41 MB.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
jpsim added a commit that referenced this pull request Nov 28, 2022
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>
jpsim added a commit that referenced this pull request Nov 29, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants