我正在使用 SSL 运行 JBoss,证书是使用 openssl 生成的:
<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/chap8.keystore"
keystorePass="password" sslProtocol = "TLS" />
我的客户端是一个 AIR 应用程序,它通过 GraniteDS 与 Java EE 服务器交互。在 Flex/AIR 方面,我将频道更新为 services-config.xml 上的 SecureAMFChannel:
<channel-definition id="myApp-graniteamf" class="mx.messaging.channels.SecureAMFChannel">
<endpoint uri="https://localhost:8443/myApp/graniteamf/amf"
class="flex.messaging.endpoints.SecureAMFEndpoint" />
</channel-definition>
现在,当我从客户端连接时,AIR 会询问我是否要继续连接(查看证书等)。
我是整个 SSL/HTTPS 概念的新手,但我已经阅读了一些文档。我现在想弄清楚的是如何让我的应用程序知道服务器是安全的(在这种情况下是本地主机)。从我目前得到的信息来看,客户端应用程序应该“信任服务器作为 CA”,或者只信任来自某个服务器的证书。
你能给我一些线索,告诉我从哪里开始在我的 AIR 客户端应用程序上实现它吗?