class XMLSecurity::Document

Overview

A document Squadron or the SP builds and may sign.

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(io : IO) : Nil
to_s : String
to_s
, to_xml : String to_xml, xml_document : XML::Node xml_document

Constructor methods inherited from class XMLSecurity::BaseDocument

new(xml_document : XML::Node) new

Class methods inherited from class XMLSecurity::BaseDocument

algorithm(element : XML::Node | String | Nil) : OpenSSL::Digest algorithm, canon_algorithm(element) canon_algorithm, pem_to_der(pem : String) pem_to_der, safe_load_xml(document) : XML::Node safe_load_xml, strict_digest(uri : String | Nil, table) : OpenSSL::Digest | Nil strict_digest

Macros inherited from class XMLSecurity::BaseDocument

method_missing(call) method_missing

Constructor Detail

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

[View source]
def self.new(document : XML::Node) #

[View source]
def self.parse(xml : String) : Document #

An existing document to sign, parsed strictly.


[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 : String | Nil = SHA1) #

Enveloped signature over the root element, placed after the Issuer.


[View source]
def uuid : String | Nil #

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

[View source]