class XMLSecurity::Document

Defined in:

saml/xml_security.cr

Constant Summary

ENVELOPED_SIG = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
INC_PREFIX_LIST = "#default samlp saml ds xs xsi md"
RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
RSA_SHA256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
RSA_SHA384 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
RSA_SHA512 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"
SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"
SHA384 = "http://www.w3.org/2001/04/xmldsig-more#sha384"
SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"

Constructors

Instance Method Summary

Instance methods inherited from class XMLSecurity::BaseDocument

pem_to_der(pem : String) pem_to_der, to_s to_s

Class methods inherited from class XMLSecurity::BaseDocument

algorithm(element : XML::Node | String | Nil) algorithm, canon_algorithm(element) canon_algorithm, pem_to_der(pem : String) pem_to_der

Instance methods inherited from class XML::Node

<<(node : Node) <<, add_child(node : Node) : Nil add_child, add_element(tag_name, namespaces = {} of String => String) add_element, add_next_sibling(node : Node) add_next_sibling, add_prev_sibling(node : Node) add_prev_sibling, canonicalize(io = IO::Memory.new, mode : Mode | Nil = nil, node_set = nil, inclusive_ns : Array(String) = [] of String, comments? = false)
canonicalize(io, mode, comments?)
canonicalize(io = IO::Memory.new)
canonicalize
, canonicalize! canonicalize!

Constructor Detail

def self.new(tag_name, namespaces = {} of String => String) #

[View source]

Instance Method Detail

def sign_document(private_key : OpenSSL::PKey::RSA, certificate : OpenSSL::X509::Certificate | String | Nil, signature_method : String | Nil = RSA_SHA1, digest_method = SHA1) #

Signature> SignedInfo> CanonicalizationMethod /> SignatureMethod /> Reference> Transforms> DigestMethod> DigestValue> /Reference> Reference /> etc. /SignedInfo> SignatureValue /> KeyInfo /> Object /> /Signature>


[View source]
def to_xml #
Description copied from class XML::Node

Serialize this Node as XML and return a String using default options.

See XML::SaveOptions.xml_default for default options.


[View source]
def uuid #

[View source]
def uuid=(uuid : Nil | String) #

[View source]