SAML::Utils
Utility methods for SAML processing
Constants
DSIG = "http://www.w3.org/2000/09/xmldsig#"
DURATION_FORMAT = /^(-?)P(?:(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:[.,]\d+)?)S)?)?|(\d+)W)$/
Duration format regex (ISO 8601)
UUID_PREFIX = "_"
XENC = "http://www.w3.org/2001/04/xmlenc#"
Instance methods
Build OpenSSL certificate object from string
Build OpenSSL private key object from string
Build query string for HTTP-Redirect binding
build_query_from_raw(type : String, raw_data : String, raw_relay_state : String | Nil, raw_sig_alg : String) : String
Build query string from raw (already encoded) parts
Check if a certificate is active (started and not expired)
compute_fingerprint(cert : OpenSSL::X509::Certificate, algorithm : String = XMLSecurity::SHA256) : String
Compute certificate fingerprint with specified algorithm
Decrypt encrypted data
Decrypt encrypted data using multiple private keys
Extract certificate from XML signature
Format a private key properly with BEGIN/END markers
Parse ISO 8601 duration and apply to timestamp
retrieve_plaintext(cipher_text : Bytes | String, key : Bytes | OpenSSL::PKey::RSA, algorithm : String) : String
Decrypt cipher text based on algorithm
Retrieve symmetric key from encrypted data