為您解碼網(wǎng)站建設(shè)的點(diǎn)點(diǎn)滴滴
發(fā)表日期:2016-12 文章編輯:小燈 瀏覽次數(shù):2630
SSL: error:0906406D:PEM routines:PEM_def_callback:problems getting password error:0907B068:PEM routines:PEM_READ_BIO_PRIVATEKEY:bad password read error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib
openssl rsa -in original.key -out unencripted.key
openssl req -new -x509 -keyout cakey.pem -out cacert.pem -config openssl.cnf
Enter PEM pass phrase: Verifying - Enter PEM pass phrase: ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:Zhejiang Locality Name (eg, city) []:Hangzhou Organization Name (eg, company) [Internet Widgits Pty Ltd]:Mintcode Organizational Unit Name (eg, section) []:Forstmourne Common Name (e.g. server FQDN or YOUR name) []:115.29.179.22 Email Address []:bellliu@mintcode.com
openssl.cnf
有相關(guān)配置)mkdir demoCA touch demoCA/index.html touch demoCA/serial
vim demoCA/serial
1000
openssl ca -in certreq.txt -out server.pem -cert cacert.pem -keyfile cakey.pem
Enter pass phrase for cakey.pem: Check that the request matches the signature Signature ok Certificate Details: Serial Number: 4097 (0x1001) Validity Not Before: Jul 24 02:07:43 2015 GMT Not After : Jul 23 02:07:43 2016 GMT Subject: countryName = CN stateOrProvinceName = Zhejiang organizationName= Mintcode organizationalUnitName= Forstmourne commonName= 115.29.179.22 X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: A3:72:4C:6D:5D:F9:64:C9:02:13:11:13:CF:C3:34:C1:DE:0B:BF:57 X509v3 Authority Key Identifier: keyid:81:40:30:DB:57:2C:D0:E8:9B:B1:51:D7:D5:71:F1:6C:16:E8:5A:DBCertificate is to be certified until Jul 23 02:07:43 2016 GMT (365 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated
openssl x509 -in server.pem -out server.cer
keystore
keytool -import -file server.cer -keystore server.keystore
openssl req -new -x509 -days 365000 -keyout cakey.key -out cacert.crt -config openssl.cnf
Generating a 2048 bit RSA private key .....................................+++ ..............+++ writing new private key to 'cakey.key' Enter PEM pass phrase: Verifying - Enter PEM pass phrase: ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:Zhejiang Locality Name (eg, city) []:Hangzhou Organization Name (eg, company) [Internet Widgits Pty Ltd]:Mintcode Organizational Unit Name (eg, section) []:Forstmourne Common Name (e.g. server FQDN or YOUR name) []:bell Email Address []:bellliu@mintcode.com
openssl req -new -keyout server.key -out server.csr
Generating a 2048 bit RSA private key ..............................................................................+++ .......+++ writing new private key to 'server.key' Enter PEM pass phrase: Verifying - Enter PEM pass phrase: ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:Zhejiang Locality Name (eg, city) []:Hangzhou Organization Name (eg, company) [Internet Widgits Pty Ltd]:Mintcode Organizational Unit Name (eg, section) []:Forstmourne Common Name (e.g. server FQDN or YOUR name) []:bell Email Address []:bell@mintcode.comPlease enter the following 'extra' attributes to be sent with your certificate request A challenge password []:mintcode An optional company name []:mintcode
mkdir demoCA cd demoCA mkdir newcerts touch index.txt echo '01' > serial cd ..
openssl ca -in server.csr -out server.crt -cert cacert.crt -keyfile cakey.key -config openssl.cnf
keytool -import -file server.crt -keystore server.keystore
crt
轉(zhuǎn)換為pem
openssl x509 -in server.crt -out server.pem -outform PEM
日期:2018-04 瀏覽次數(shù):6777
日期:2017-02 瀏覽次數(shù):3456
日期:2017-09 瀏覽次數(shù):3676
日期:2017-12 瀏覽次數(shù):3544
日期:2018-12 瀏覽次數(shù):4843
日期:2016-12 瀏覽次數(shù):4595
日期:2017-07 瀏覽次數(shù):13659
日期:2017-12 瀏覽次數(shù):3522
日期:2018-06 瀏覽次數(shù):4279
日期:2018-05 瀏覽次數(shù):4458
日期:2017-12 瀏覽次數(shù):3570
日期:2017-06 瀏覽次數(shù):3995
日期:2018-01 瀏覽次數(shù):3958
日期:2016-12 瀏覽次數(shù):3925
日期:2018-08 瀏覽次數(shù):4441
日期:2017-12 瀏覽次數(shù):3733
日期:2016-09 瀏覽次數(shù):6453
日期:2018-07 瀏覽次數(shù):3223
日期:2016-12 瀏覽次數(shù):3241
日期:2018-10 瀏覽次數(shù):3396
日期:2018-10 瀏覽次數(shù):3503
日期:2018-09 瀏覽次數(shù):3593
日期:2018-02 瀏覽次數(shù):3611
日期:2015-05 瀏覽次數(shù):3538
日期:2018-09 瀏覽次數(shù):3318
日期:2018-06 瀏覽次數(shù):3448
日期:2017-02 瀏覽次數(shù):3884
日期:2018-02 瀏覽次數(shù):4347
日期:2018-02 瀏覽次數(shù):4191
日期:2016-12 瀏覽次數(shù):3587
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.