![]() |
Photo by Markus Winkler on Unsplash |
有時候更換憑證,要測試指定的加密法連線運作是否正常,其中最簡單的方法,便是使用 Openssl 所提供的連線工具即可。
Client 參數
- -msg:用16進位顯示所有協議數據包含 handshake
- -cipher:指定 cipher連線
- -showcerts:顯示 chain
- -curves:指定要用的橢圓算法,client hello的extension中的 elliptic_curves
- -sigalgs:指定交換 key要用的簽名方式,client hello的 extension 中的 signature_algorithms
- -debug 列印出所有是訊息
基本 Client連線指令:openssl s_client -connect [IP]:[port]
Server 參數
- -accept 聽的port
- -key 使用的KEY
- -cert 使用的憑證
基本 Server連線指令:openssl s_server -accept [port] -key server.key -cert server.pem
你可能還想要知道: