Creates a new DH
instance from scratch by generating random parameters and a key pair.
See also OpenSSL::PKey.generate_parameters
and OpenSSL::PKey.generate_key
.
size
The desired key size in bits.
generator
The generator.
Indicates whether this DH
instance has a private key associated with it or not. The private key may be retrieved with DH#priv_key.
Creates a new DSA
instance by generating a private/public key pair from scratch.
See also OpenSSL::PKey.generate_parameters
and OpenSSL::PKey.generate_key
.
size
The desired key size in bits.
Indicates whether this DSA
instance has a private key associated with it or not. The private key may be retrieved with DSA#private_key.
Creates a new EC
instance with a new random private and public key.
Returns whether this EC
instance has a private key. The private key (BN
) can be retrieved with EC#private_key
.
Generates an RSA keypair.
See also OpenSSL::PKey.generate_key
.
size
The desired key size in bits.
exponent
An odd Integer
, normally 3, 17, or 65537.
Does this keypair contain a private key?
A description of the current connection state. This is for diagnostic purposes only.
Sets the time used in the verification. If not set, the current time is used.
See also the man page X509_VERIFY_PARAM_set_time(3).
Creates an OpenSSL::OCSP::Response
from status and basic_response.
Returns the status of the response.
Returns an Array
of statuses for this response. Each status contains a CertificateId
, the status (0 for good, 1 for revoked, 2 for unknown), the reason for the status, the revocation time, the time of this update, the time for the next update and a list of OpenSSL::X509::Extension
.
This should be superseded by BasicResponse#responses
and find_response
that return SingleResponse
.
Used primarily to check if an OpenSSL::X509::Certificate#public_key
compares to its private key.
x509 = OpenSSL::X509::Certificate.new(pem_encoded_certificate) rsa_key = OpenSSL::PKey::RSA.new(pem_encoded_private_key) rsa_key.compare?(x509.public_key) => true | false
Returns the time at which the session was established.
Sets start time of the session. Time
resolution is in seconds.
Returns the timeout value set for the session, in seconds from the established time.
Sets how long until the session expires in seconds.
Returns one of GRANTED
, GRANTED_WITH_MODS
, REJECTION
, WAITING
, REVOCATION_WARNING
or REVOCATION_NOTIFICATION
. A timestamp token has been created only in case status
is equal to GRANTED
or GRANTED_WITH_MODS
.
Returns the ‘short name’ of the object identifier representing the algorithm that was used to derive the message imprint digest. For valid timestamps, this is the same value that was already given in the Request
. If status is GRANTED or GRANTED_WITH_MODS, this is never nil
.
algo = token_info.algorithm puts algo -> "SHA1"