带SSL的ProxyServlet

时间:2009-08-27 09:46:55

标签: java maven-2 ssl jetty

我有一些proxy servletalt text http://img395.imageshack.us/img395/2770/capturei.png,我想在这个servlet安全(使用SSL)上建立连接(图中的con A和con B)。此代理在Maven Jetty插件下运行。 我已配置jetty来处理ssl请求:

 <connector implementation="org.mortbay.jetty.security.SslSocketConnector">
   <port>8443</port>
   <maxIdleTime>30000</maxIdleTime>
   <keystore>D:\Projekt\Proxy\keystore</keystore>
   <password>test</password>
   <keyPassword>test</keyPassword>
 </connector>

但是当我尝试通过这个代理(使用浏览器)时,我收到了一个异常:

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at 
com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523) at 
com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355) at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789) at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112) at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139) at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123) at 
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:631) at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)

问题出在哪里,或者我可以通过其他方式做到这一点?

0 个答案:

没有答案