Skip to content

Commit af68b68

Browse files
committed
SOAP binding does not require a cacert anymore
Signed-off-by: Wesley Schwengle <waterkip@cpan.org>
1 parent 1854e35 commit af68b68

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/Net/SAML2/Binding/SOAP.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ has 'url' => (isa => Uri, is => 'ro', required => 1, coerce => 1);
9494
has 'key' => (isa => 'Str', is => 'ro', required => 1);
9595
has 'cert' => (isa => 'Str', is => 'ro', required => 1);
9696
has 'idp_cert' => (isa => 'Str', is => 'ro', required => 1);
97-
has 'cacert' => (isa => 'Str', is => 'ro', required => 1);
97+
has 'cacert' => (isa => 'Str', is => 'ro', required => 0);
9898

9999
=head2 request( $message )
100100

lib/Net/SAML2/SP.pm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,17 +413,13 @@ XXX UA
413413
sub soap_binding {
414414
my ($self, $ua, $idp_url, $idp_cert) = @_;
415415

416-
if (!$self->has_cacert) {
417-
croak("Unable to create SOAP binding, no CA certificate provided");
418-
}
419-
420416
return Net::SAML2::Binding::SOAP->new(
421417
ua => $ua,
422418
key => $self->key,
423419
cert => $self->cert,
424420
url => $idp_url,
425421
idp_cert => $idp_cert,
426-
cacert => $self->cacert,
422+
$self->has_cacert ? (cacert => $self->cacert) : (),
427423
);
428424
}
429425

0 commit comments

Comments
 (0)