Announcement Announcement Module
Collapse
No announcement yet.
RmiProxyFactoryBean and SSL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RmiProxyFactoryBean and SSL

    It appears that something is missing from the RmiProxyFactoryBean.

    On the RmiServiceExporter I can set these properties:

    serverSocketFactory
    clientSocketFactory
    registryServerSocketFactory
    registryClientSocketFactory.

    However, on the RmiProxyFactoryBean, I only have the option to set the registryClientSocketFactory. I would expect to see a clientSocketFactory property as well. Otherwise, How can I handle an SSL encryption with the rmi stubs?

    Looks like this question has been posted several other times on this forum. Just wondering if anyone has a solution?
    Last edited by kneumei; Jun 25th, 2009, 12:26 PM. Reason: Wrong bean name in title

  • #2
    So I figured out the problem. Even though the two objects seem like they should be symmetrical, they are not because I think the RmiServiceExporter transmits the clientSocketFactory over the wire to the RmiProxyFactoryBean, which loads it.

    My main problem lay in the fact that I needed to tell the SslRmiServerSocketFactory which ciphers to use

    Code:
    	<bean id="SSLserverSocketFactory" class="javax.rmi.ssl.SslRMIServerSocketFactory">
    		<constructor-arg index="0" value="SSL_DH_anon_WITH_RC4_128_MD5">
    		</constructor-arg>
    		<constructor-arg index="1">
    			<null />
    		</constructor-arg>
    		<constructor-arg index="2" value="false" />
    	</bean>
    Then I had to set this java property in the jvm that was running the client:
    Code:
    javax.rmi.ssl.client.enabledCipherSuites=SSL_DH_anon_WITH_RC4_128_MD5
    I know that I'm using a non-authenticating cipher, but for my needs that is ok.

    Comment

    Working...
    X