• home
  • about
  • 全ての投稿
  • ソフトウェア・ハードウェアの設定のまとめ
  • 分析関連のまとめ
  • ヘルスケア関連のまとめ
  • 生涯学習関連のまとめ

openssl

date: 2021-12-15 excerpt: opensslの使い方

tag: linuxopenssl


opensslの設定と使い方

概要

  • openssl - OpenSSL command line tool

##

RSA暗号の作成

$ openssl genrsa -out <private-key> <bit-length>

パスフレーズの設定

$ openssl genrsa -out <private-key> -des3 <bit-length>

公開鍵の作成

$ openssl rsa -in <private-key> -pubout -out <public-key>

証明書要求の作成

$ openssl req -new -key <private-key> -out <server-csr>

サーバ証明書の作成

$ openssl x509 -req -in <server-csr> -signkey <private-key> -out <server-crt>

tlsサーバへ接続

$ openssl s_client -connect www.example.com:443

証明書チェインを表示

$ openssl s_client -connect www.example.com:443 -showcerts < /dev/null

tlsサーバの起動

$ openssl s_server -cert <server-crt> -key <private-key>

参考

  • opensslコマンドの使い方


linuxopenssl Share Tweet