【问题标题】:C/C++ SSL Request to CXF Server对 CXF 服务器的 C/C++ SSL 请求
【发布时间】:2015-05-04 07:35:00
【问题描述】:

首先,我使用 cxf-spring-json-tomcat 开发了一个 web 服务器。虽然,我创建了 JKS 密钥库文件并将我的 tomcat 服务器配置为使用 SSL 连接。而且,我可以使用 chrome、firefox 向我的服务器请求。

我的服务器 Bean:

@Service
@Path("/tservice")
public class TestService {


    @GET
    @Path("/{message}")
    @Produces("application/json")
    public Response find(@PathParam("message") String message)
    {
        Result result = new Result();
        result.setMessage(message);
        result.setResultId(Math.random());
        return Response.status(Status.OK).entity(result).type(MediaType.APPLICATION_JSON).build();
    }

}

Tomcat server.xml (SSL)

<Connector port="8443" protocol="HTTP/1.1"
               maxThreads="200" SSLEnabled="true" scheme="https" secure="true"
               keystoreFile="/home/**/.keystore" keystorePass="123456"
               clientAuth="false" sslProtocol="TLS" />

我的问题是(对于服务器端)我必须在我的 java 类中为 ssl 进行另一个配置或添加代码部分?

客户端的另一个问题是;

我需要使用 SSL 连接开发 C/C++ 客户端应用程序。我应该考虑什么?他们有什么技巧吗?有什么建议、示例或教程吗?

非常感谢。

【问题讨论】:

    标签: java c++ spring tomcat ssl


    【解决方案1】:

    你在 tomcat 中配置 SSL,所以 tomcat 处理 SSL 请求。无需更改服务器端的任何代码。

    【讨论】:

    • C/C++ 的客户端怎么样?
    • 我不知道 C/C++。但是一旦服务器是 SSL,任何客户端都可以调用它,而不管您的客户端如何。
    • 为 c++ 创建另一个线程。在向 statckoverflow 发布任何问题之前做一些研发和编码,因为如果问“我需要使用 SSL 连接开发 C/C++ 客户端应用程序。我应该考虑什么?有吗?对他们有什么技巧吗?有什么建议、例子或教程吗?然后伙计们减去问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-11-14
    • 1970-01-01
    • 1970-01-01
    • 2017-01-28
    • 2021-01-03
    • 1970-01-01
    • 2019-08-09
    相关资源
    最近更新 更多