Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Validation without signature block #3

Closed
wants to merge 1 commit into from

1 participant

@sanitar

Fail vaidation if there is no signature block at all.

@sanitar sanitar Validation fix
Fail vaidation if there is no signature block at all.
51d0eff
@sanitar sanitar closed this
@sanitar sanitar deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2013
  1. @sanitar

    Validation fix

    sanitar authored
    Fail vaidation if there is no signature block at all.
This page is out of date. Refresh to see the latest.
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)
Something went wrong with that request. Please try again.