lib/XML/Compile/WSS/KeyInfo.pm

filter: Statementstmt 89.1% 165 / 185 Branchbran 42.4% 28 / 66 Conditioncond 57.1% 12 / 21 MC/DCmcdc 27.2% 3 / 11 Subroutinesub 84.0% 37 / 44 Podpod 88.8% 8 / 9 totaltotal 75.3% 253 / 336 CC 49 SCAR 21.1
CC
49
Cov
75%
_make_x509data
42.0
findToken
21.9
__ANON__
6.6
CRAP 8.2
« blib/lib/XML/Compile/WSS/Signature.pm ↑ Summary lib/XML/Compile/WSS/Signature.pm »
1 # Copyrights 2012-2016 by [Mark Overmeer].
2 # For other contributors see ChangeLog.
3 # See the manual pages for details on the licensing terms.
4 # Pod stripped from pm file by OODoc 2.02.
5 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 package XML::Compile::WSS::KeyInfo;
9 5 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 $VERSION = '2.02';
11  
12  
13 5 ▶use Log::Report 'xml-compile-wss-sig';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 5 ▶use XML::Compile::WSS::Util qw/:wsm10 :wsm11 :xtp10/;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 5 ▶use XML::Compile::WSS::SecToken::X509v3 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
17 5 ▶use Crypt::OpenSSL::X509 qw/FORMAT_ASN1/;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19  
20 5 ▶sub new(@) { my $class = shift; (bless {}, $class)->init({@_}) }
Subroutine new: called CC=1 SCAR=0.0
Pod documented
21 sub init($)
22 5 ▶{ my ($self, $args) = @_;
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
23 5 $self->{XCWK_tokens} = [];
24  
25 # It's too large to create accessors, so for this hack.
26 5 $self->{XCWK_config} = $args;
27 5 $self;
28 }
29  
30  
31 sub fromConfig(@)
32 4 ▶{ my $class = shift;
Subroutine fromConfig: called CC=2 SCAR=8.1
Pod documented
33 4 ▶ $class->new(@_==1 ? %{$_[0]} : @_); # also clones the HASH
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 0 4 4
34 }
35  
36 #-----------------
37  
38 8 ▶sub config() { my $c = shift->{XCWK_config}; wantarray ? %$c : $c }
Subroutine config: called CC=2 SCAR=7.2
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 8 0 8
39  
40 #-----------------------------
41  
42 sub addToken($)
43 3 ▶{ my $self = shift;
Subroutine addToken: called CC=1 SCAR=0.0
Pod documented
44 3 push @{$self->{XCWK_tokens}}, @_;
45 3 $self;
46 }
47  
48  
49 sub findToken(%)
50 4 ▶{ my ($self, %args) = @_;
Subroutine findToken: called CC=13 SCAR=30.9
Pod documented
51 4 ▶ if(my $fu = $args{uri})
Branch: 1 branch
BranchTrueFalseTotal
if (my $fu = $args{"uri"}) 2 2 4
52 2 { foreach my $token ($self->tokens)
53 1 ▶ { my $tu = $token->uri or next;
Branch: 1 branch
BranchTrueFalseTotal
my $tu = $token->uri or next 0 1 1
54 1 ▶ return $token if $tu eq $fu;
Branch: 1 branch
BranchTrueFalseTotal
if $tu eq $fu 0 1 1
55 }
56 }
57 4 ▶ if(my $fp = $args{fingerprint})
Branch: 1 branch
BranchTrueFalseTotal
if (my $fp = $args{"fingerprint"}) 2 2 4
58 2 { foreach my $token ($self->tokens)
59 2 ▶ { my $tp = $token->fingerprint or next;
Branch: 1 branch
BranchTrueFalseTotal
my $tp = $token->fingerprint or next 0 2 2
60 2 ▶ return $token if $tp eq $fp;
Branch: 1 branch
BranchTrueFalseTotal
if $tp eq $fp 2 0 2
61 }
62 }
63 2 ▶ if(my $fn = $args{name})
Branch: 1 branch
BranchTrueFalseTotal
if (my $fn = $args{"name"}) 0 2 2
64 0 { foreach my $token ($self->tokens)
65 0 ▶ { my $tn = $token->fingerprint or next;
Branch: 1 branch
BranchTrueFalseTotal
my $tn = $token->fingerprint or next 0 0 0
66 0 ▶ return $token if $tn eq $fn;
Branch: 1 branch
BranchTrueFalseTotal
if $tn eq $fn 0 0 0
67 }
68 }
69 2 ();
70 }
71  
72  
73 7 ▶sub tokens() { @{shift->{XCWK_tokens}} }
Subroutine tokens: called CC=1 SCAR=0.0
Pod documented
74  
75 #-----------------
76  
77 # See dump/keyinfo/template
78  
79 sub getTokens($%)
80 3 ▶{ my ($self, $wss) = (shift, shift);
Subroutine getTokens: called CC=1 SCAR=0.0
Pod documented
81 3 my %args = ($self->config, @_);
82  
83 3 my %keyinfo_handlers =
84 ( ds_KeyName => $self->_get_by_keyname($wss, \%args)
85 , ds_KeyValue => undef
86 , ds_RetrievalMethod => undef
87 , ds_X509Data => $self->_get_as_x509data($wss, \%args)
88 , ds_PGPData => undef
89 , ds_SPKIData => undef
90 , ds_MgmtData => undef
91 , wsse_SecurityTokenReference
92 => $self->_get_by_sectokref($wss, \%args)
93 );
94  
95 sub {
96 5 ▶ my ($h, $sec, $up_id) = @_;
Subroutine __ANON__: called CC=5 SCAR=16.2
97 5 ▶ my $id = $h->{Id} || $up_id;
Condition100%3/3
$h->{'Id'} || $up_id
l!l&&r!l&&!r
212
MC/DC100%2/2
$h->{'Id'} || $up_id
$h->{'Id'} $up_id
Truth table100%3/3
A || B
A= $h->{'Id'}B= $up_id
ABresult
1X1
011
000
98 5 my @tokens;
99 5 ▶ foreach (@{$h->{cho_ds_KeyName} ||[]})
Branch: 1 branch
BranchTrueFalseTotal
$h->{"cho_ds_KeyName"} or [] 0 5 5
100 5 { my ($way, $how) = %$_; # hash of one pair
101 5 ▶ my $handler = $keyinfo_handlers{$way}
Branch: 1 branch
BranchTrueFalseTotal
my $handler = $keyinfo_handlers{$way} or &error(&__x("unsupported key-info type {type} for {id}", "type", $way, "id", $id)) 0 5 5
102 or error __x"unsupported key-info type {type} for {id}"
103 , type => $way, id => $id;
104  
105 5 push @tokens, $handler->($id, $sec, $how);
106 }
107 5 @tokens;
108 3 };
109 }
110  
111 # ds_keyname
112 sub _get_by_keyname($$)
113 3 ▶{ my ($self, $wss, $args) = @_;
Subroutine _get_by_keyname: called CC=1 SCAR=1.2
114 3 ▶ sub { my ($id, $sec, $h) = @_; $self->findToken(name => $h) };
Subroutine __ANON__: not called CC=1 SCAR=2.6
115 }
116  
117 # ds_X509Data
118 sub _get_as_x509data($$)
119 3 ▶{ my ($self, $wss, $args) = @_;
Subroutine _get_as_x509data: called CC=1 SCAR=0.0
120  
121 sub {
122 1 ▶ my ($id, $sec, $h) = @_;
Subroutine __ANON__: called CC=4 SCAR=14.1
123  
124 1 my @tokens;
125 1 ▶ foreach my $rec ( @{$h->{seq_ds_X509IssuerSerial} || []} )
Branch: 1 branch
BranchTrueFalseTotal
$h->{"seq_ds_X509IssuerSerial"} or [] 0 1 1
126 2 ▶ { my $bin_cert = $rec->{ds_X509Certificate} or next;
Branch: 1 branch
BranchTrueFalseTotal
my $bin_cert = $rec->{"ds_X509Certificate"} or next 0 2 2
127 2 push @tokens, XML::Compile::WSS::SecToken::X509v3
128 ->new(id => $id, binary => $bin_cert);
129 }
130 1 @tokens;
131 3 };
132 }
133  
134 # wsse_SecurityTokenReference
135 sub _get_by_sectokref($$$)
136 3 ▶{ my ($self, $wss, $args) = @_;
Subroutine _get_by_sectokref: called CC=1 SCAR=0.0
137  
138 3 my %str_handlers =
139 ( wsse_KeyIdentifier => $self->_get_str_keyid($wss, $args)
140 , wsse_Reference => $self->_get_str_uri($wss, $args)
141 );
142  
143 sub {
144 4 ▶ my ($id, $sec, $h) = @_;
Subroutine __ANON__: called CC=3 SCAR=11.0
145 4 my @tokens;
146 4 foreach (@{$h->{cho_any}})
147 4 { my ($ref, $d) = %$_; # one pair
148 4 ▶ my $handler = $str_handlers{$ref}
Branch: 1 branch
BranchTrueFalseTotal
my $handler = $str_handlers{$ref} or &error(&__x("Keyinfo {id}: {type} not supported", "id", $id, "type", $ref)) 0 4 4
149 or error __x"Keyinfo {id}: {type} not supported"
150 , id => $id, type => $ref;
151  
152 4 push @tokens, $handler->($id, $sec, $d);
153 }
154  
155 4 @tokens;
156 3 };
157 }
158  
159 sub _get_str_keyid($$) # SECTOKREF_KEYID
160 3 ▶{ my ($self, $wss, $args) = @_;
Subroutine _get_str_keyid: called CC=1 SCAR=0.1
161 sub {
162 2 ▶ my ($id, $sec, $d) = @_;
Subroutine __ANON__: called CC=2 SCAR=7.2
163 2 my $valuet = $d->{ValueType};
164 2 ▶ if($valuet eq WSM11_PRINT_SHA1)
Branch: 1 branch
BranchTrueFalseTotal
if ($valuet eq "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1") 2 0 2
165 2 { my $p = wsm_decoded $d->{EncodingType}, $d->{_};
166 2 return $self->findToken(fingerprint => $p);
167 }
168  
169 0 error __x"Keyinfo {id}: {type} not supported", id => $id, type => $valuet;
170 3 };
171 }
172  
173 sub _get_str_uri($$) # SECTOKREF_URI
174 3 ▶{ my ($self, $wss, $args) = @_;
Subroutine _get_str_uri: called CC=1 SCAR=0.1
175 sub {
176 2 ▶ my ($id, $sec, $d) = @_;
Subroutine __ANON__: called CC=6 SCAR=18.8
177 2 my $uri = $d->{URI};
178 2 my $token = $self->findToken(uri => $uri);
179 2 ▶ return $token if $token; # already taken
Branch: 1 branch
BranchTrueFalseTotal
if $token 0 2 2
180  
181 2 my $valuet = $d->{ValueType};
182 2 ▶ if($valuet eq XTP10_X509v3)
Branch: 1 branch
BranchTrueFalseTotal
if ($valuet eq "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3") 2 0 2
183 2 ▶ { substr($uri, 0, 1) eq '#'
Branch: 1 branch
BranchTrueFalseTotal
substr($uri, 0, 1) eq "#" or &error(&__x("Keyinfo {id}: only inlined token references supported, got {uri}", "id", $id, "uri", $uri)) 0 2 2
184 or error __x"Keyinfo {id}: only inlined token references supported, got {uri}"
185 , id => $id, uri => $uri;
186  
187 my $binsec = $sec->{wsse_BinarySecurityToken}
188 2 ▶ or error __x"Keyinfo {id}: cannot find BinarySecurityToken"
Branch: 1 branch
BranchTrueFalseTotal
my $binsec = $sec->{"wsse_BinarySecurityToken"} or &error(&__x("Keyinfo {id}: cannot find BinarySecurityToken", "id", $id)) 0 2 2
189 , id => $id;
190  
191 2 my $have_id = '#'.$binsec->{wsu_Id};
192 2 ▶ $have_id eq $uri
Branch: 1 branch
BranchTrueFalseTotal
$have_id eq $uri or &error(&__x("Keyinfo {id}: wrong BinarySecurityToken {uri}, expected {expect}", "id", $id, "uri", $have_id, "expect", $uri)) 0 2 2
193 or error __x"Keyinfo {id}: wrong BinarySecurityToken {uri}, expected {expect}"
194 , id => $id, uri => $have_id, expect => $uri;
195  
196 my $token = XML::Compile::WSS::SecToken::X509v3->new
197 ( id => $binsec->{wsu_Id}, uri => $uri, type => $valuet
198 , binary => wsm_decoded($binsec->{EncodingType}, $binsec->{_})
199 2 );
200  
201 2 $self->addToken($token);
202 2 return $token;
203 }
204  
205 0 panic "Keyinfo $id: $valuet not supported";
206 3 };
207 }
208  
209  
210 sub builder($%)
211 5 ▶{ my ($self, $wss) = @_;
Subroutine builder: called CC=4 SCAR=13.9
Pod documented
212 5 my %args = ($self->config, @_);
213 5 ▶ my $type = $args{publish_token} || 'SECTOKREF_URI';
Condition100%2/2
$args{'publish_token'} || 'SECTOKREF_URI'
l!l
32
MC/DC100%1/1
$args{'publish_token'} || 'SECTOKREF_URI'
$args{'publish_token'}
Truth table100%2/2
A
A= $args{'publish_token'}
Aresult
11
00
214 5 ▶ return undef if $type eq 'NO';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "NO" 0 5 5
215  
216 5 my %str_handlers =
217 ( KEYNAME => '_make_keyname'
218 , SECTOKREF_KEYID => '_make_sectokref_keyid'
219 , SECTOKREF_URI => '_make_sectokref_uri'
220 , INCLUDE_BY_REF => '_make_sectokref_uri' # name is pre 2.00
221 , X509DATA => '_make_x509data'
222 );
223  
224 5 ▶ my $handler = $str_handlers{$type}
Branch: 1 branch
BranchTrueFalseTotal
my $handler = $str_handlers{$type} or &panic("unknown keyinfo type $type") 0 5 5
225 or panic "unknown keyinfo type $type";
226  
227 5 my $nest = $self->$handler($wss, \%args);
228 5 my $ki_id = $args{keyinfo_id};
229 sub {
230 4 ▶ my ($doc, $token, $sec) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
231 4 +{ cho_ds_KeyName => [ $nest->($doc, $token, $sec) ]
232 , Id => $ki_id
233 };
234 5 };
235 }
236  
237 sub _make_keyname($$$)
238 1 ▶{ my ($self, $wss, $args) = @_;
Subroutine _make_keyname: called CC=1 SCAR=0.0
239 sub {
240 1 ▶ my ($doc, $token, $sec) = @_;
Subroutine __ANON__: called CC=2 SCAR=7.1
241 1 ▶ my $name = $token->name
Branch: 1 branch
BranchTrueFalseTotal
my $name = $token->name or &panic("token $token has no name for KEYNAME") 0 1 1
242 or panic "token $token has no name for KEYNAME";
243 1 +{ ds_KeyName => $name };
244 1 };
245 }
246  
247 sub _make_x509data($$$)
248 0 ▶{ my ($self, $wss, $args) = @_;
Subroutine _make_x509data: not called CC=6 SCAR=37.4
249 0 ▶ my $as = $args->{x509data_type} || 'ASN1DER';
Condition0%0/2
$args->{'x509data_type'} || 'ASN1DER'
l!l
00
MC/DC0%0/1
$args->{'x509data_type'} || 'ASN1DER'
$args->{'x509data_type'}
Truth table0%0/2
A
A= $args->{'x509data_type'}
Aresult
11
00
250  
251 my $put
252 = $as eq 'ASN1DER'
253 0 ▶ ? sub { ds_X509Certificate => $_[0]->as_string(FORMAT_ASN1) }
Subroutine __ANON__: not called CC=1 SCAR=6.9
254 : $as eq 'SERIAL'
255 0 ▶ ? sub { ds_X509IssuerSerial =>
Subroutine __ANON__: not called CC=1 SCAR=6.9
256 { ds_X509IssuerName => $_[0]->issuer
257 , ds_X509SerialNumber => $_[0]->serial }
258 }
259 0 ▶ : $as eq 'SKI' ? sub { ds_X509SKI => $_[0]->hash}
Subroutine __ANON__: not called CC=1 SCAR=6.9
260 0 ▶ : $as eq 'SUBJECT' ? sub { ds_X509SubjectName => $_[0]->subject }
Subroutine __ANON__: not called CC=1 SCAR=6.9
261 0 ▶ : error __x"write key-info as X509Data, unknown format `{name}'"
Branch: 4 branches
BranchTrueFalseTotal
$as eq 'ASN1DER' ? : 0 0 0
$as eq 'SERIAL' ? : 0 0 0
$as eq 'SKI' ? : 0 0 0
$as eq 'SUBJECT' ? : 0 0 0
262 , name => $as;
263  
264 # No idea how we can use this Cert Revocation List, ds_X509CRL
265 # Other elements, not in ds:, not (yet) supported for writing
266  
267 # This routine can handle an ARRAY, but the rest of the module
268 # probably not.
269 sub {
270 0 ▶ my ($doc, $token, $sec) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
271 0 ▶ my @data = map $put->($_)
Branch: 1 branch
BranchTrueFalseTotal
ref $token eq 'ARRAY' ? : 0 0 0
272 , ref $token eq 'ARRAY' ? @$token : $token;
273  
274 0 +{ seq_ds_X509IssuerSerial => \@data }
275 0 };
276 }
277  
278 sub _make_sectokref($$$)
279 4 ▶{ my ($self, $wss, $args) = @_;
Subroutine _make_sectokref: called CC=1 SCAR=0.0
280 4 my $refid = $args->{sectokref_id};
281 4 my $usage = $args->{usage};
282 4 my $refw = $wss->schema->writer('wsse:SecurityTokenReference'
283 , include_namespaces => 0);
284  
285 sub {
286 3 ▶ my ($doc, $token, $sec, $payload) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
287 3 my $ref = $refw->($doc, +{wsu_Id => $refid, wsse_Usage => $usage
288 , cho_any => $payload});
289 3 +{ 'wsse:SecurityTokenReference' => $ref };
290 4 };
291 }
292  
293 sub _make_sectokref_keyid($$$)
294 1 ▶{ my ($self, $wss, $args) = @_;
Subroutine _make_sectokref_keyid: called CC=4 SCAR=14.2
295  
296 1 ▶ my $valuet = $args->{keyid_value} || WSM11_PRINT_SHA1;
Condition50%1/2
$args->{'keyid_value'} || 'http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1'
l!l
01
MC/DC0%0/1
$args->{'keyid_value'} || 'http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1'
$args->{'keyid_value'}
Truth table50%1/2
A
A= $args->{'keyid_value'}
Aresult
11
00
297 1 ▶ my $enct = $args->{keyid_encoding} || WSM10_BASE64;
Condition50%1/2
$args->{'keyid_encoding'} || 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'
l!l
01
MC/DC0%0/1
$args->{'keyid_encoding'} || 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'
$args->{'keyid_encoding'}
Truth table50%1/2
A
A= $args->{'keyid_encoding'}
Aresult
11
00
298 1 my $keyid = $args->{keyident_id};
299  
300 1 my $valuep; # first param is call is $token
301 1 ▶ if($valuet eq WSM11_PRINT_SHA1)
Branch: 1 branch
BranchTrueFalseTotal
if ($valuet eq 'http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1') { } 1 0 1
302 1 ▶ { $valuep = sub {shift->fingerprint or panic "token has no fingerprint" };
Subroutine __ANON__: called CC=2 SCAR=7.2
Branch: 1 branch
BranchTrueFalseTotal
(shift())->fingerprint or &panic("token has no fingerprint") 0 1 1
303 }
304 0 else { panic "unsupported security token reference value type '$valuet'" }
305  
306 1 ▶ my $encp = sub { wsm_encoded $enct, $valuep->($_[0]) };
Subroutine __ANON__: called CC=1 SCAR=0.0
307 1 my $kidw = $wss->schema->writer('wsse:KeyIdentifier'
308 , include_namespaces=>0);
309 1 my $refer = $self->_make_sectokref($wss, $args);
310  
311 sub {
312 1 ▶ my ($doc, $token, $sec) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
313 1 my $elem = $kidw->($doc
314 , +{ wsu_Id => $keyid, ValueType => $valuet, EncodingType => $enct
315 , _ => $encp->($token) });
316 1 $refer->($doc, $token, $sec, +{'wsse:KeyIdentifier' => $elem});
317 1 };
318 }
319  
320 sub _make_sectokref_uri($$$)
321 3 ▶{ my ($self, $wss, $args) = @_;
Subroutine _make_sectokref_uri: called CC=2 SCAR=7.1
322  
323 3 my $schema = $wss->schema;
324 3 ▶ my $binenc = $args->{binsec_encoding} || WSM10_BASE64;
Condition50%1/2
$args->{'binsec_encoding'} || 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'
l!l
03
MC/DC0%0/1
$args->{'binsec_encoding'} || 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'
$args->{'binsec_encoding'}
Truth table50%1/2
A
A= $args->{'binsec_encoding'}
Aresult
11
00
325 3 my $kidw = $schema->writer('wsse:Reference', include_namespaces => 0);
326 3 my $refer = $self->_make_sectokref($wss, $args);
327 3 my $bstw = $schema->writer('wsse:BinarySecurityToken');
328 3 my $default_uri = $args->{sectokref_uri};
329  
330 sub {
331 2 ▶ my ($doc, $token, $sec) = @_;
Subroutine __ANON__: called CC=5 SCAR=16.8
332 2 ▶ my $uri = $default_uri || $token->uri || '#abc';
Condition60%3/5
$default_uri || $token->uri || '#abc'
l!l
20
$default_uri or $token->uri
l!l&&r!l&&!r
110
MC/DC0%0/2
$default_uri || $token->uri || '#abc'
$default_uri $token->uri
Truth table66%2/3
A or B
A= $default_uriB= $token->uri
ABresult
1X1
011
000
333 2 my $intern = $uri !~ m!^\w+://!;
334 2 my $type = $token->type;
335 2 my $elem = $kidw->($doc, +{ValueType => $type, URI => $uri} );
336  
337 2 ▶ if($intern && $token->can('asBinary'))
Branch: 1 branch
BranchTrueFalseTotal
if ($intern and $token->can("asBinary")) 2 0 2
Condition33%1/3
$intern and $token->can("asBinary")
!ll&&!rl&&r
002
MC/DC0%0/2
$intern and $token->can("asBinary")
$intern $token->can("asBinary")
Truth table33%1/3
A and B
A= $internB= $token->can("asBinary")
ABresult
0X0
100
111
338 2 { (my $id = $uri) =~ s/^#//;
339  
340 2 my $bst = $bstw->($doc,
341 +{ wsu_Id => $id
342 , ValueType => $type
343 , EncodingType => $binenc
344 , _ => wsm_encoded($binenc, $token->asBinary)
345 } );
346 2 $sec->appendChild($bst);
347 }
348 2 $refer->($doc, $token, $sec, +{'wsse:Reference' => $elem});
349 3 };
350 }
351  
352 #-----------------
353  
354 5 1;
« blib/lib/XML/Compile/WSS/Signature.pm ↑ Summary lib/XML/Compile/WSS/Signature.pm »