OpenSSL是一個開源的工具集和庫,在Linux系統上廣泛應用于多種安全相關的場景。以下是OpenSSL在Linux上的常見應用場景:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
命令生成自簽名的X.509證書和私鑰。openssl x509 -in cert.pem -text -noout
命令查看證書詳細信息。openssl s_server -key key.pem -cert cert.pem -accept 4433
命令啟動一個簡單的SSL/TLS服務器。openssl enc -aes-256-cbc -salt -in plaintext.txt -out encrypted.enc
命令加密文件。openssl dgst -sha256 -sign private-key.pem -out signature.sig data.txt
命令創建數字簽名。openssl req -new -key key.pem -out csr.pem
生成CSR文件。openssl req -x509 -newkey rsa:4096 -keyout root-key.pem -out root-cert.pem -days 3650
生成自簽名根證書。OpenSSL在Linux系統上的應用非常廣泛,從基本的證書管理到復雜的網絡通信安全,它都提供了強大的支持。