C/C++ 对 CXF 服务器的 SSL 请求

C/C++ SSL Request to CXF Server

首先,我使用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++ 客户端应用程序。我应该考虑什么?他们有什么技巧吗?有什么建议、示例或教程吗?

非常感谢。

您在 tomcat 中配置了 SSL,因此 tomcat 处理 SSL request.No 需要更改服务器端的任何代码。