@@ -474,19 +474,20 @@ module.exports = {
474
474
} ,
475
475
476
476
"correctly loads signature" : function ( test ) {
477
- passLoadSignature ( test , "./test/static/valid_signature.xml" ) ;
478
- passLoadSignature ( test , "./test/static/valid_signature.xml" , true ) ;
479
- passLoadSignature ( test , "./test/static/valid_signature_with_root_level_sig_namespace.xml" ) ;
477
+ passLoadSignature ( test , "./test/static/valid_signature.xml" )
478
+ passLoadSignature ( test , "./test/static/valid_signature.xml" , true )
479
+ passLoadSignature ( test , "./test/static/valid_signature_with_root_level_sig_namespace.xml" )
480
480
test . done ( )
481
481
} ,
482
482
483
483
"verify valid signature" : function ( test ) {
484
484
passValidSignature ( test , "./test/static/valid_signature.xml" )
485
- passValidSignature ( test , "./test/static/valid_signature_with_lowercase_id_attribute.xml" ) ;
485
+ passValidSignature ( test , "./test/static/valid_signature_with_lowercase_id_attribute.xml" )
486
486
passValidSignature ( test , "./test/static/valid_signature wsu.xml" , "wssecurity" )
487
487
passValidSignature ( test , "./test/static/valid_signature_with_reference_keyInfo.xml" )
488
488
passValidSignature ( test , "./test/static/valid_signature_with_whitespace_in_digestvalue.xml" )
489
489
passValidSignature ( test , "./test/static/valid_signature_utf8.xml" )
490
+ passValidSignature ( test , "./test/static/valid_signature_with_unused_prefixes.xml" )
490
491
test . done ( )
491
492
} ,
492
493
@@ -639,8 +640,8 @@ function failInvalidSignature(test, file, mode) {
639
640
function verifySignature ( xml , mode ) {
640
641
641
642
var doc = new dom ( ) . parseFromString ( xml )
642
- var node = select ( "/* /*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']" , doc ) [ 0 ]
643
-
643
+ var node = select ( "//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']" , doc ) [ 0 ]
644
+
644
645
var sig = new SignedXml ( mode )
645
646
sig . keyInfoProvider = new FileKeyInfo ( "./test/static/client_public.pem" )
646
647
sig . loadSignature ( node )
0 commit comments