單機 xampp 建立 ssl https連線方式

# Step1 產生一組沒有加密的 2048 bits 私密金鑰(PK: Private Key)
openssl genrsa -out server.key 2048

# Step2 產生憑證簽署請求(CSR: Certificate Signing Request)
# /C=Country 國別 
# /ST=State 州
# /L=Location 地區
# /O=Organization 組織
# /OU=Organizational Unit 組織部門單位
# /CN=Common Name 網域名稱
openssl req -sha512 -new -key server.key -out server.csr -subj "/C=TW/ST=Taipei/L=Taipei/O=example/OU=Personal/CN=www.example.com"

# Step3 檢查 CSR,列出請求內部資料(可省略)
openssl req -in server.csr -noout -text

# Step4 建立自我簽署的憑證(Self-Sign Certificate)
openssl x509 -sha512 -req -days 3650 -in server.csr -signkey server.key -out server.crt

 
 

資料來源: 如何建立 OpenSSL Self-Sign Certificate https://dev.twsiyuan.com/2016/01/self-sign-certificate.html

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *