lib/saml/kit/signature.rb in saml-kit-1.0.11 vs lib/saml/kit/signature.rb in saml-kit-1.0.12
- old
+ new
@@ -67,12 +67,12 @@
def present?
node
end
- def to_xml
- node.to_s
+ def to_xml(pretty: false)
+ pretty ? node.to_xml(indent: 2) : node.to_s
end
private
attr_reader :node
@@ -82,9 +82,11 @@
return if dsignature.valid?(certificate.x509)
dsignature.errors.each do |attribute|
errors.add(attribute, error_message(attribute))
end
+ rescue Xmldsig::SchemaError => error
+ errors.add(:base, error.message)
end
def validate_certificate(now = Time.now.utc)
return unless certificate.present?
return if certificate.active?(now)