Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fail validation if no signature at all

  • Loading branch information...
commit c700c903e3682cb0272715548afb0c0ac2ed5145 1 parent 70d609f
@sanitar authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/xmldsig/signed_document.rb
View
2  lib/xmldsig/signed_document.rb
@@ -7,7 +7,7 @@ def initialize(document, options = {})
end
def validate(certificate = nil, &block)
- signatures.all? { |signature| signature.valid?(certificate, &block) }
+ signatures.empty? ? false : signatures.all? { |signature| signature.valid?(certificate, &block) }
end
def sign(private_key = nil, &block)

1 comment on commit c700c90

@benoist

This is now in version 0.1.0

Please sign in to comment.
Something went wrong with that request. Please try again.