I'm using Camel 2.9.0 with the Mina 1.x component with the mina-filter-ssl component imported. I am using the Grails routing plugin's sendMessage method to the following URL:

 
"mina:tcp://${hostname}:${port}?sync=false&minaLogger=true&codec=#mycodec&filters=#sslClientFilter"

The SSLFilter is set up using Spring DSL, the only settings I set for the filter is to pass a valid SSLContext to it's constructor and setting the clientMode to true:

  "sslContextGenerator(com.mypackage.mina.SSLContextGenerator) {
    keyStorePassword = '${keyStorePassword}'
    trustStorePassword = '${trustStorePassword}'
    keyStorePath = '${keyStorePath}'
    trustStorePath = '${trustStorePath}'
  }

  sslContext(sslContextGenerator: "getSSLContext")

  sslClientFilter(org.apache.mina.filter.SSLFilter, sslContext) {
    useClientMode = true
  }"

I have verified that the SSLFilter instance does have the "client" parameter set to true.

I'm stumped. It just seems like when the SSLFilter is engaged it's behavior is entirely different.

Jim


On 1/3/13 12:01 AM, Claus Ibsen wrote:
Hi

What Camel version are you using?
And which Camel component are you referring to? Could it be camel-mina
? eg the Mina 1.x based component?
And how have you configured the Camel component/route?



On Thu, Jan 3, 2013 at 1:11 AM, James Gough <j...@certifydatasystems.com> wrote:
I am trying to use SSLFilter with a custom codec, but it appears that my
client (for which I have called SSLFilter's "setUseClientMode" method with a
setting of true), is calling SSLFilter prior to calling the codec, and it
calls the decoder's decode method rather than the encoder's encode method,
which is called when sslFilter is not used.

It goes something like this:

SSLFilter used:
caller -> SSLFilter -> codec's decoder.decode() method -> service

SSLFilter not used:
caller -> codec's encoder.encode() method -> service

The codec also is handed an encrypted message, which is useless since I have
to do some stuff to it prior to sending it.

Any hints?



Reply via email to