用于ssl服务器的Linux命令行?

Mec*_*ara 7 linux ssl command-line-interface

我总是使用套接字命令行工具对正在编写的程序进行快速套接字测试。 http://w21.org/jnickelsen/socket/

我想知道是否有类似的命令行工具来设置快速的ssl套接字客户端/服务器来测试事情。

编辑:简单答案

因此,对于可能会想知道同一件事的人来说,这很容易:

如果要成为客户端,请使用openssl的s_client:

openssl s_client -connect host:port
Run Code Online (Sandbox Code Playgroud)

如果要成为服务器,请使用openssl的s_server:

openssl s_server -accept <port> -key <keyfile> -cert <certfile>
Run Code Online (Sandbox Code Playgroud)

服务器使用的“快速和脏”证书和密钥:

openssl req -x509 -nodes -days 365 -newkey rsa -keyout keyfile.key -out certfile.crt
Run Code Online (Sandbox Code Playgroud)

小智 3

快速 SSL 客户端:

openssl s_client -connect <host>:<port>
Run Code Online (Sandbox Code Playgroud)

快速 SSL 服务器:

openssl s_server -accept <port> 
Run Code Online (Sandbox Code Playgroud)