Loading ...
Sorry, an error occurred while loading the content.

5374SSL and SOAP server (again)

Expand Messages
  • monsieur_magoo
    Apr 26, 2006
    • 0 Attachment
      I'm trying to write a soap server that will handle SSL requests. The
      SOAP::Transport::HTTP perldoc says you need:

      $ENV{HTTPS_CERT_FILE} = 'client-cert.pem';
      $ENV{HTTPS_KEY_FILE} = 'client-key.pem';

      Tried that and it didn't work.

      A previous message from this list says to pass the following args into
      new():

      SSL_key_file => 'soap_proxy.key',
      SSL_cert_file => 'soap_proxy.crt'

      Tried that and it didn't work either.

      If I change LocalPort to 80 and make the client use http my code works
      fine. What do you have to do to get a SOAP server that works with ssl?

      Here's my code:

      #!/usr/bin/perl

      use SOAP::Transport::HTTP;

      $ENV{HTTPS_CERT_FILE} = 'soap_proxy.crt';
      $ENV{HTTPS_KEY_FILE} = 'soap_proxy.key';
      $ENV{HTTPS_CERT_PASS} = 'pass';

      my $daemon = new SOAP::Transport::HTTP::Daemon(LocalAddr => '10.14.18.60',
      LocalPort => 443,
      SSL_key_file =>
      'soap_proxy.key',
      SSL_cert_file =>
      'soap_proxy.crt',
      SSL_cert_pass => 'pass');
      $daemon->on_action(sub {print @_, qq(\n)});
      print qq(Contact SOAP server at ), $daemon->url, qq(\n);
      $daemon->handle();
    • Show all 3 messages in this topic