in reply to Perl SSL Socket Server fails to receive from Java SSL Socket Client

From your code I see, that you are using a fairly old version of IO::Socket::SSL (because it uses default certificates). I would recommend to use a newer version, which also comes with more documentation, including examples on how to write a SSL server.

Also, it is not clear what you are trying to do. Your Perl SSL-Server requests a client certificate, which the client does not provide.Do you really want to use client certificates?

  • Comment on Re: Perl SSL Socket Server fails to receive from Java SSL Socket Client

Replies are listed 'Best First'.
Re^2: Perl SSL Socket Server fails to receive from Java SSL Socket Client
by Anonymous Monk on Aug 13, 2014 at 00:21 UTC
    Thanks for your response. I am actually using SSL v1.997 (the latest from cpan). The SSL Server code was based on an example file came with IO-Socket-1.997 package, so are you suggesting that I should not be using the default certificates (/certs dir), but with explicit configuration like this:
    SSL_cert_file => 'server-cert.pem', SSL_key_file => 'server-key.pem',
    I think the example code just prints out the client certificate if available for demo purpose. Yes, it doesn't do anything with the client certificate at all. What I am trying to do is, to have a SSL server that reads a text request, and then sends back a text response. It doesn't need to have client authentication (yet), I just try to get something basic working first.
      The example code was rotten and did not work any more. I've updated the code at https://github.com/noxxi/p5-io-socket-ssl and the updates will be included in the next release of IO::Socket::SSL.