new

SPKI.new([request]) => spki Class Public methods Parameters request - optional raw request, either in PEM or DER format.

challenge

spki.challenge => string Instance Public methods Returns the challenge string associated with this SPKI.

challenge=

spki.challenge = str => string Instance Public methods Parameters str - the challenge string to be set for this instance Sets the challenge to be associated with the SPKI. May be used by the server, e.g. to prevent replay.

public_key

spki.public_key => pkey Instance Public methods Returns the public key associated with the SPKI, an instance of OpenSSL::PKey.

public_key=

spki.public_key = pub => pkey Instance Public methods Parameters pub - the public key to be set for this instance Sets the public key to be associated with the SPKI, an instance of OpenSSL::PKey. This should be the public key corresponding to the private key used for signing the SPKI.

sign

spki.sign(key, digest) => spki Instance Public methods Parameters key - the private key to be used for signing this instance digest - the digest to be used for signing this instance To sign an SPKI, the private key corresponding to the public key set for this instance should be used, in addition to a digest algorithm in the form of an OpenSSL::Digest. The private key should be an instance of OpenSSL::PKey.

to_der

spki.to_der => DER-encoded string Instance Public methods Returns the DER encoding of this SPKI.

to_pem

spki.to_pem => PEM-encoded string Instance Public methods Returns the PEM encoding of this SPKI. to_s

to_s

to_s() Instance Public methods Alias for: to_pem

to_text

spki.to_text => string Instance Public methods Returns a textual representation of this SPKI, useful for debugging purposes.