[OpenSSL] command line 명령으로 TLS 서버 실행하기

기본적으로 s_server 인자와 -accept 를 사용한다. cert파일과 key파일은 자체 인증서를 생성하든지, letsencrypt에서 얻든지 한다. https에 사용되는 인증서를 letsencrypt로부터 얻는 방법은 [TLS] Letsencrypt로부터 https 사용을 위한 인증서 얻기를 참고한다.

$ openssl s_server -accept 443 -key /etc/letsencrypt/live/blog.dasomoli.org/privkey.pem -cert /etc/letsencrypt/live/blog.dasomoli.org/fullchain.pem

-msg 를 사용하면 TLS 관련 메시지를 볼 수 있다. decrypted된 text만 보고 싶다면 -quiet 옵션을 주면 된다. stdout으로 출력된다.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다