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

soap/xmlrpc and SSL cerificate

Expand Messages
  • lopezfreemail
    Hi! I read that standalone daemon does not support SSL server. Thats true? If yes, how can I implement certificate based auth with mod_perl? I think I need to
    Message 1 of 2 , Aug 23, 2004
    • 0 Attachment
      Hi!

      I read that standalone daemon does not support SSL server. Thats true?
      If yes, how can I implement certificate based auth with mod_perl?
      I think I need to create an alternative Apache::SOAP or Apache::
      XMLRPC::Lite to redefine the handler to work with certificates and in
      httpd.conf I need to add PerlAuthHandler... or something like that.

      Is there any white-paper covering this topic?

      Many thanks,

      KJ.
    • Nils Sowen
      ... Lopezfreemail, ... true? I did a little patch on the SOAP::Transport::HTTP::Daemon so it uses SSL encryption. Just be sure to grab the following modules: -
      Message 2 of 2 , Aug 24, 2004
      • 0 Attachment
        --- In soaplite@yahoogroups.com, "lopezfreemail" <lopezfr@f...> wrote:

        Lopezfreemail,

        > I read that standalone daemon does not support SSL server. Thats
        true?

        I did a little patch on the SOAP::Transport::HTTP::Daemon so it uses
        SSL encryption. Just be sure to grab the following modules:

        - IO::Socket::SSL
        - HTTP::Daemon::SSL
        (find it @ http://search.cpan.org/~behroozi/ or search.cpan.org)

        If you place SSL parameters in the constructor for
        SOAP::Transport::HTTP::Daemon it'll use the HTTP::Daemon::SSL class
        instead of the regular one.

        --- PATCH STARTS HERE ---

        392c392,399
        < sub new { require HTTP::Daemon;
        ---
        > sub SSL {
        > my $self = shift->new;
        > @_ ? ($self->{_SSL} = shift, return $self) : return
        $self->{_SSL};
        > }
        >
        > sub http_daemon_class { shift->SSL ? 'HTTP::Daemon::SSL' :
        'HTTP::Daemon' }
        >
        > sub new {
        401c408,415
        < $self->{_daemon} = HTTP::Daemon->new(@params) or Carp::croak
        "Can't create daemon: $!";
        ---
        >
        > # use SSL if there is any parameter with SSL_* in the name
        > $self->SSL(1) if !$self->SSL && grep /^SSL_/, @params;
        > my $http_daemon = $self->http_daemon_class;
        > eval "require $http_daemon" or Carp::croak $@ unless
        UNIVERSAL::can($http_daemon => 'new');
        > $self->{_daemon} = $http_daemon->new(@params) or Carp::croak
        "Can't create daemon: $!";

        --- PATCH STOPS HERE ---

        Now you can run your server with:

        my $daemon = SOAP::Transport::HTTP::Daemon->new(
        LocalPort => 81,
        Listen => 1,
        SSL_use_cert => 1,
        SSL_key_file => 'soap_server.key',
        SSL_cert_file => 'soap_server.cert');

        The client just uses https:// as regular.

        Have fun,
        Nils
      Your message has been successfully submitted and would be delivered to recipients shortly.