【发布时间】: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