Encodes this basic response into a DER-encoded string.
Returns the status of the certificate identified by the certid. The return value may be one of these constant:
V_CERTSTATUS_GOOD
V_CERTSTATUS_REVOKED
V_CERTSTATUS_UNKNOWN
When the status is V_CERTSTATUS_REVOKED, the time at which the certificate was revoked can be retrieved by revocation_time
.
Encodes this SingleResponse
into a DER-encoded string.
Compares this certificate id’s issuer with other
and returns true if they are the same.
Encodes this certificate identifier into a DER-encoded string.
Encodes this DSA
to its DER encoding.
Sets p
, q
, g
for the DSA
instance.
Sets pub_key
and priv_key
for the DSA
instance. priv_key
may be nil.
Obtains a list of all predefined curves by the OpenSSL
. Curve names are returned as sn.
See the OpenSSL
documentation for EC_get_builtin_curves().
Generates a new random private and public key.
See also the OpenSSL
documentation for EC_KEY_generate_key()
ec = OpenSSL::PKey::EC.new("prime256v1") p ec.private_key # => nil ec.generate_key! p ec.private_key # => #<OpenSSL::BN XXXXXX>
See the OpenSSL
documentation for i2d_ECPrivateKey_bio()
Generates a new random private and public key.
See also the OpenSSL
documentation for EC_KEY_generate_key()
ec = OpenSSL::PKey::EC.new("prime256v1") p ec.private_key # => nil ec.generate_key! p ec.private_key # => #<OpenSSL::BN XXXXXX>
Outputs this keypair in DER encoding.
Encrypt string
with the public key. padding
defaults to PKCS1_PADDING. The encrypted string output can be decrypted using private_decrypt
.
Decrypt string
, which has been encrypted with the private key, with the public key. padding
defaults to PKCS1_PADDING.
Encrypt string
with the private key. padding
defaults to PKCS1_PADDING. The encrypted string output can be decrypted using public_decrypt
.
Decrypt string
, which has been encrypted with the public key, with the private key. padding
defaults to PKCS1_PADDING.
Sets n
, e
, d
for the RSA
instance.
General callback for OpenSSL
verify