Skip to content

Commit da37d8d

Browse files
authored
Merge pull request #170 from timlegge/master
Fixes #169 tests fail when PERL_LWP_SSL_CA_* or HTTPS_CA_* env vars a…
2 parents 497085e + 9dbd114 commit da37d8d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

lib/Net/SAML2/Binding/SOAP.pm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ with 'Net::SAML2::Role::VerifyXML';
2323
2424
my $response = $soap->request($req);
2525
26+
Note that LWP::UserAgent maybe used which means that environment variables
27+
may affect the use of https see:
28+
29+
=over
30+
31+
=item * L<PERL_LWP_SSL_CA_FILE and HTTPS_CA_FILE|https://metacpan.org/pod/LWP::UserAgent#SSL_ca_file-=%3E-$path>
32+
33+
=item * L<PERL_LWP_SSL_CA_PATH and HTTPS_CA_DIR|https://metacpan.org/pod/LWP::UserAgent#SSL_ca_path-=%3E-$path>
34+
35+
=back
36+
2637
=head1 METHODS
2738
2839
=cut

lib/Net/SAML2/IdP.pm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ Net::SAML2::IdP - SAML Identity Provider object
2525
);
2626
my $sso_url = $idp->sso_url('urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect');
2727
28+
Note that LWP::UserAgent is used which means that environment variables
29+
may affect the use of https see:
30+
31+
=over
32+
33+
=item * L<PERL_LWP_SSL_CA_FILE and HTTPS_CA_FILE|https://metacpan.org/pod/LWP::UserAgent#SSL_ca_file-=%3E-$path>
34+
35+
=item * L<PERL_LWP_SSL_CA_PATH and HTTPS_CA_DIR|https://metacpan.org/pod/LWP::UserAgent#SSL_ca_path-=%3E-$path>
36+
37+
=back
38+
2839
=head1 METHODS
2940
3041
=cut

t/01-create-idp.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ use Test::Net::SAML2;
55
use Net::SAML2::IdP;
66
use Test::Mock::One;
77

8+
delete $ENV{'PERL_LWP_SSL_CA_FILE'};
9+
delete $ENV{'HTTPS_CA_FILE'};
10+
delete $ENV{'PERL_LWP_SSL_CA_PATH'};
11+
delete $ENV{'HTTPS_CA_DIR'};
12+
813
my $xml = <<XML;
914
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1015
<EntityDescriptor entityID="http://sso.dev.venda.com/opensso" xmlns="urn:oasis:names:tc:SAML:2.0:metadata">

0 commit comments

Comments
 (0)