This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
forked from openssl/openssl
-
Notifications
You must be signed in to change notification settings - Fork 126
Enable client auth using Picnic #20
Closed
christianpaquin
wants to merge
1
commit into
open-quantum-safe:OpenSSL_1_0_2-stable
from
christianpaquin:cp-fix-client-auth-with-picnic
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm a little reluctant to remove a bounds check... such is the way to another heartbleed. Have you been able to trace back which function is calling this function in the context where it triggers this issue, and see what max value is being provided and why it's that particular max value?
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.
Agreed, not the best idea to simply remove checks. TLS1.2 mandates a max fragment size of 16384 = 2^14. For some reason, the client-size record is not fragmented properly (unlike the server-side one). This is a work around to enable testing with client-side Picnic certs. The error is triggered in 3 locations: twice in s3_clnt where 16384 is passed as the max value to ssl_get_message, and once in s3_srvr where the max value is specified by SSL3_RT_MAX_PLAIN_LENGTH = 16384.
The proper resolution would be to figure out how to properly fragment records. We can leave this as an open PR for now to unblock folks who'd like to enable client-side auth (but I'll resubmit another PR for the other modified file).
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 wonder if it is worth doing a resync with upstream before trying to do this -- there's a chance that they've fixed this bug.
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'll take a look.
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.
Meanwhile, I've created another PR for the CA cert fix; see #21. We can merge that separately.
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 sync'ed with OpenSSL upstream, pulling changes from 1.0.2o-dev. It doesn't solve the problem, and on top of that, it breaks Picnic cert issuance.