Skip to content

Commit 4d73198

Browse files
committed
Add verification for artifact responses on an attribute ID
Be able to do something similar to xmlsec1 --verify --id-attr:ID \ urn:oasis:names:tc:SAML:2.0:protocol:ArtifactResolve \ --pubkey-cert-pem t/rsa.cert.pem \ t/signed/saml_request-xmlsec1-rsa-signed.xml Signed-off-by: Wesley Schwengle <waterkip@cpan.org>
1 parent 9b37104 commit 4d73198

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

Makefile.PL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ my %WriteMakefileArgs = (
5353
"XML::Generator" => "1.13",
5454
"XML::LibXML" => 0,
5555
"XML::LibXML::XPathContext" => 0,
56-
"XML::Sig" => "0.52",
56+
"XML::Sig" => "0.64",
5757
"XML::Writer" => "0.625",
5858
"base" => 0,
5959
"namespace::autoclean" => 0,
@@ -135,7 +135,7 @@ my %FallbackPrereqs = (
135135
"XML::Generator" => "1.13",
136136
"XML::LibXML" => 0,
137137
"XML::LibXML::XPathContext" => 0,
138-
"XML::Sig" => "0.52",
138+
"XML::Sig" => "0.64",
139139
"XML::Writer" => "0.625",
140140
"base" => 0,
141141
"namespace::autoclean" => 0,

cpanfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ requires "XML::Enc" => "0.05";
3737
requires "XML::Generator" => "1.13";
3838
requires "XML::LibXML" => "0";
3939
requires "XML::LibXML::XPathContext" => "0";
40-
requires "XML::Sig" => "0.52";
40+
requires "XML::Sig" => "0.64";
4141
requires "XML::Writer" => "0.625";
4242
requires "base" => "0";
4343
requires "namespace::autoclean" => "0";

dist.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ skip = Saml2Test
4949

5050
[Prereqs / RuntimeRequires]
5151
XML::Enc = 0.05
52-
XML::Sig = 0.52
52+
XML::Sig = 0.64
5353
XML::Writer = 0.625
5454
; Here because otherwise only on test you get to pull in this dependency
5555
; which might only be an issue with cpm or if you run --no-test with cpanm

lib/Net/SAML2/Binding/SOAP.pm

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ has 'anchors' => (
116116
predicate => 'has_anchors'
117117
);
118118

119+
has verify => (
120+
is => 'ro',
121+
isa => 'HashRef',
122+
predicate => 'has_verify',
123+
);
124+
119125
# BUILDARGS
120126

121127
# Earlier versions expected the idp_cert to be a string. However, metadata
@@ -192,7 +198,11 @@ sub handle_response {
192198
no_xml_declaration => 1,
193199
cert_text => $cert,
194200
cacert => $self->cacert,
195-
anchors => $self->anchors
201+
anchors => $self->anchors,
202+
$self->has_verify ? (
203+
ns => { 'artifact' => $self->verify->{ns} },
204+
id_attr => '/artifact:' . $self->verify->{attr_id},
205+
) : (),
196206
);
197207
return 1;
198208
}

0 commit comments

Comments
 (0)