Creates an unsigned certificate for subject
and key
. The lifetime of the key is from the current time to age
which defaults to one year.
The extensions
restrict the key to the indicated uses.
Creates a new key pair of the specified length
and algorithm
. The default is a 3072 bit RSA key.
Enumerates the trusted certificates via Gem::Security::TrustDir
.
If response
is an HTTP Success (2XX) response, yields the response if a block was given or shows the response body to the user.
If the response was not successful, shows an error to the user including the error_prefix
and the response body.
Wraps text
to wrap
characters and optionally indents by indent
characters
Enumerates the parents of directory
.
Simple wrapper for providing basic authentication for a request. When called with a request req
, response res
, authentication realm
and block
the block will be called with a username
and password
. If the block returns true the request is allowed to continue, otherwise an HTTPStatus::Unauthorized error is raised.
Returns the mime type of filename
from the list in mime_tab
. If no mime type was found application/octet-stream is returned.
Returns the mime type of filename
from the list in mime_tab
. If no mime type was found application/octet-stream is returned.
Parses an HTTP header raw
into a hash of header fields with an Array
of values.
Parses an HTTP header raw
into a hash of header fields with an Array
of values.
Parses q values in value
as used in Accept headers.
Parses q values in value
as used in Accept headers.
Parses the query component of a URI
in str
Parses the query component of a URI
in str