Results for: "pstore"

Encodes this DSA to its PEM encoding.

Parameters

Examples

DSA.to_pem -> aString
DSA.to_pem(cipher, 'mypassword') -> aString

See the OpenSSL documentation for i2d_ECPrivateKey_bio()

Outputs the EC key in PEM encoding. If cipher and pass_phrase are given they will be used to encrypt the key. cipher must be an OpenSSL::Cipher instance. Note that encryption will only be effective for a private key, public keys will always be encoded in plain text.

Outputs this keypair in DER encoding.

Signs data using the Probabilistic Signature Scheme (RSA-PSS) and returns the calculated signature.

RSAError will be raised if an error occurs.

See verify_pss for the verification operation.

Parameters

digest

A String containing the message digest algorithm name.

data

A String. The data to be signed.

salt_length

The length in octets of the salt. Two special values are reserved: :digest means the digest length, and :max means the maximum possible length for the combination of the private key and the selected message digest algorithm.

mgf1_hash

The hash algorithm used in MGF1 (the currently supported mask generation function (MGF)).

Example

data = "Sign me!"
pkey = OpenSSL::PKey::RSA.new(2048)
signature = pkey.sign_pss("SHA256", data, salt_length: :max, mgf1_hash: "SHA256")
pub_key = OpenSSL::PKey.read(pkey.public_to_der)
puts pub_key.verify_pss("SHA256", signature, data,
                        salt_length: :auto, mgf1_hash: "SHA256") # => true

Verifies data using the Probabilistic Signature Scheme (RSA-PSS).

The return value is true if the signature is valid, false otherwise. RSAError will be raised if an error occurs.

See sign_pss for the signing operation and an example code.

Parameters

digest

A String containing the message digest algorithm name.

data

A String. The data to be signed.

salt_length

The length in octets of the salt. Two special values are reserved: :digest means the digest length, and :auto means automatically determining the length based on the signature.

mgf1_hash

The hash algorithm used in MGF1.

Outputs this keypair in PEM encoding. If cipher and pass_phrase are given they will be used to encrypt the key. cipher must be an OpenSSL::Cipher instance.

Removes session from the session cache.

A non-blocking version of sysread. Raises an SSLError if reading would block. If “exception: false” is passed, this method returns a symbol of :wait_readable, :wait_writable, or nil, rather than raising an exception.

Reads length bytes from the SSL connection. If a pre-allocated buffer is provided the data will be written into it.

Returns true if a reused session was negotiated during the handshake.

Returns the result of the peer certificates verification. See verify(1) for error values and descriptions.

If no peer certificate was presented X509_V_OK is returned.

Returns the ALPN protocol string that was finally selected by the server during the handshake.

Returns the protocol string that was finally selected by the client during the handshake.

Returns the TCPServer passed to the SSLServer when initialized.

No documentation available

Creates a new X509::Extension with passed values. See also x509v3_config(5).

No documentation available
No documentation available

Returns an UTF-8 representation of the distinguished name, as specified in RFC 2253.

Converts the name to DER encoding

No documentation available

Returns the depth of the chain. This is used in combination with error.

See also the man page X509_STORE_CTX_get_error_depth(3).

Returns the certificate which caused the error.

See also the man page X509_STORE_CTX_get_current_cert(3).

Returns the CRL which caused the error.

See also the man page X509_STORE_CTX_get_current_crl(3).

No documentation available
Search took: 2ms  ·  Total Results: 3004