-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Take the new bogo from rustls for TLS 1.3 draft 23
- Loading branch information
Yiming Jing
committed
Apr 9, 2018
1 parent
dda088a
commit ebc27c7
Showing
4 changed files
with
104 additions
and
92 deletions.
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# ISC License (ISC) | ||
# Copyright (c) 2016, Joseph Birr-Pixton <[email protected]> | ||
# | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for | ||
# any purpose with or without fee is hereby granted, provided that the | ||
# above copyright notice and this permission notice appear in all copies. | ||
# | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | ||
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | ||
|
@@ -19,7 +19,7 @@ | |
set -e | ||
|
||
# a known-good commit | ||
COMMIT=0a54e998481b0b5a8abd9717c5f7301a3b18b628 | ||
COMMIT=8a1a5daa490ee95be6ba1a5e076c2589977d057a | ||
|
||
rm -f runner.tar.gz | ||
wget https://boringssl.googlesource.com/boringssl/+archive/$COMMIT/ssl/test/runner.tar.gz | ||
|
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# ISC License (ISC) | ||
# Copyright (c) 2016, Joseph Birr-Pixton <[email protected]> | ||
# | ||
# | ||
# Permission to use, copy, modify, and/or distribute this software for | ||
# any purpose with or without fee is hereby granted, provided that the | ||
# above copyright notice and this permission notice appear in all copies. | ||
# | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | ||
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | ||
|
@@ -20,7 +20,7 @@ diff -ru original/runner.go bogo/runner.go | |
@@ -83,6 +83,14 @@ | ||
// like “SSL_ERROR_NO_CYPHER_OVERLAP”. | ||
ErrorMap map[string]string | ||
|
||
+ // TestErrorMap maps from full test names to the correct error | ||
+ // string for the shim in question. | ||
+ TestErrorMap map[string]string | ||
|
@@ -35,7 +35,7 @@ diff -ru original/runner.go bogo/runner.go | |
@@ -939,7 +947,11 @@ | ||
} | ||
} | ||
|
||
-func translateExpectedError(errorStr string) string { | ||
+func translateExpectedError(testName string, errorStr string) string { | ||
+ if translated, ok := shimConfig.TestErrorMap[testName]; ok { | ||
|
@@ -48,7 +48,7 @@ diff -ru original/runner.go bogo/runner.go | |
@@ -951,6 +963,14 @@ | ||
return errorStr | ||
} | ||
|
||
+func translateExpectedLocalError(testName string, localError string) string { | ||
+ if translated, ok := shimConfig.TestLocalErrorMap[testName]; ok { | ||
+ return translated | ||
|
@@ -62,12 +62,12 @@ diff -ru original/runner.go bogo/runner.go | |
defer func() { | ||
@@ -1215,15 +1235,16 @@ | ||
} | ||
|
||
failed := err != nil || childErr != nil | ||
- expectedError := translateExpectedError(test.expectedError) | ||
+ expectedError := translateExpectedError(test.name, test.expectedError) | ||
correctFailure := len(expectedError) == 0 || strings.Contains(stderr, expectedError) | ||
|
||
+ var expectedLocalError = translateExpectedLocalError(test.name, test.expectedLocalError) | ||
localError := "none" | ||
if err != nil { | ||
|
@@ -78,5 +78,5 @@ diff -ru original/runner.go bogo/runner.go | |
+ if len(expectedLocalError) != 0 { | ||
+ correctFailure = correctFailure && strings.Contains(localError, expectedLocalError) | ||
} | ||
if failed != test.shouldFail || failed && !correctFailure || mustFail { | ||
|
||
if failed != test.shouldFail || failed && !correctFailure || mustFail { |