[英]mule https inbound endpoint
I am developing a rest webservice in mule using inbound https endpoint.I have configured the https connector with the tls-key-store and tls-server.(Have generated the same using keytool). 我正在使用入站https端点在mule中开发一个REST Web服务。我已经使用tls-key-store和tls-server配置了https连接器(使用keytool生成了相同的)。
Below is the configuration file : 下面是配置文件:
<https:connector name="httpsConnector" doc:name="HTTP\HTTPS" validateConnections="true">
<https:tls-key-store path="keystore.jks" keyPassword="welcome" storePassword="welcome"/>
<https:tls-server path="truststore.jks" storePassword="welcome"/>
</https:connector>
<flow name="RESTFlow1" doc:name="RESTFlow1">
<https:inbound-endpoint exchange-pattern="request-response" host="0.0.0.0" port="8082" connector-ref="httpsConnector" doc:name="HTTPS"/>
<jersey:resources doc:name="REST">
<component class="com.thinxtream.rest.restWebservices"/>
</jersey:resources>
</flow>
The client is a flex application which connects to this mule rest webservice,Its giving the below error: 客户端是一个Flex应用程序,它连接到此Mule Rest Web服务,它给出以下错误:
httpsConnector.receiver.02] org.mule.exception.DefaultSystemExceptionStrategy: Caught exception in Exception Strategy: Received fatal alert: bad_certificate
javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.mule.transport.http.HttpServerConnection.readLine(HttpServerConnection.java:219)
at org.mule.transport.http.HttpServerConnection.readRequest(HttpServerConnection.java:185)
at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:155)
at org.mule.work.WorkerContext.run(WorkerContext.java:311)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Does it any configuration on the flex application also ? flex应用程序上也有任何配置吗?
IF you created the server side certificate yourself then it is probably self-signed or signed with a CA certificate of your own. 如果您自己创建了服务器端证书,则该证书可能是自签名的,也可能是使用您自己的CA证书签名的。 The client needs to trust the signing certificate or the server certificate itself.
客户端需要信任签名证书或服务器证书本身。 For that to work you need to import the server certificate (chain) into the truststore that the client uses.
为此,您需要将服务器证书(链)导入到客户端使用的信任库中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.