【发布时间】:2023-01-08 06:06:22
【问题描述】:
我想在 TLS 握手之前将 APLN 协议设置为 "h2" 和 "http/1.1"。我正在使用.set_alpn_protos()。但是,我的尝试在运行时产生错误:
context.set_alpn_protos(b"\x06h2\x08http/1.1").expect("set ALPN error");
thread 'main' panicked at 'set ALPN error: ErrorStack([])', src/checker/tls/get_tls_info.rs:58:56
我可以像这样在 Python 中成功设置它们:
ssl.set_alpn_protos([b'h2', b'http/1.1'])
我究竟做错了什么?
【问题讨论】:
标签: rust openssl h2 http-1.1 alpn