伙计们,
我试图为JBOSS 5设置HTTPS,基本上以下是我的步骤:
使用keytool,我将需要的证书添加到C:...\jre\lib\security\cacerts文件中,并使用别名“”命名1)。
2) I验证证书添加正确,这是从新的仙人掌文件生成的.txt文件的摘录:
....
Nome alias: example
Data di creazione: 22-ott-2014
Tipo entry: trustedCertEntry
Proprietario: ST=Italy, L=Padova, EMAILADDRESS=dite.sistemi.middleware@infocamere.it, CN=*.intra.infocamere.it, OU=FTEC, O=InfoCamere S.C.p.A./02313821007, C=IT
Autorità emittente: CN=InfoCert Certification Authority TEST, OU=Internet Services, O=InfoCert SpA, C=IT
Numero di serie: 75d1
Valido da: Thu Sep 12 11:24:21 CEST 2013 a: Sat Jan 11 15:13:30 CET 2014
Impronte digitali certificato:
MD5: 68:C3:BE:D7:DB:2E:B6:08:B6:09:84:8F:7B:EE:26:43
SHA1: 36:CB:C3:98:36:CA:13:DF:DE:15:BA:42:9D:65:7D:B2:A5:BC:1C:A0
Nome algoritmo firma: SHA1withRSA
Versione: 3
...
D:\EnterprisePlatform-5.1.2\jboss-eap-5.1\jboss-as\server\all\conf\cacerts ( 3) --我将文件仙人掌复制到JBOSS目录中
D:\EnterprisePlatform-5.1.2\jboss-eap-5.1\jboss-as\server\all\deploy\jbossweb.sar\server.xml,(4)I取消注释文件,如下所示:
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/cacerts" keyAlias="example"
keystorePass="changeit" sslProtocol = "TLS" />
5)启动JBOSS,得到以下错误:
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.web.deployment:war=/admin-console" is missing the following dependencies:
Dependency "jboss.web:service=WebServer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.web:service=WebServer' **")
Deployment "jboss.web.deployment:war=/invoker" is missing the following dependencies:
Dependency "jboss.web:service=WebServer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.web:service=WebServer' **")
Deployment "jboss.web.deployment:war=/jbossws" is missing the following dependencies:
Dependency "jboss.web:service=WebServer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.web:service=WebServer' **")
Deployment "jboss.web.deployment:war=/jmx-console" is missing the following dependencies:
Dependency "jboss.web:service=WebServer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.web:service=WebServer' **")
Deployment "jboss.web.deployment:war=/juddi" is missing the following dependencies:
Dependency "jboss.web:service=WebServer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.web:service=WebServer' **")
Deployment "jboss.web.deployment:war=/web-console" is missing the following dependencies:
Dependency "jboss.web:service=WebServer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.web:service=WebServer' **")
DEPLOYMENTS IN ERROR:
Deployment "WebServer" is in error due to the following reason(s): LifecycleException: Protocol handler initialization failed: java.io.IOException: Alias name example does not identify a key entry
Deployment "jboss.web:service=WebServer" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.web:service=WebServer' **
我不明白为什么,因为JBOSS仙人掌路径是正确的(验证了这一点)。在这个文件中也有一个别名,名为“示例”。
发布于 2014-10-23 22:47:58
您必须在密钥库中拥有私钥和证书。根据这个问题,您只有别名example
的证书。
使用私钥和公共证书,您需要首先创建一个PKCS12密钥存储库,然后将其转换为JKS。
从私钥和公共证书创建PKCS12密钥存储库.
openssl pkcs12 -export -name example -in server.crt -inkey server.key \
-out server.p12
从私钥和公共证书(包括CA证书)创建PKCS12密钥存储库
openssl pkcs12 -export -in server.crt -inkey server.key \
-out server.p12 -name example \
-CAfile ca.crt -caname root
将pkcs12文件转换为java
keytool -importkeystore \
-deststorepass changeit -destkeypass changeit -destkeystore server.jks\
-srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass some-password \
-alias example
要验证JKS的内容,可以使用以下命令:
keytool -list -v -keystore server.jks
https://stackoverflow.com/questions/26532936
复制相似问题