Perl: Cannot Access Web Service with SSL

后端 未结 8 694
礼貌的吻别
礼貌的吻别 2021-01-21 12:28

This is my first Perl script. I have installed SOAP::Lite using CPAN and it seems to have gone okay.

I\'m trying to access a simple HelloWorld .NET web service. I\'m get

相关标签:
8条回答
  • 2021-01-21 12:47

    As SOAP::Lite repeats LWP calls it should be possible to use

    $soap->ssl_opts( verify_hostname => 0 );
    
    0 讨论(0)
  • 2021-01-21 12:56

    In perl v5.20.2 two things were required for me to disable ssl certificate validation:

    Before any SOAP object creation (I've putted it at top)

    $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
    

    And then modify SOAP proxy:

    my $soap = SOAP::Lite
                -> readable(1)
                -> ns($api_ns, 'tns')
                -> proxy($api_url, ssl_opts => [ SSL_verify_mode => 0 ] )
                -> on_action(sub { return "\"$action\""});
    
    0 讨论(0)
提交回复
热议问题