windows 下unable to load config info from/usr/local/ssl/openssl.cn

生成key

openssl genrsa -out openssl.key 1024 #生產1024位長度的rsa密鑰
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus
.....++++++
......++++++
e is 65537 (0x10001)

生成cer證書

openssl  req -config "D:\Program Files (x86)\GnuWin32\share\openssl.cnf" -new -x509 -key openssl.key -out openssl.cer  -days 3650 -subj /CN=yayun.website #openssl.key爲之前生成的key的名字,openssl.cer爲生成的證書名字,3650爲證書過期天數,CN的參數是的你主機名或者IP地址。不指定config會報標題中錯誤。
Loading 'screen' into random state - done

生成pfx證書

openssl pkcs12 -export -out openssl.pfx -inkey openssl.key -in openssl.cer #會提示設置密碼
Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章