-----BEGIN CERTIFICATE REQUEST-----
MIIB3TCCAUYCAQAwgYUxCzAJBgNVBAYTAmNuMQswCQYDVQQIEwJzaDELMAkGA1UE
BxMCc2gxETAPBgNVBAoTCFRvcGNoZWVyMREwDwYDVQQLEwhyZXNlYXJjaDERMA8G
A1UEAxMIcmVzZWFyY2gxIzAhBgkqhkiG9w0BCQEWFHl1YW4ubWtAdG9wY2hlZXIu
Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/iyAIUZ8S80u9OWSvCU0N
ifK0sRHaNrYXqLdrtzUDSLX2wYtU0x1W0dOA1196ZkaG5Tx+0gyjtFHkwwnIa949
nKiwWxIgi+puB9wC315aPo1tFrNNnuEcQ3bukT6SHKE7kx39gFypJ3NIuJxQ7ZS3
BS8VLkTGN9tg4TZBIHNo3wIDAQABoBcwFQYJKoZIhvcNAQkHMQgTBjExMTExMTAN
BgkqhkiG9w0BAQUFAAOBgQBXBwbuVo9SDrEiAR2rpVhsRLovch4e8SiX1c8MC/RO
nuFmwJogY1t7nmW2KyE5YZhZFGoqe9sYs5w/YyJV2X7nbEGgYu91jfx6YpXFtQSk
qAo0NgSkMzIsD5Yg6jJeCD2jT4w0ONiZ4JXyVsE0rUZPgJhhVrHPXU8m5/RgvBLY
mQ==
-----END CERTIFICATE REQUEST-----
|
openssl genrsa -des3 -out server.key 1024
-----------------
以上为产生密钥对,使用rsa算法,密钥长度为1024
openssl req -new -key server.key -out server.csr
-----------------
根据密钥对产生csr文件
|
keytool –genkey –alias testkey –keyalg RSA –keysize 1024 –dname “CN=200.31.23.71, OU=Support, O=SGE, L=shanghai, S=SH, C=CN” –keypass 888888 –keystore testkey.jks –storepass 888888
-----------------
可以看到用keytool产生csr文件的同时还产生了密钥对
keytool –certreq –alias support –sigalg “MD5withRSA” –file server.csr –keypass 888888 –keystore testkey.jks –storepass 888888
|
-----BEGIN CERTIFICATE REQUEST-----
MIIB3TCCAUYCAQAwgYUxCzAJBgNVBAYTAmNuMQ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0UeTDCchr3j2c
qLBbEiCL6m4H3ALfXlo+jW0Ws02e4RxDdu6RPpIcoTuTHf2AXKknc0i4nFDtlLcF
LxUuRMY322DhNkEgc2jfAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAcje3Y7aA6hYM
MfV8F3MXJufdVFj25X6SIyUac4giWGOasFDUwEdRCnJjDw4zQfNPa+j0P3DRPiSG
Gjd2ziOh9l6A3gqr02uzGTj3G/INLGrTvez9uLyKLlA89pyYF7dkBol8jqpu+C+b
25NIjNDf6lmiVUNhfUN3H5T0Y7dYxQc=
-----END CERTIFICATE-----
|
unable to eastablish chain from reply
|
keytool –import –alias rootca –trustcacerts –file ca.crt –keystore testkey.jks –storepass 888888
------------------------
按回车后根据提示键入[y]
|
keytool –import –alias testkey –trustcacerts –file server.crt –keystore testkey.jks –storepass 888888
------------------
这边的-alias后的别名必须和我们产生请求时用的别名一致
|
keytool –import –alias rootca –trustcacerts –file ca.crt –keystore ca.jks –storepass 888888
|
keytool –v –list –keystore testkey.jks
|
Keystore
类型: jks
Keystore
提供者: SUN
您的 keystore 包含 3 输入
别名名称: rootca
创建日期: 2007-9-3
输入类型: trustedCertEntry
Owner: [email protected], CN=research, OU=research, O=Topcheer,
L=sh, ST=sh, C=cn
发照者: [email protected], CN=research, OU=research, O=Topcheer
, L=sh, ST=sh, C=cn
序号: af562c92c9acaf7d
有效期间: Mon Sep 03 13:42:28 CST 2007 至: Thu Aug 31 13:42:28 CST 2017
认证指纹:
MD5
:48:31:ED:ED:DD:E4:5F:91:67:AC:B9:E4:69:47:15:3A
SHA1
: DF:E2:52:C1:96:E8:B7:6E:BF:74:C4:93:BF:D0:40:B4:3B:55:9A:CF
*******************************************
*******************************************
别名名称: testkey
创建日期: 2007-9-3
输入类型:KeyEntry
认证链长度: 1
认证 [1]:
Owner: CN=hp, OU=Topcheer, O=research, L=shanghai, ST=SH, C=CN
发照者: CN=hp, OU=Topcheer, O=research, L=shanghai, ST=SH, C=CN
序号: 46dba98c
有效期间: Mon Sep 03 14:28:28 CST 2007 至: Sun Dec 02 14:28:28 CST 2007
认证指纹:
MD5
:6C:6F:1E:53:C3:90:DF:85:21:99:50:C8:1E:45:8D:D6
SHA1
: 9F:81:FF:86:DE:D1:7C:66:4D:5F:FC:2C:F5:A0:80:05:C1:97:7E:52
*******************************************
*******************************************
别名名称: testkey
创建日期: 2007-9-3
输入类型: trustedCertEntry
Owner: CN=hp, OU=Topcheer, O=research, L=shanghai, ST=SH, C=CN
发照者: [email protected], CN=research, OU=research, O=Topcheer
, L=sh, ST=sh, C=cn
序号: 948cdbb67ee36665
有效期间: Mon Sep 03 14:29:59 CST 2007 至: Thu Aug 31 14:29:59 CST 2017
认证指纹:
MD5
:58:B5:11:16:1A:CA:BC:80:76:A7:8D:E1:12:AA:0C:EA
SHA1
: 84:DF:E5:97:62:30:62:60:99:FD:3F:AD:AA:D5:5C:40:4D:AC:28:52
*******************************************
*******************************************
|
openssl genrsa -des3 -out ca.key 1024
|
openssl req -new -key ca.key -out ca.csr
|
openssl x509 -req -days 3650 -signkey ca.key-in ca.csr -out ca.crt
|
keytool –genkey –alias testkey –keyalg RSA –keysize 1024 –dname “CN=200.31.23.71, OU=Support, O=SGE, L=shanghai, S=SH, C=CN” –keypass 888888 –keystore testkey.jks –storepass 888888
|
keytool –certreq –alias support –sigalg “MD5withRSA” –file server.csr –keypass 888888 –keystore testkey.jks –storepass 888888
|
openssl x509 -req -in server.csr -out server.crt -CA ca.crt -CAkey ca.key -days 3650 -CAcreates
erial -sha1 -trustout -CA ca.crt -CAkey ca.key -days 3650 -CAserial ca.srl -sha1 -trustout
|
keytool –import –alias rootca –trustcacerts –file ca.crt –keystore testkey.jks –storepass 888888
keytool –import –alias testkey –trustcacerts –file server.crt –keystore testkey.jks –storepass 888888
keytool –import –alias rootca –trustcacerts –file ca.crt –keystore ca.jks –storepass 888888
|
http://support.bea.com/askbea_soln/attachments/S-22841/Configure_Keystore_SSL_WLS81_viewlet_swf.html
|
%JAVA_HOME%/bin/java -cp %WEBLOGIC_CLASSPATH% weblogic.Admin FORCESHUTDOWN -url %ADMIN_URL% %UIDPWD% %SERVER_NAME% 2>&1
|
Dweblogic.security.TrustKeyStore=CustomTrust
Dweblogic.security.CustomTrustKeyStoreFileName="/bea/ssl/testkey.jks"
|
%JAVA_HOME%/bin/java -cp %WEBLOGIC_CLASSPATH% -Dweblogic.security.TrustKeyStore=CustomTrust -Dweblogic.security.CustomTrustKeyStoreFileName="/bea/ssl/testkey.jks" weblogic.Admin FORCESHUTDOWN -url %ADMIN_URL% %UIDPWD% %SERVER_NAME% 2>&1
|
ts://169.181.242.35:7002
|
t3s://
主机名:7002
|