CentOS 7のOpenSSLはALPN無効(ALPNは1.0.2からだが、CentOS7のOpenSSLは1.0.1)
$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
- Firefoxは53(2017年2月頃)から、Chromeは51?から、NPNを無効化してALPNのみサポートしている
- OpenSSLのコマンドラインでは-alpnオプションを利用(cygwinを利用)
$ openssl s_client -connect www.google.com:443 -alpn h2
.....
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
ALPN protocol: h2
SSL-Session:
Protocol : TLSv1.2
.....
- NPNは-nextprotonegで確認
$ openssl s_client -connect www.google.com:443 -nextprotoneg ''
CONNECTED(00000003)
Protocols advertised by server: grpc-exp, h2, http/1.1
.....
OpenSSLのソースopenssl-1.0.2l.tar.gzを展開して置いておく
$ ./configure --prefix=/usr/local/nginx-1.12.1 --with-http_ssl_module --with-http_v2_module \
--with-http_realip_module --with-http_addition_module --with-http_auth_request_module \
--with-http_slice_module --with-http_stub_status_module \
--with-openssl=../openssl-1.0.2l/
curlでCipher固定できるので、RSA鍵をWiresharkに食わせておく
$ curl -k --ciphers AES256-SHA --http2 https://192.168.2.67/