-
Notifications
You must be signed in to change notification settings - Fork 900
TLS 1.2 CertificateVerify: validate sig alg matches peer key #9395
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
base: master
Are you sure you want to change the base?
Conversation
|
🛟 Devin Lifeguard found 1 likely issues in this PR
@SparkiDev |
|
SetDigest is void return. |
74399cf to
babc5d3
Compare
|
Hi Sean, The updated code correctly prevents the CertificateVerify message that uses the DSA+SHA1 algorithm. Would it be possible to compare the signature and hash algorithms in the CertificateVerify message against the server-supported algorithms listed in the CertificateRequest message (e.g., According to RFC 5246, "The hash and signature algorithms used in the signature MUST be one of those present in the supported_signature_algorithms field of the CertificateRequest message." |
|
Would be great if there was some tests in place to check that mismatches error out the tls stack. |
Don't proceed with parsing CertificateVerify message in TLS 1.2 if the signature algorithm doesn't match the peer's key (key from client certificate).
bbe4771 to
a273a13
Compare
The signature algorithm specified in CertificateVerify must have been in the CertificateRequest. Add check. The cipher suite test cases, when client auth and RSA are built-in and use the default client certificate and use the *-ECDSA-* cipher suites, no longer work. The client certificate must be ECC when the cipher suite has ECDSA. Don't run them for that build.
a273a13 to
b73e5bf
Compare
|
I’ve reviewed the latest commit, and the server correctly validates that the signature/hash algorithm in the CertificateVerify message matches one of the algorithms listed in the CertificateRequest message. Thanks for the quick and thorough fix! |
Description
Don't proceed with parsing CertificateVerify message in TLS 1.2 if the signature algorithm doesn't match the peer's key (key from client certificate).
Fixes zd#20771
Testing
Tested enabling/disabling RSA, ECC, Ed25519 and Ed448 in all combinations.
Checklist