首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从外部应用程序到apache服务器的httpS调用问题

从外部应用程序到apache服务器的httpS调用问题
EN

Stack Overflow用户
提问于 2021-09-07 16:41:03
回答 1查看 253关注 0票数 0

我们的应用程序API部署在jboss容器中,并且通过apache服务器(2.4.48)启用了访问。外部应用程序正在通过web服务器访问我们的API。

使用下面的配置使用https启用Web服务器访问

代码语言:javascript
复制
<VirtualHost {SystemIP}:{somePort}>
ServerName abc.org.com
ErrorLog /www/home/logs/error_log
SSLEngine on
SSLCertificateFile /home/apache/http/ssl/server.crt
SSLCertificateKeyFile /home/apache/http/ssl/server.key
SSLCertificateChainFile /home/apache/http/ssl/ca-bundle.crt
...
</VirtualHost>

server.key包含私钥,server.crt包含CA签名的服务器证书,ca-bundle.crt包含根和中间证书以及由外部应用程序团队共享的外部服务器证书。

当他们尝试通过https (https://abc.org.com)访问我们的API时,客户端应用程序正在获取PKIX路径构建失败的。

在apache服务器上,ssl日志显示了以下错误

代码语言:javascript
复制
[Mon Sep 06 05:34:54.321808 2021] [ssl:info] [pid 111:tid 12345] [client 160.82.161.2:46108] AH02008: SSL library error 1 in handshake (server ...)
[Mon Sep 06 05:34:54.321860 2021] [ssl:info] [pid 111:tid 140138261788416] SSL Library Error: error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown (SSL alert number 46)

但是我们可以通过浏览器访问https://abc.org.com,并且证书可以正常工作。

我们在这里少了什么?在哪里向外web服务器添加外部应用程序证书?

客户端SSL日志

代码语言:javascript
复制
***
%% Invalidated:  [Session-6, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384]
ExternalApplication-1, SEND TLSv1.2 ALERT:  fatal, description = certificate_unknown
ExternalApplication-1, WRITE: TLSv1.2 Alert, length = 2
[Raw write]: length = 7
0000: 15 03 03 00 02 02 2E                               .......
ExternalApplication-1, called closeSocket()
ExternalApplication-1, handling exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

2021-09-02 14:57:00.944 ERROR [ExternalApplication-1] c.d.p.AccountHolder - Error while processing AccountHolder serviceI/O error on POST request for "abc.com/apiPath": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-09-16 08:39:55

正如ezra-s正确指出的,客户端应用程序中存在证书加载问题。正确导入证书后,问题得到解决。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69091854

复制
相关文章

相似问题

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