Add alpn to server tls and fix interop test script
This commit is contained in:
@@ -12,8 +12,12 @@ esac
|
|||||||
ARG="${1:-""}"
|
ARG="${1:-""}"
|
||||||
SERVER="tonic-interop/bin/server_${OS}_amd64"
|
SERVER="tonic-interop/bin/server_${OS}_amd64"
|
||||||
|
|
||||||
|
# TLS_CA="tonic-interop/data/ca.pem"
|
||||||
|
TLS_CRT="tonic-interop/data/server1.pem"
|
||||||
|
TLS_KEY="tonic-interop/data/server1.key"
|
||||||
|
|
||||||
# run the test server
|
# run the test server
|
||||||
./"${SERVER}" $ARG &
|
./"${SERVER}" $ARG --tls_cert_file $TLS_CRT --tls_key_file $TLS_KEY &
|
||||||
SERVER_PID=$!
|
SERVER_PID=$!
|
||||||
echo ":; started grpc-go test server."
|
echo ":; started grpc-go test server."
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ impl TlsAcceptor {
|
|||||||
|
|
||||||
let mut config = SslAcceptor::mozilla_modern(SslMethod::tls())?;
|
let mut config = SslAcceptor::mozilla_modern(SslMethod::tls())?;
|
||||||
|
|
||||||
|
config.set_alpn_protos(ALPN_H2)?;
|
||||||
config.set_private_key(&key)?;
|
config.set_private_key(&key)?;
|
||||||
config.set_certificate(&ca)?;
|
config.set_certificate(&ca)?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user