forked from Mbed-TLS/mbedtls
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adding tests for the compatibility mode with OpenSSL #350
Open
hannestschofenig
wants to merge
1
commit into
tls13-prototype
Choose a base branch
from
hannestschofenig-patch-8
base: tls13-prototype
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,7 @@ MODES="tls1_2 dtls1_2" | |
VERIFIES="NO YES" | ||
TYPES="ECDSA RSA PSK" | ||
FILTER="" | ||
BOXES="NO YES" | ||
# exclude: | ||
# - NULL: excluded from our default config | ||
# avoid plain DES but keep 3DES-EDE-CBC (mbedTLS), DES-CBC3 (OpenSSL) | ||
|
@@ -97,6 +98,7 @@ print_usage() { | |
printf " -p|--peers\tWhich peers to use (Default: '%s')\n" "$PEERS" | ||
printf " \tAlso available: GnuTLS (needs v3.2.15 or higher)\n" | ||
printf " -M|--memcheck\tCheck memory leaks and errors.\n" | ||
printf " -C|--compatibility\tTest TLS 1.3 compatibility mode (Default: '%s')\n" "$BOXES" | ||
printf " -v|--verbose\tSet verbose output.\n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we sort the options alphabetically? If so we might want to move the help for |
||
} | ||
|
||
|
@@ -118,6 +120,9 @@ get_options() { | |
-V|--verify) | ||
shift; VERIFIES=$1 | ||
;; | ||
-C|--compatibility) | ||
shift; BOXES=$1 | ||
;; | ||
-p|--peers) | ||
shift; PEERS=$1 | ||
;; | ||
|
@@ -903,6 +908,16 @@ setup_arguments() | |
G_CLIENT_ARGS="-p $PORT --debug 3 $G_MODE" | ||
G_CLIENT_PRIO="NONE:$G_PRIO_MODE:+COMP-NULL:+CURVE-ALL:+SIGN-ALL" | ||
|
||
|
||
if [ "X$BOX" = "XNO" ]; | ||
then | ||
if [ `minor_ver "$MODE"` -ge 4 ] | ||
then | ||
O_SERVER_ARGS="$O_SERVER_ARGS -no_middlebox" | ||
O_CLIENT_ARGS="$O_CLIENT_ARGS -no_middlebox" | ||
fi | ||
fi | ||
|
||
if [ "X$VERIFY" = "XYES" ]; | ||
then | ||
M_SERVER_ARGS="$M_SERVER_ARGS ca_file=data_files/test-ca_cat12.crt auth_mode=required" | ||
|
@@ -1299,27 +1314,28 @@ trap cleanup INT TERM HUP | |
for VERIFY in $VERIFIES; do | ||
for MODE in $MODES; do | ||
for TYPE in $TYPES; do | ||
for PEER in $PEERS; do | ||
for BOX in $BOXES; do | ||
for PEER in $PEERS; do | ||
|
||
setup_arguments | ||
setup_arguments | ||
|
||
case "$PEER" in | ||
case "$PEER" in | ||
|
||
[Oo]pen*) | ||
[Oo]pen*) | ||
|
||
if test "$OSSL_NO_DTLS" -gt 0 && is_dtls "$MODE"; then | ||
continue; | ||
fi | ||
if test "$OSSL_NO_DTLS" -gt 0 && is_dtls "$MODE"; then | ||
continue; | ||
fi | ||
|
||
reset_ciphersuites | ||
if [ `minor_ver "$MODE"` -ge 4 ] | ||
then | ||
M_CIPHERS="$M_CIPHERS \ | ||
TLS1-3-AES-128-GCM-SHA256 \ | ||
TLS1-3-AES-256-GCM-SHA384 \ | ||
TLS1-3-AES-128-CCM-SHA256 \ | ||
TLS1-3-AES-128-CCM-8-SHA256 \ | ||
TLS1-3-CHACHA20-POLY1305-SHA256 \ | ||
TLS1-3-AES-128-GCM-SHA256 \ | ||
TLS1-3-AES-256-GCM-SHA384 \ | ||
TLS1-3-AES-128-CCM-SHA256 \ | ||
TLS1-3-AES-128-CCM-8-SHA256 \ | ||
TLS1-3-CHACHA20-POLY1305-SHA256 \ | ||
" | ||
O_CIPHERS="$O_CIPHERS \ | ||
TLS_AES_128_GCM_SHA256 \ | ||
|
@@ -1438,8 +1454,8 @@ for VERIFY in $VERIFIES; do | |
exit 1 | ||
;; | ||
|
||
esac | ||
|
||
esac | ||
done | ||
done | ||
done | ||
done | ||
|
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.
Curious: why not use
-c
? I don't think it is used yet.