首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >JBoss 5的HTTPS

JBoss 5的HTTPS
EN

Stack Overflow用户
提问于 2014-10-23 16:35:19
回答 1查看 2.3K关注 0票数 0

伙计们,

我试图为JBOSS 5设置HTTPS,基本上以下是我的步骤:

使用keytool,我将需要的证书添加到C:...\jre\lib\security\cacerts文件中,并使用别名“”命名1)。

2) I验证证书添加正确,这是从新的仙人掌文件生成的.txt文件的摘录:

代码语言:javascript
运行
复制
....
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取消注释文件,如下所示:

代码语言:javascript
运行
复制
<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,得到以下错误:

代码语言:javascript
运行
复制
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仙人掌路径是正确的(验证了这一点)。在这个文件中也有一个别名,名为“示例”。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-10-23 22:47:58

您必须在密钥库中拥有私钥和证书。根据这个问题,您只有别名example的证书。

使用私钥和公共证书,您需要首先创建一个PKCS12密钥存储库,然后将其转换为JKS

从私钥和公共证书创建PKCS12密钥存储库.

代码语言:javascript
运行
复制
 openssl pkcs12 -export -name example -in server.crt -inkey server.key \
            -out server.p12

从私钥和公共证书(包括CA证书)创建PKCS12密钥存储库

代码语言:javascript
运行
复制
openssl pkcs12 -export -in server.crt -inkey server.key \
           -out server.p12 -name example \
           -CAfile ca.crt -caname root

将pkcs12文件转换为java

代码语言:javascript
运行
复制
keytool -importkeystore \
    -deststorepass changeit -destkeypass changeit -destkeystore server.jks\
    -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass some-password \
    -alias example

要验证JKS的内容,可以使用以下命令:

代码语言:javascript
运行
复制
keytool -list -v -keystore server.jks
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26532936

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档