-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: add sslv2 client hello test #5011
base: main
Are you sure you want to change the base?
Conversation
#include "tests/s2n_test.h" | ||
#include "utils/s2n_safety.h" | ||
|
||
#define SERVER_CHAIN "/home/ubuntu/workspace/s2n-tls/tests/pems/permutations/rsae_pkcs_2048_sha256/server-chain.pem" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eww. Don't do this.
@@ -0,0 +1,145 @@ | |||
#include <openssl/err.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copyright header
################# sslv2 formatted client hello test ################### | ||
############################################################################ | ||
|
||
add_executable(s2n_sslv2_client_hello_handshake tests/integration_c/test_sslv2_handshake.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gate logic behind OpenSSL root and interning
|
||
int main() | ||
{ | ||
// Assert that we are pulling in the correct openssl header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix comment style
SSL_load_error_strings(); | ||
EXPECT_SUCCESS(s2n_init()); | ||
|
||
/* s2n-tls client w/ openssl server */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* s2n-tls client w/ openssl server */ | |
/* openssl client w/ s2n-tls server */ |
Resolved issues:
Part of #4585
Description of changes:
s2n-tls doesn't currently have any integration tests that do a full handshake with an SSLv2 formatted client hello. This PR adds a test.
This is done using an in-process test that handshakes over shared memory. This allows the test to run quickly, and also allows a high degree of observability (assertions can be fine grained). This is also useful because we need access to very specific configuration that would be painful to specify through the command line.
Testing:
New test. We confirm that the ClientHello is actually an SSLv2 client hello in the ClientHello callback.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.