CrystalSaml::OpenSSLExt
Helper module for OpenSSL operations not covered by Crystal stdlib.
Instance methods
cert_fingerprint(pem : String, algorithm : String = "sha256") : String
Compute fingerprint of a PEM certificate.
cert_public_key(pem : String) : LibCrypto::EVP_PKEY
Get the public key from a PEM certificate.
parse_cert_pem(pem : String) : LibCrypto::X509
Parse a PEM certificate string into a LibCrypto X509 pointer.
sign(private_key_pem : String, data : String, algorithm : String = "SHA256") : Bytes
Sign data using a private key with the given digest algorithm.
verify(cert_pem : String, signature : Bytes, data : String, algorithm : String = "SHA256") : Bool
Verify a signature using a certificate's public key.