-
Notifications
You must be signed in to change notification settings - Fork 711
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: allow TLS1.2 with RSA-PSS certs in integ tests #4949
Conversation
d9dff8c
to
b2efd5c
Compare
b2efd5c
to
1b6544a
Compare
tests/integrationv2/common.py
Outdated
if self.algorithm == 'RSAPSS': | ||
if cipher.algorithm != 'RSA': | ||
return False | ||
if 'ECDHE' in cipher.name: | ||
return True |
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.
I assume this is the "hacky string comparisons", but I'm trying to understand the context here. Is RSA-PSS only compatible with ECDHE key exchange?
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.
RSA-PSS certs can't be used with RSA key exchange (that's what Sam was asking about here). That's because RSA-PSS certs can only be used for signing, not encryption, and RSA key exchange involves encryption. RSA-PSS certs are basically just RSA certs with safer usage rules.
But as I look at this again, checking for "ECDHE" is probably too restrictive. I'll relax it to "DHE". I can't go all the way to just checking for no "RSA", because 1) legacy cipher suites assume RSA without putting it in their names 2) "RSA" could also refer to the auth method instead of the kex method.
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.
Updated, and I updated the testing results in the description. And here's the result of only non-ECDHE:
$ cat signature_algorithms.out | grep ": PASSED " | grep pss_pss | grep TLS1.2 | grep -v ECDHE | wc -l
28
$ cat signature_algorithms.out | grep ": PASSED " | grep pss_pss | grep TLS1.2 | grep -v ECDHE
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-GCM-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-GCM-SHA384]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-CHACHA20-POLY1305]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-GCM-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-GCM-SHA384]
293: PASSED test_signature_algorithms.py::test_s2n_server_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-CHACHA20-POLY1305]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-GCM-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-GCM-SHA384]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-CHACHA20-POLY1305]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES128-GCM-SHA256]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-AES256-GCM-SHA384]
293: PASSED test_signature_algorithms.py::test_s2n_client_signature_algorithms[no-client-auth-rsa_pss_pss_sha256-RSA_PSS_2048_SHA256-TLS1.2-S2N-OpenSSL-DHE-RSA-CHACHA20-POLY1305]
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.
Very interesting. Thank you for explaining!
Release Summary:
Resolved issues:
tests #4927
Description of changes:
Our integration tests currently skip any combination of parameters that would negotiate RSA-PSS-PSS with TLS1.2. Now that we support RSA-PSS-PSS with TLS1.2, this change removes those restrictions.
Callouts
I'm sorry for the hacky string comparisons, but that's unfortunately how the integ tests currently work ;_;
Testing:
It's hard to confirm what tests we run, so I dumped the output of a successful test_s2n_client_signature_algorithms run into a file and searched it. It looks like:
The commands I ran, and the results:
That looks correct to me, given the full set of ciphers:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.