Commit a36ab57

mokha <mokha@cisco.com>
2018-03-06 22:08:58
render error if the document is invalid.
1 parent 2b70516
Changed files (1)
lib
saml
kit
lib/saml/kit/cli/report.rb
@@ -9,7 +9,11 @@ module Saml
         end
 
         def print(shell)
-          shell.say_status :success, "Decoded #{document.send(:name)}"
+          if document.is_a?(Saml::Kit::InvalidDocument)
+            shell.say_status :error, "Decoded #{document.send(:name)}"
+          else
+            shell.say_status :success, "Decoded #{document.send(:name)}"
+          end
           shell.print_table build_table_for(document)
           signature = document.signature
           if signature.present? && signature.certificate.present?