зеркало из https://github.com/microsoft/msquic.git
Interop runner support for Version 2 (#2887)
This commit is contained in:
Родитель
792140022c
Коммит
80f4742d50
|
@ -6,7 +6,7 @@
|
|||
if [ -n "$TESTCASE" ]; then
|
||||
case "$TESTCASE" in
|
||||
# TODO: add supported test cases here
|
||||
"versionnegotiation"|"handshake"|"resumption"|"zerortt"|"transfer"|"retry"|"multiconnect"|"keyupdate"|"chacha20")
|
||||
"versionnegotiation"|"handshake"|"resumption"|"zerortt"|"transfer"|"retry"|"multiconnect"|"keyupdate"|"chacha20"|"v2")
|
||||
;;
|
||||
*)
|
||||
exit 127
|
||||
|
@ -59,6 +59,9 @@ if [ "$ROLE" == "client" ]; then
|
|||
CLIENT_PARAMS="-test:U $CLIENT_PARAMS"
|
||||
;;
|
||||
"chacha20")
|
||||
CLIENT_PARAMS="-test:A $CLIENT_PARAMS"
|
||||
;;
|
||||
"v2")
|
||||
CLIENT_PARAMS="-test:2 $CLIENT_PARAMS"
|
||||
;;
|
||||
*)
|
||||
|
@ -93,6 +96,9 @@ elif [ "$ROLE" == "server" ]; then
|
|||
"retry")
|
||||
SERVER_PARAMS="-retry:1 $SERVER_PARAMS"
|
||||
;;
|
||||
"v2")
|
||||
SERVER_PARAMS="-enablevne:1 $SERVER_PARAMS"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -771,6 +771,23 @@ RunInteropTest(
|
|||
CredConfig.AllowedCipherSuites = QUIC_ALLOWED_CIPHER_SUITE_CHACHA20_POLY1305_SHA256;
|
||||
}
|
||||
|
||||
if (Feature == Version2) {
|
||||
uint32_t Versions[] = {QUIC_VERSION_1_H, QUIC_VERSION_2_H};
|
||||
QUIC_VERSION_SETTINGS VersionSettings;
|
||||
VersionSettings.AcceptableVersions =
|
||||
VersionSettings.FullyDeployedVersions =
|
||||
VersionSettings.OfferedVersions = Versions;
|
||||
VersionSettings.AcceptableVersionsLength =
|
||||
VersionSettings.FullyDeployedVersionsLength =
|
||||
VersionSettings.OfferedVersionsLength = ARRAYSIZE(Versions);
|
||||
VERIFY_QUIC_SUCCESS(
|
||||
MsQuic->SetParam(
|
||||
Configuration,
|
||||
QUIC_PARAM_CONFIGURATION_VERSION_SETTINGS,
|
||||
sizeof(VersionSettings),
|
||||
&VersionSettings));
|
||||
}
|
||||
|
||||
VERIFY_QUIC_SUCCESS(
|
||||
MsQuic->ConfigurationLoadCredential(
|
||||
Configuration,
|
||||
|
@ -800,7 +817,8 @@ RunInteropTest(
|
|||
case Resumption:
|
||||
case StatelessRetry:
|
||||
case PostQuantum:
|
||||
case ChaCha20: {
|
||||
case ChaCha20:
|
||||
case Version2: {
|
||||
const uint8_t* ResumptionTicket = nullptr;
|
||||
uint32_t ResumptionTicketLength = 0;
|
||||
if (Feature == Resumption) {
|
||||
|
@ -827,6 +845,8 @@ RunInteropTest(
|
|||
Success = Connection.Shutdown();
|
||||
} else if (Feature == Resumption) {
|
||||
Success = Connection.Resumed;
|
||||
} else if (Feature == Version2) {
|
||||
Success = (QuicVersionUsed == QUIC_VERSION_2_H);
|
||||
} else {
|
||||
Success = true;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include "msquichelper.h"
|
||||
#include "quic_versions.h"
|
||||
#include "quic_trace.h"
|
||||
|
||||
//
|
||||
|
@ -31,10 +32,11 @@ enum QuicTestFeature {
|
|||
CidUpdate = 0x0200,
|
||||
NatRebinding = 0x0400,
|
||||
Datagram = 0x0800,
|
||||
ChaCha20 = 0x1000
|
||||
ChaCha20 = 0x1000,
|
||||
Version2 = 0x2000,
|
||||
};
|
||||
|
||||
#define QuicTestFeatureCodes "VHDCRZSQUMBG2"
|
||||
#define QuicTestFeatureCodes "VHDCRZSQUMBGA2"
|
||||
|
||||
const uint32_t QuicTestFeatureCount = sizeof(QuicTestFeatureCodes) - 1;
|
||||
const uint32_t QuicTestFeatureAll = ((1 << QuicTestFeatureCount) - 1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче