Latest update.
This commit is contained in:
@@ -108,7 +108,7 @@ recognised:
|
||||
superfluous, and was removed.
|
||||
|
||||
file indicates that the text of the policy should really be taken from a
|
||||
file. The string is then really a file name. This is useful for
|
||||
file. The string is then really a filename. This is useful for
|
||||
policies that are large (more than a few lines, e.g. XML documents).
|
||||
|
||||
The 'policy' setting can be split up in multiple lines like this:
|
||||
|
||||
@@ -9,9 +9,9 @@ ossl_sa_TYPE_doall_arg, ossl_sa_TYPE_get, ossl_sa_TYPE_set
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment generic
|
||||
=for openssl generic
|
||||
|
||||
#include "internal/sparse_array.h"
|
||||
#include "crypto/sparse_array.h"
|
||||
|
||||
typedef struct sparse_array_st OPENSSL_SA;
|
||||
|
||||
@@ -33,42 +33,51 @@ ossl_sa_TYPE_doall_arg, ossl_sa_TYPE_get, ossl_sa_TYPE_set
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
=begin comment
|
||||
|
||||
POD is pretty good at recognising function names and making them appropriately
|
||||
bold... however, when part of the function name is variable, we have to help
|
||||
the processor along
|
||||
|
||||
=end comment
|
||||
|
||||
SPARSE_ARRAY_OF() returns the name for a sparse array of the specified
|
||||
B<TYPE>. DEFINE_STACK_OF() creates set of functions for a sparse array of
|
||||
B<TYPE>. This will mean that a pointer to type B<TYPE> is stored in each
|
||||
element of a sparse array, the type is referenced by SPARSE_ARRAY_OF(TYPE) and
|
||||
each function name begins with I<ossl_sa_TYPE_>. For example:
|
||||
B<I<TYPE>>. DEFINE_STACK_OF() creates set of functions for a sparse
|
||||
array of B<I<TYPE>>. This will mean that a pointer to type B<I<TYPE>>
|
||||
is stored in each element of a sparse array, the type is referenced by
|
||||
B<SPARSE_ARRAY_OF>(B<I<TYPE>>) and each function name begins with
|
||||
B<ossl_sa_I<TYPE>_>. For example:
|
||||
|
||||
TYPE *ossl_sa_TYPE_get(SPARSE_ARRAY_OF(TYPE) *sa, ossl_uintmax_t idx);
|
||||
|
||||
ossl_sa_TYPE_num() returns the number of elements in B<sa> or 0 if B<sa> is
|
||||
B<NULL>.
|
||||
B<ossl_sa_I<TYPE>_num>() returns the number of elements in I<sa> or 0 if I<sa>
|
||||
is NULL.
|
||||
|
||||
ossl_sa_TYPE_get() returns element B<idx> in B<sa>, where B<idx> starts at
|
||||
zero. If B<idx> refers to a value that has not been set then B<NULL> is
|
||||
B<ossl_sa_I<TYPE>_get>() returns element I<idx> in I<sa>, where I<idx> starts
|
||||
at zero. If I<idx> refers to a value that has not been set then NULL is
|
||||
returned.
|
||||
|
||||
ossl_sa_TYPE_set() sets element B<idx> in B<sa> to B<value>, where B<idx>
|
||||
B<ossl_sa_I<TYPE>_set>() sets element I<idx> in I<sa> to I<value>, where I<idx>
|
||||
starts at zero. The sparse array will be resized as required.
|
||||
|
||||
ossl_sa_TYPE_new() allocates a new empty sparse array.
|
||||
B<ossl_sa_I<TYPE>_new>() allocates a new empty sparse array.
|
||||
|
||||
ossl_sa_TYPE_free() frees up the B<sa> structure. It does B<not> free up any
|
||||
elements of B<sa>. After this call B<sa> is no longer valid.
|
||||
B<ossl_sa_I<TYPE>_free>() frees up the I<sa> structure. It does I<not> free up any
|
||||
elements of I<sa>. After this call I<sa> is no longer valid.
|
||||
|
||||
ossl_sa_TYPE_free_leaves() frees up the B<sa> structure and all of its
|
||||
elements. After this call B<sa> is no longer valid.
|
||||
B<ossl_sa_I<TYPE>_free_leaves>() frees up the I<sa> structure and all of its
|
||||
elements. After this call I<sa> is no longer valid.
|
||||
|
||||
ossl_sa_TYPE_doall() calls the function B<leaf> for each element in B<sa>
|
||||
B<ossl_sa_I<TYPE>_doall>() calls the function I<leaf> for each element in I<sa>
|
||||
in ascending index order. The index position, within the sparse array,
|
||||
of each item is passed as the first argument to the leaf function and a
|
||||
pointer to the associated value is is passed as the second argument.
|
||||
|
||||
ossl_sa_TYPE_doall_arg() calls the function B<leaf> for each element in
|
||||
B<sa> in ascending index order. The index position, within the sparse
|
||||
B<ossl_sa_I<TYPE>_doall_arg>() calls the function I<leaf> for each element in
|
||||
I<sa> in ascending index order. The index position, within the sparse
|
||||
array, of each item is passed as the first argument to the leaf function,
|
||||
a pointer to the associated value is passed as the second argument and
|
||||
the third argument is the user supplied B<arg>.
|
||||
the third argument is the user supplied I<arg>.
|
||||
|
||||
|
||||
=head1 NOTES
|
||||
@@ -77,9 +86,9 @@ Sparse arrays are an internal data structure and should B<not> be used by user
|
||||
applications.
|
||||
|
||||
Care should be taken when accessing sparse arrays in multi-threaded
|
||||
environments. The ossl_sa_TYPE_set operation can cause the internal structure
|
||||
of the sparse array to change which causes race conditions if the sparse array
|
||||
is accessed in a different thread.
|
||||
environments. The B<ossl_sa_I<TYPE>_set>() operation can cause the internal
|
||||
structure of the sparse array to change which causes race conditions if the
|
||||
sparse array is accessed in a different thread.
|
||||
|
||||
SPARSE_ARRAY_OF() and DEFINE_SPARSE_ARRAY_OF() are implemented as macros.
|
||||
|
||||
@@ -90,21 +99,22 @@ OPENSSL_SA_num and OPENSSL_SA_set.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ossl_sa_TYPE_num() returns the number of elements in the sparse array or B<0>
|
||||
if the passed sparse array is B<NULL>.
|
||||
B<ossl_sa_I<TYPE>_num>() returns the number of elements in the sparse array or
|
||||
B<0> if the passed sparse array is NULL.
|
||||
|
||||
ossl_sa_TYPE_get() returns a pointer to a sparse array element or B<NULL> if
|
||||
B<ossl_sa_I<TYPE>_get>() returns a pointer to a sparse array element or NULL if
|
||||
the element has not be set.
|
||||
|
||||
ossl_sa_TYPE_set() return B<1> on success and B<0> on error. In the latter
|
||||
B<ossl_sa_I<TYPE>_set>() return B<1> on success and B<0> on error. In the latter
|
||||
case, the elements of the sparse array remain unchanged, although the internal
|
||||
structures might have.
|
||||
|
||||
ossl_sa_TYPE_new() returns an empty sparse array or B<NULL> if an error
|
||||
B<ossl_sa_I<TYPE>_new>() returns an empty sparse array or NULL if an error
|
||||
occurs.
|
||||
|
||||
ossl_sa_TYPE_doall, ossl_sa_TYPE_doall_arg, ossl_sa_TYPE_free() and
|
||||
ossl_sa_TYPE_free_leaves() do not return values.
|
||||
B<ossl_sa_I<TYPE>_doall>(), B<ossl_sa_I<TYPE>_doall_arg>(),
|
||||
B<ossl_sa_I<TYPE>_free>() and B<ossl_sa_I<TYPE>_free_leaves>()
|
||||
do not return values.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
@@ -53,52 +53,52 @@ separately (see L</Cache Functions> below).
|
||||
=head2 Store Functions
|
||||
|
||||
ossl_method_store_init() initialises the method store subsystem in the scope of
|
||||
the library context B<ctx>.
|
||||
the library context I<ctx>.
|
||||
|
||||
ossl_method_store_cleanup() cleans up and shuts down the implementation method
|
||||
store subsystem in the scope of the library context B<ctx>.
|
||||
store subsystem in the scope of the library context I<ctx>.
|
||||
|
||||
ossl_method_store_new() create a new empty method store using the supplied
|
||||
B<ctx> to allow access to the required underlying property data.
|
||||
I<ctx> to allow access to the required underlying property data.
|
||||
|
||||
ossl_method_store_free() frees resources allocated to B<store>.
|
||||
ossl_method_store_free() frees resources allocated to I<store>.
|
||||
|
||||
ossl_method_store_add() adds the B<method> constructed from an implementation in
|
||||
the provider B<prov> to the B<store> as an instance of an algorithm indicated by
|
||||
B<nid> and the property definition B<properties>, unless the B<store> already
|
||||
has a method from the same provider with the same B<nid> and B<properties>.
|
||||
If the B<method_up_ref> function is given, it's called to increment the
|
||||
ossl_method_store_add() adds the I<method> constructed from an implementation in
|
||||
the provider I<prov> to the I<store> as an instance of an algorithm indicated by
|
||||
I<nid> and the property definition I<properties>, unless the I<store> already
|
||||
has a method from the same provider with the same I<nid> and I<properties>.
|
||||
If the I<method_up_ref> function is given, it's called to increment the
|
||||
reference count of the method.
|
||||
If the B<method_destruct> function is given, it's called when this function
|
||||
If the I<method_destruct> function is given, it's called when this function
|
||||
fails to add the method to the store, or later on when it is being released from
|
||||
the B<store>.
|
||||
the I<store>.
|
||||
|
||||
ossl_method_store_remove() removes the B<method> identified by B<nid> from the
|
||||
B<store>.
|
||||
ossl_method_store_remove() removes the I<method> identified by I<nid> from the
|
||||
I<store>.
|
||||
|
||||
ossl_method_store_fetch() queries B<store> for a method identified by B<nid>
|
||||
that matches the property query B<prop_query>.
|
||||
The result, if any, is returned in B<method>.
|
||||
ossl_method_store_fetch() queries I<store> for a method identified by I<nid>
|
||||
that matches the property query I<prop_query>.
|
||||
The result, if any, is returned in I<method>.
|
||||
|
||||
ossl_method_store_set_global_properties() sets method B<store> wide query
|
||||
properties to B<prop_query>.
|
||||
ossl_method_store_set_global_properties() sets method I<store> wide query
|
||||
properties to I<prop_query>.
|
||||
All subsequent fetches will need to meet both these global query properties
|
||||
and the ones passed to the ossl_method_store_free().
|
||||
|
||||
=head2 Cache Functions
|
||||
|
||||
ossl_method_store_cache_get() queries the cache associated with the B<store>
|
||||
for a method identified by B<nid> that matches the property query
|
||||
B<prop_query>.
|
||||
The result, if any, is returned in B<method>.
|
||||
ossl_method_store_cache_get() queries the cache associated with the I<store>
|
||||
for a method identified by I<nid> that matches the property query
|
||||
I<prop_query>.
|
||||
The result, if any, is returned in I<method>.
|
||||
|
||||
ossl_method_store_cache_set() sets a cache entry identified by B<nid> with the
|
||||
property query B<prop_query> in the B<store>.
|
||||
Future calls to ossl_method_store_cache_get() will return the specified B<method>.
|
||||
ossl_method_store_cache_set() sets a cache entry identified by I<nid> with the
|
||||
property query I<prop_query> in the I<store>.
|
||||
Future calls to ossl_method_store_cache_get() will return the specified I<method>.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ossl_method_store_new() returns a new method store object or B<NULL> on failure.
|
||||
ossl_method_store_new() returns a new method store object or NULL on failure.
|
||||
|
||||
ossl_method_store_free(), ossl_method_store_add(),
|
||||
ossl_method_store_remove(), ossl_method_store_fetch(),
|
||||
|
||||
@@ -16,10 +16,10 @@ CMS_SignerInfo data structure
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
cms_add1_signing_cert() adds an ESS Signing Certificate B<sc> (version 1) signed
|
||||
attribute to the CMS_SignerInfo B<si>.
|
||||
cms_add1_signing_cert_v2() adds an ESS Signing Certificate B<sc2> (version 2) signed
|
||||
attribute to the CMS_SignerInfo B<si>.
|
||||
cms_add1_signing_cert() adds an ESS Signing Certificate I<sc> (version 1) signed
|
||||
attribute to the CMS_SignerInfo I<si>.
|
||||
cms_add1_signing_cert_v2() adds an ESS Signing Certificate I<sc2> (version 2) signed
|
||||
attribute to the CMS_SignerInfo I<si>.
|
||||
The ESS Signing Certificate attributes version 1 and 2 are defined in RFC 5035
|
||||
which updates Section 5.4 of RFC 2634.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ evp_generic_fetch, evp_generic_fetch_by_number
|
||||
=head1 SYNOPSIS
|
||||
|
||||
/* Only for EVP source */
|
||||
#include "evp_locl.h"
|
||||
#include "evp_local.h"
|
||||
|
||||
void *evp_generic_fetch(OPENSSL_CTX *libctx, int operation_id,
|
||||
const char *name, const char *properties,
|
||||
@@ -39,7 +39,7 @@ I<new_method>, I<up_ref_method>, and I<free_method>.
|
||||
|
||||
evp_generic_fetch_by_number() does the same thing as evp_generic_fetch(),
|
||||
but takes a I<name_id> instead of a number.
|
||||
I<name_id> must always be non-zero; as a matter of fact, it being zero
|
||||
I<name_id> must always be nonzero; as a matter of fact, it being zero
|
||||
is considered a programming error.
|
||||
This is meant to be used when one method needs to fetch an associated
|
||||
other method, and is typically called from inside the given function
|
||||
@@ -70,7 +70,7 @@ frees the given method.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
evp_generic_fetch() returns a method on success, or B<NULL> on error.
|
||||
evp_generic_fetch() returns a method on success, or NULL on error.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ evp_keymgmt_clear_pkey_cache
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "internal/evp_int.h"
|
||||
#include "crypto/evp.h"
|
||||
|
||||
void *evp_keymgmt_export_to_provider(EVP_PKEY *pk, EVP_KEYMGMT *keymgmt);
|
||||
void evp_keymgmt_clear_pkey_cache(EVP_PKEY *pk);
|
||||
|
||||
@@ -14,7 +14,7 @@ evp_keymgmt_importkey_types, evp_keymgmt_exportkey_types
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "internal/evp_int.h"
|
||||
#include "crypto/evp.h"
|
||||
|
||||
void *evp_keymgmt_importdomparams(const EVP_KEYMGMT *keymgmt,
|
||||
const OSSL_PARAM params[]);
|
||||
|
||||
@@ -7,7 +7,7 @@ openssl_ctx_get_data, openssl_ctx_run_once, openssl_ctx_onfree
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ossl_typ.h>
|
||||
#include <openssl/types.h>
|
||||
#include "internal/cryptlib.h"
|
||||
|
||||
typedef struct openssl_ctx_method {
|
||||
@@ -24,8 +24,8 @@ openssl_ctx_get_data, openssl_ctx_run_once, openssl_ctx_onfree
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Internally, the OpenSSL library context C<OPENSSL_CTX> is implemented
|
||||
as a C<CRYPTO_EX_DATA>, which allows data from diverse parts of the
|
||||
Internally, the OpenSSL library context B<OPENSSL_CTX> is implemented
|
||||
as a B<CRYPTO_EX_DATA>, which allows data from diverse parts of the
|
||||
library to be added and removed dynamically.
|
||||
Each such data item must have a corresponding CRYPTO_EX_DATA index
|
||||
associated with it. Unlike normal CRYPTO_EX_DATA objects we use static indexes
|
||||
@@ -34,8 +34,8 @@ indexes internally to the implementation.
|
||||
See the example further down to see how that's done.
|
||||
|
||||
openssl_ctx_get_data() is used to retrieve a pointer to the data in
|
||||
the library context C<ctx> associated with the given C<index>. An
|
||||
OPENSSL_CTX_METHOD must be defined and given in the C<meth> parameter. The index
|
||||
the library context I<ctx> associated with the given I<index>. An
|
||||
OPENSSL_CTX_METHOD must be defined and given in the I<meth> parameter. The index
|
||||
for it should be defined in cryptlib.h. The functions through the method are
|
||||
used to create or free items that are stored at that index whenever a library
|
||||
context is created or freed, meaning that the code that use a data item of that
|
||||
@@ -44,18 +44,18 @@ index doesn't have to worry about that, just use the data available.
|
||||
Deallocation of an index happens automatically when the library
|
||||
context is freed.
|
||||
|
||||
openssl_ctx_run_once is used to run some initialisation routine C<run_once_fn>
|
||||
exactly once per library context C<ctx> object. Each initialisation routine
|
||||
openssl_ctx_run_once is used to run some initialisation routine I<run_once_fn>
|
||||
exactly once per library context I<ctx> object. Each initialisation routine
|
||||
should be allocate a unique run once index in cryptlib.h.
|
||||
|
||||
Any resources allocated via a run once initialisation routine can be cleaned up
|
||||
using openssl_ctx_onfree. This associates an "on free" routine C<onfreefn> with
|
||||
the library context C<ctx>. When C<ctx> is freed all associated "on free"
|
||||
using openssl_ctx_onfree. This associates an "on free" routine I<onfreefn> with
|
||||
the library context I<ctx>. When I<ctx> is freed all associated "on free"
|
||||
routines are called.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
openssl_ctx_get_data() returns a pointer on success, or C<NULL> on
|
||||
openssl_ctx_get_data() returns a pointer on success, or NULL on
|
||||
failure.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ossl_cmp_log_parse_metadata,
|
||||
ossl_cmp_add_error_txt,
|
||||
ossl_cmp_add_error_data,
|
||||
ossl_cmp_add_error_line,
|
||||
ossl_cmp_asn1_octet_string_set1,
|
||||
ossl_cmp_asn1_octet_string_set1_bytes,
|
||||
ossl_cmp_build_cert_chain
|
||||
- misc internal utility functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "cmp_local.h"
|
||||
|
||||
const char *ossl_cmp_log_parse_metadata(const char *buf,
|
||||
OSSL_CMP_severity *level, char **func,
|
||||
char **file, int *line);
|
||||
|
||||
void ossl_cmp_add_error_txt(const char *separator, const char *txt);
|
||||
#define ossl_cmp_add_error_data(txt)
|
||||
#define ossl_cmp_add_error_line(txt)
|
||||
|
||||
int ossl_cmp_asn1_octet_string_set1(ASN1_OCTET_STRING **tgt,
|
||||
const ASN1_OCTET_STRING *src);
|
||||
int ossl_cmp_asn1_octet_string_set1_bytes(ASN1_OCTET_STRING **tgt,
|
||||
const unsigned char *bytes, int len);
|
||||
|
||||
STACK_OF(X509) *ossl_cmp_build_cert_chain(STACK_OF(X509) *certs, X509 *cert);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
ossl_cmp_log_parse_metadata() parses the given message buffer I<buf> populated
|
||||
by L<OSSL_CMP_log(3)> etc.
|
||||
according to the pattern OSSL_CMP_LOG_START#level ": %s\n", filling in
|
||||
the variable pointed to by I<level> with the severity level or -1,
|
||||
the variable pointed to by I<func> with the function name string or NULL,
|
||||
the variable pointed to by I<file> with the filename string or NULL, and
|
||||
the variable pointed to by I<line> with the line number or -1.
|
||||
Any string returned via I<*func> and I<*file> must be freeed by the caller.
|
||||
|
||||
ossl_cmp_add_error_txt() appends text to the extra data field of the last
|
||||
error message in the OpenSSL error queue, after adding the optional separator
|
||||
unless data has been empty so far. The text can be of arbitrary length,
|
||||
which is not possible when using L<ERR_add_error_data(3)> in conjunction with
|
||||
L<ERR_print_errors_cb(3)>.
|
||||
|
||||
ossl_cmp_add_error_data() is a macro calling
|
||||
ossl_cmp_add_error_txt() with the separator being ":".
|
||||
|
||||
ossl_cmp_add_error_line() is a macro calling
|
||||
ossl_cmp_add_error_txt() with the separator being "\n".
|
||||
|
||||
ossl_cmp_asn1_octet_string_set1() frees any previous value of the variable
|
||||
referenced via the I<tgt> argument and assigns either a copy of
|
||||
the ASN1_OCTET_STRING given as the I<src> argument or NULL.
|
||||
It returns 1 on success, 0 on error.
|
||||
|
||||
ossl_cmp_asn1_octet_string_set1_bytes() frees any previous value of the variable
|
||||
referenced via the I<tgt> argument and assigns either a copy of the given byte
|
||||
string (with the given length) or NULL. It returns 1 on success, 0 on error.
|
||||
|
||||
ossl_cmp_build_cert_chain() builds up the certificate chain of cert as high up
|
||||
as possible using the given X509_STORE containing all possible intermediate
|
||||
certificates and optionally the (possible) trust anchor(s).
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ossl_cmp_log_parse_metadata() returns the pointer to the actual message text
|
||||
after the OSSL_CMP_LOG_PREFIX and level and ':' if found in the buffer,
|
||||
else the beginning of the buffer.
|
||||
|
||||
ossl_cmp_add_error_txt()
|
||||
ossl_cmp_add_error_data(), and
|
||||
ossl_cmp_add_error_line()
|
||||
do not return anything.
|
||||
|
||||
ossl_cmp_build_cert_chain()
|
||||
returns NULL on error, else a pointer to a stack of (up_ref'ed) certificates
|
||||
containing the EE certificate given in the function arguments (cert)
|
||||
and all intermediate certificates up the chain toward the trust anchor.
|
||||
The (self-signed) trust anchor is not included.
|
||||
|
||||
All other functions return 1 on success, 0 on error.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The OpenSSL CMP support was added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
this file except in compliance with the License. You can obtain a copy
|
||||
in the file LICENSE in the source distribution or at
|
||||
L<https://www.openssl.org/source/license.html>.
|
||||
|
||||
=cut
|
||||
@@ -0,0 +1,76 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ossl_cmp_ctx_set1_caPubs,
|
||||
ossl_cmp_ctx_set0_validatedSrvCert,
|
||||
ossl_cmp_ctx_set_status,
|
||||
ossl_cmp_ctx_set0_statusString,
|
||||
ossl_cmp_ctx_set_failInfoCode,
|
||||
ossl_cmp_ctx_set0_newCert,
|
||||
ossl_cmp_ctx_set1_extraCertsIn,
|
||||
ossl_cmp_ctx_set1_recipNonce
|
||||
- internal functions for managing the CMP client context datastructure
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/cmp.h>
|
||||
|
||||
int ossl_cmp_ctx_set1_caPubs(OSSL_CMP_CTX *ctx, STACK_OF(X509) *caPubs);
|
||||
int ossl_cmp_ctx_set0_validatedSrvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
||||
int ossl_cmp_ctx_set_status(OSSL_CMP_CTX *ctx, int status);
|
||||
int ossl_cmp_ctx_set0_statusString(OSSL_CMP_CTX *ctx,
|
||||
OSSL_CMP_PKIFREETEXT *text);
|
||||
int ossl_cmp_ctx_set_failInfoCode(OSSL_CMP_CTX *ctx, int fail_info);
|
||||
int ossl_cmp_ctx_set0_newCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
||||
int ossl_cmp_ctx_set1_extraCertsIn(OSSL_CMP_CTX *ctx,
|
||||
STACK_OF(X509) *extraCertsIn);
|
||||
int ossl_cmp_ctx_set1_recipNonce(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *nonce);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
ossl_cmp_ctx_set1_caPubs() copies the given stack of CA certificates
|
||||
to the caPubs field of the context.
|
||||
The reference counts of those certificates handled successfully are increased.
|
||||
|
||||
ossl_cmp_ctx_set0_validatedSrvCert() sets the validatedSrvCert of the context,
|
||||
which caches any already validated server cert, or NULL if not available.
|
||||
|
||||
ossl_cmp_ctx_set_status() sets the status field of the context.
|
||||
|
||||
ossl_cmp_ctx_set0_statusString() sets the statusString field of the context.
|
||||
|
||||
ossl_cmp_ctx_set_failInfoCode() sets the error code bits in the failInfoCode
|
||||
field of the context based on the given OSSL_CMP_PKIFAILUREINFO structure.
|
||||
|
||||
ossl_cmp_ctx_set0_newCert() sets the given (newly enrolled) certificate
|
||||
in the context.
|
||||
|
||||
ossl_cmp_ctx_set1_extraCertsIn() sets the extraCertsIn field of the context.
|
||||
The reference counts of those certificates handled successfully are increased.
|
||||
|
||||
ossl_cmp_ctx_set1_recipNonce() sets the given recipient nonce in the context.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
CMP is defined in RFC 4210 (and CRMF in RFC 4211).
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
All functions return 1 on success, 0 on error.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The OpenSSL CMP support was added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
this file except in compliance with the License. You can obtain a copy
|
||||
in the file LICENSE in the source distribution or at
|
||||
L<https://www.openssl.org/source/license.html>.
|
||||
|
||||
=cut
|
||||
@@ -0,0 +1,60 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ossl_cmp_sk_X509_add1_cert,
|
||||
ossl_cmp_sk_X509_add1_certs,
|
||||
ossl_cmp_X509_STORE_add1_certs,
|
||||
ossl_cmp_X509_STORE_get1_certs
|
||||
- functions manipulating lists of certificates
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/cmp_util.h>
|
||||
|
||||
int ossl_cmp_sk_X509_add1_cert(STACK_OF(X509) *sk, X509 *cert,
|
||||
int no_dup, int prepend);
|
||||
int ossl_cmp_sk_X509_add1_certs(STACK_OF(X509) *sk, STACK_OF(X509) *certs,
|
||||
int no_self_signed, int no_dups, int prepend);
|
||||
int ossl_cmp_X509_STORE_add1_certs(X509_STORE *store, STACK_OF(X509) *certs,
|
||||
int only_self_signed);
|
||||
STACK_OF(X509) *ossl_cmp_X509_STORE_get1_certs(X509_STORE *store);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
ossl_cmp_sk_X509_add1_cert() appends or prepends (depending on the I<prepend>
|
||||
argument) a certificate to the given list,
|
||||
optionally only if it is not already contained.
|
||||
On success the reference count of the certificate is increased.
|
||||
|
||||
ossl_cmp_sk_X509_add1_certs() appends or prepends (depending on the I<prepend>
|
||||
argument) a list of certificates to the given list,
|
||||
optionally only if not self-signed and optionally only if not already contained.
|
||||
The reference counts of those certificates appended successfully are increased.
|
||||
|
||||
ossl_cmp_X509_STORE_add1_certs() adds all or only self-signed certificates from
|
||||
the given stack to given store. The I<certs> parameter may be NULL.
|
||||
|
||||
ossl_cmp_X509_STORE_get1_certs() retrieves a copy of all certificates in the
|
||||
given store.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ossl_cmp_X509_STORE_get1_certs() returns a list of certificates, NULL on error.
|
||||
|
||||
All other functions return 1 on success, 0 on error.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The OpenSSL CMP support was added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
this file except in compliance with the License. You can obtain a copy
|
||||
in the file LICENSE in the source distribution or at
|
||||
L<https://www.openssl.org/source/license.html>.
|
||||
|
||||
=cut
|
||||
@@ -9,7 +9,7 @@ ossl_init_thread_deregister
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "internal/cryptlib_int.h"
|
||||
#include "crypto/cryptlib.h"
|
||||
#include <openssl/core.h>
|
||||
|
||||
typedef void (*OSSL_thread_stop_handler_fn)(void *arg);
|
||||
@@ -33,17 +33,17 @@ stopping the stop handler is called (while on that thread) and the code can
|
||||
clean up the value stored in the thread local variable.
|
||||
|
||||
A new stop handler is registerd using the function ossl_init_thread_start().
|
||||
The B<index> parameter should be a unique value that can be used to identify a
|
||||
The I<index> parameter should be a unique value that can be used to identify a
|
||||
set of common stop handlers and is passed in a later call to
|
||||
ossl_init_thread_deregister. If no later call to ossl_init_thread_deregister is
|
||||
made then NULL can be passed for this parameter. The B<arg> parameter is passed
|
||||
made then NULL can be passed for this parameter. The I<arg> parameter is passed
|
||||
back as an argument to the stop handler when it is later invoked. Finally the
|
||||
B<handfn> is a function pointer to the stop handler itself.
|
||||
I<handfn> is a function pointer to the stop handler itself.
|
||||
|
||||
In the event that previously registered stop handlers need to be deregistered
|
||||
then this can be done using the function ossl_init_thread_deregister().
|
||||
This will deregister all stop handlers (no matter which thread they were
|
||||
registered for) which the same B<index> value.
|
||||
registered for) which the same I<index> value.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ Remove a temporary store.
|
||||
Look up an already existing method from a store by name.
|
||||
|
||||
The store may be given with I<store>.
|
||||
B<NULL> is a valid value and means that a sub-system default store
|
||||
NULL is a valid value and means that a sub-system default store
|
||||
must be used.
|
||||
This default store should be stored in the library context I<libctx>.
|
||||
|
||||
@@ -107,7 +107,7 @@ Places the I<method> created by the construct() function (see below)
|
||||
in a store.
|
||||
|
||||
The store may be given with I<store>.
|
||||
B<NULL> is a valid value and means that a sub-system default store
|
||||
NULL is a valid value and means that a sub-system default store
|
||||
must be used.
|
||||
This default store should be stored in the library context I<libctx>.
|
||||
|
||||
@@ -141,7 +141,7 @@ the reference count reaches zero.
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ossl_method_construct() returns a constructed method on success, or
|
||||
B<NULL> on error.
|
||||
NULL on error.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
=head1 NAME
|
||||
|
||||
ossl_namemap_new, ossl_namemap_free, ossl_namemap_stored,
|
||||
ossl_namemap_add, ossl_namemap_name2num, ossl_namemap_doall_names
|
||||
ossl_namemap_add, ossl_namemap_add_n,
|
||||
ossl_namemap_name2num, ossl_namemap_name2num_n,
|
||||
ossl_namemap_doall_names
|
||||
- internal number E<lt>-E<gt> name map
|
||||
|
||||
=head1 SYNOPSIS
|
||||
@@ -16,8 +18,12 @@ ossl_namemap_add, ossl_namemap_name2num, ossl_namemap_doall_names
|
||||
void ossl_namemap_free(OSSL_NAMEMAP *namemap);
|
||||
|
||||
int ossl_namemap_add(OSSL_NAMEMAP *namemap, int number, const char *name);
|
||||
int ossl_namemap_add_n(OSSL_NAMEMAP *namemap, int number,
|
||||
const char *name, size_t name_len);
|
||||
|
||||
int ossl_namemap_name2num(const OSSL_NAMEMAP *namemap, const char *name);
|
||||
int ossl_namemap_name2num_n(const OSSL_NAMEMAP *namemap,
|
||||
const char *name, size_t name_len);
|
||||
void ossl_namemap_doall_names(const OSSL_NAMEMAP *namemap, int number,
|
||||
void (*fn)(const char *name, void *data),
|
||||
void *data);
|
||||
@@ -43,12 +49,18 @@ ossl_namemap_add() adds a new name to the namemap if it's not already
|
||||
present.
|
||||
If the given I<number> is zero, a new number will be allocated to
|
||||
identify this I<name>.
|
||||
If the given I<number> is non-zero, the I<name> is added to the set of
|
||||
If the given I<number> is nonzero, the I<name> is added to the set of
|
||||
names already associated with that number.
|
||||
|
||||
ossl_namemap_name2num() finds the number corresponding to the given
|
||||
I<name>.
|
||||
|
||||
ossl_namemap_add_n() and ossl_namemap_name2num_n() do the same thing
|
||||
as ossl_namemap_add() and ossl_namemap_name2num(), but take a string
|
||||
length I<name_len> as well, allowing the caller to use a fragment of
|
||||
a string as a name.
|
||||
|
||||
|
||||
ossl_namemap_doall_names() walks through all names associated with
|
||||
I<number> in the given I<namemap> and calls the function I<fn> for
|
||||
each of them.
|
||||
@@ -60,15 +72,16 @@ pass extra data for that function to use.
|
||||
ossl_namemap_new() and ossl_namemap_stored() return the pointer to a
|
||||
B<OSSL_NAMEMAP>, or NULL on error.
|
||||
|
||||
ossl_namemap_add() returns the number associated with the added
|
||||
string, or zero on error.
|
||||
ossl_namemap_add() and ossl_namemap_add_n() return the number associated
|
||||
with the added string, or zero on error.
|
||||
|
||||
ossl_namemap_num2names() returns a pointer to a NULL-terminated list of
|
||||
pointers to the names corresponding to the given number, or NULL if
|
||||
it's undefined in the given B<OSSL_NAMEMAP>.
|
||||
|
||||
ossl_namemap_name2num() returns the number corresponding to the given
|
||||
name, or 0 if it's undefined in the given B<OSSL_NAMEMAP>.
|
||||
ossl_namemap_name2num() and ossl_namemap_name2num_n() return the number
|
||||
corresponding to the given name, or 0 if it's undefined in the given
|
||||
B<OSSL_NAMEMAP>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ ossl_param_bld_push_octet_ptr
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment generic
|
||||
=for openssl generic
|
||||
|
||||
#include "internal/params_build.h"
|
||||
|
||||
@@ -48,14 +48,14 @@ ossl_param_bld_push_octet_ptr
|
||||
=head1 DESCRIPTION
|
||||
|
||||
A collection of utility functions that simplify the creation of OSSL_PARAM
|
||||
arrays. The B<TYPE> names are as per L<OSSL_PARAM_int(3)>.
|
||||
arrays. The B<I<TYPE>> names are as per L<OSSL_PARAM_int(3)>.
|
||||
|
||||
ossl_param_bld_init() initialises the OSSL_PARAM_BLD structure so that values
|
||||
can be added.
|
||||
Any existing values are cleared.
|
||||
|
||||
ossl_param_bld_to_param() converts a built up OSSL_PARAM_BLD structure
|
||||
B<bld> into an allocated OSSL_PARAM array.
|
||||
I<bld> into an allocated OSSL_PARAM array.
|
||||
The OSSL_PARAM array and all associated storage must be freed by calling
|
||||
ossl_param_bld_free() with the functions return value.
|
||||
|
||||
@@ -64,44 +64,52 @@ ossl_param_bld_to_param().
|
||||
|
||||
ossl_param_bld_to_param_ex() behaves like ossl_param_bld_to_param(), except that
|
||||
no additional memory is allocated.
|
||||
An OSSL_PARAM array of at least B<param_n> elements is passed in as B<params>.
|
||||
An OSSL_PARAM array of at least I<param_n> elements is passed in as I<params>.
|
||||
The auxiliary storage for the parameters is a block of memory pointed to
|
||||
by B<data> of at least B<data_n> bytes in size.
|
||||
by I<data> of at least I<data_n> bytes in size.
|
||||
If required, secure memory for private BIGNUMs should be pointed to by
|
||||
B<secure> of at least B<secure_n> bytes in size.
|
||||
I<secure> of at least I<secure_n> bytes in size.
|
||||
|
||||
ossl_param_bld_push_TYPE() are a series of functions which will create
|
||||
OSSL_PARAM objects of the specified size and correct type for the B<val>
|
||||
=begin comment
|
||||
|
||||
POD is pretty good at recognising function names and making them appropriately
|
||||
bold... however, when part of the function name is variable, we have to help
|
||||
the processor along
|
||||
|
||||
=end comment
|
||||
|
||||
B<ossl_param_bld_push_I<TYPE>>() are a series of functions which will create
|
||||
OSSL_PARAM objects of the specified size and correct type for the I<val>
|
||||
argument.
|
||||
B<val> is stored by value and an expression or auto variable can be used.
|
||||
I<val> is stored by value and an expression or auto variable can be used.
|
||||
|
||||
ossl_param_bld_push_BN() is a function that will create an OSSL_PARAM object
|
||||
that holds the specified BIGNUM B<bn>.
|
||||
If B<bn> is marked as being securely allocated, it's OSSL_PARAM representation
|
||||
that holds the specified BIGNUM I<bn>.
|
||||
If I<bn> is marked as being securely allocated, it's OSSL_PARAM representation
|
||||
will also be securely allocated.
|
||||
The B<bn> argument is stored by reference and the underlying BIGNUM object
|
||||
The I<bn> argument is stored by reference and the underlying BIGNUM object
|
||||
must exist until after ossl_param_bld_to_param() has been called.
|
||||
|
||||
ossl_param_bld_push_utf8_string() is a function that will create an OSSL_PARAM
|
||||
object that references the UTF8 string specified by B<buf>.
|
||||
If the length of the string, B<bsize>, is zero then it will be calculated.
|
||||
The string that B<buf> points to is stored by reference and must remain in
|
||||
object that references the UTF8 string specified by I<buf>.
|
||||
If the length of the string, I<bsize>, is zero then it will be calculated.
|
||||
The string that I<buf> points to is stored by reference and must remain in
|
||||
scope until after ossl_param_bld_to_param() has been called.
|
||||
|
||||
ossl_param_bld_push_octet_string() is a function that will create an OSSL_PARAM
|
||||
object that references the octet string specified by B<buf> and <bsize>.
|
||||
The memory that B<buf> points to is stored by reference and must remain in
|
||||
object that references the octet string specified by I<buf> and <bsize>.
|
||||
The memory that I<buf> points to is stored by reference and must remain in
|
||||
scope until after ossl_param_bld_to_param() has been called.
|
||||
|
||||
ossl_param_bld_push_utf8_ptr() is a function that will create an OSSL_PARAM
|
||||
object that references the UTF8 string specified by B<buf>.
|
||||
If the length of the string, B<bsize>, is zero then it will be calculated.
|
||||
The string B<buf> points to is stored by reference and must remain in
|
||||
object that references the UTF8 string specified by I<buf>.
|
||||
If the length of the string, I<bsize>, is zero then it will be calculated.
|
||||
The string I<buf> points to is stored by reference and must remain in
|
||||
scope until the OSSL_PARAM array is freed.
|
||||
|
||||
ossl_param_bld_push_octet_ptr() is a function that will create an OSSL_PARAM
|
||||
object that references the octet string specified by B<buf>.
|
||||
The memory B<buf> points to is stored by reference and must remain in
|
||||
object that references the octet string specified by I<buf>.
|
||||
The memory I<buf> points to is stored by reference and must remain in
|
||||
scope until the OSSL_PARAM array is freed.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
@@ -7,14 +7,14 @@ ossl_prov_util_nid_to_name
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "internal/providercommon.h"
|
||||
#include "prov/providercommon.h"
|
||||
|
||||
const char *ossl_prov_util_nid_to_name(int nid);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ossl_prov_util_nid_to_name() returns the name of an algorithm given a NID
|
||||
in the B<nid> parameter. For the default and legacy providers it is equivalent
|
||||
in the I<nid> parameter. For the default and legacy providers it is equivalent
|
||||
to calling OBJ_nid2sn(). The FIPS provider does not have the object database
|
||||
code available to it (because that code relies on the ASN.1 code), so this
|
||||
function is a static lookup of all known FIPS algorithm NIDs.
|
||||
|
||||
@@ -184,7 +184,7 @@ ossl_provider_new().
|
||||
ossl_provider_dso() returns a reference to the module, for providers
|
||||
that come in the form of loadable modules.
|
||||
|
||||
ossl_provider_module_name() returns the file name of the module, for
|
||||
ossl_provider_module_name() returns the filename of the module, for
|
||||
providers that come in the form of loadable modules.
|
||||
|
||||
ossl_provider_module_path() returns the full path of the module file,
|
||||
|
||||
@@ -7,7 +7,7 @@ rand_bytes_ex, rand_priv_bytes_ex
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "internal/rand_int.h"
|
||||
#include "crypto/rand.h"
|
||||
|
||||
int rand_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num);
|
||||
int rand_priv_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num);
|
||||
@@ -16,9 +16,9 @@ rand_bytes_ex, rand_priv_bytes_ex
|
||||
|
||||
rand_bytes_ex() and rand_priv_bytes_ex() are the equivalent of RAND_bytes() and
|
||||
RAND_priv_bytes() in the public API except that they both take an additional
|
||||
B<ctx> parameter.
|
||||
I<ctx> parameter.
|
||||
The DRBG used for the operation is the public or private DRBG associated with
|
||||
the specified B<ctx>. The parameter can be NULL, in which case
|
||||
the specified I<ctx>. The parameter can be NULL, in which case
|
||||
the default library ctx is used.
|
||||
If the default RAND_METHOD has been changed then for compatibility reasons the
|
||||
RAND_METHOD will be used in preference and the DRBG of the library context
|
||||
|
||||
@@ -0,0 +1,602 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
build.info - Building information files
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<IF[>0|1B<]>
|
||||
|
||||
B<ELSIF[>0|1B<]>
|
||||
|
||||
B<ELSE>
|
||||
|
||||
B<ENDIF>
|
||||
|
||||
B<SUBDIRS=> I<dir> ...
|
||||
|
||||
B<PROGRAMS=> I<name> ...
|
||||
|
||||
B<LIBS=> I<name> ...
|
||||
|
||||
B<MODULES=> I<name> ...
|
||||
|
||||
B<SCRIPTS=> I<name> ...
|
||||
|
||||
B<DEPEND[>I<item>B<]=> I<otheritem> ...
|
||||
|
||||
B<GENERATE[>I<item>B<]=> I<generator> I<generator-args> ...
|
||||
|
||||
B<SOURCE[>I<item>B<]=> I<file> ...
|
||||
|
||||
B<SHARED_SOURCE[>I<item>B<]=> I<file> ...
|
||||
|
||||
B<DEFINE[>I<item>B<]=> I<name>[B<=>I<value>] ...
|
||||
|
||||
B<INCLUDE[>I<item>B<]=> I<dir> ...
|
||||
|
||||
B<$>I<VARIABLE>B<=>I<value>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
OpenSSL's build system revolves around three questions:
|
||||
|
||||
=over 4
|
||||
|
||||
=item What to build for?
|
||||
|
||||
This is about choice of platform (combination of hardware, operating
|
||||
system, and toolchain).
|
||||
|
||||
=item What to build?
|
||||
|
||||
This is about having all the information on what needs to be built and
|
||||
from what.
|
||||
|
||||
=item How to build it?
|
||||
|
||||
This is about build file generation.
|
||||
|
||||
=back
|
||||
|
||||
This document is all about the second item, "What to build?", and most
|
||||
of all, how to specify that information.
|
||||
|
||||
For some terms used in this document, please see the L</GLOSSARY> at
|
||||
the end.
|
||||
|
||||
=head2 F<build.info> files
|
||||
|
||||
F<build.info> files are meta data files for OpenSSL's built file
|
||||
generators, and are used to specify exactly what end product files
|
||||
(programs, libraries, modules or scripts) are to be produced, and from
|
||||
what sources.
|
||||
|
||||
Intermediate files, such as object files, are seldom refered to at
|
||||
all. They sometimes can be, if there's a need, but this should happen
|
||||
very rarely, and support for that sort of thing is added on as-needed
|
||||
basis.
|
||||
|
||||
Any time a directory or file is expected in a statement value, Unix
|
||||
syntax must be used, which means that the slash C</> must be used as
|
||||
the directory separator.
|
||||
|
||||
=head2 General syntax
|
||||
|
||||
=head3 Comments
|
||||
|
||||
Comments are any line that start with a hash sign (C<#>). The hash
|
||||
sign may be preceded by any number of horizontal spaces.
|
||||
|
||||
=head3 Filenames
|
||||
|
||||
F<build.info> files are platform agnostic. This means that there is
|
||||
some information in them that is representative rather than specific.
|
||||
|
||||
This is particularly visible with end product names, they work more
|
||||
like a tag than as the actual filename that's going to be produced.
|
||||
This is because different platforms have different decorations on
|
||||
different types of files.
|
||||
|
||||
For example, if we say that we want to produce a program C<foo>, it
|
||||
would look like this:
|
||||
|
||||
PROGRAM=foo
|
||||
|
||||
However, the program filename may end up being just C<foo> (typical
|
||||
for Unix), or C<foo.exe> (typical for Windows), or even C<BLAH$FOO.EXE>
|
||||
(possible on VMS, depending on policy).
|
||||
|
||||
These platform specific decorations are not the concern of
|
||||
F<build.info> files. The build file generators are responsible for
|
||||
transforming these platform agnostic names to their platform specific
|
||||
counterparts.
|
||||
|
||||
=head3 Statements
|
||||
|
||||
With the exception of variables and conditions, the general statement
|
||||
syntax is one of:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<I<KEYWORD>> B<=> I<value> ...
|
||||
|
||||
=item B<I<KEYWORD>[>I<item>B<]> B<=> I<value> ...
|
||||
|
||||
=back
|
||||
|
||||
Every B<I<KEYWORD>> represents some particular type of information.
|
||||
|
||||
The first form (sometimes called "plain statement") is used to specify
|
||||
information on what end products need to be built, for example:
|
||||
|
||||
PROGRAMS=foo bar
|
||||
LIBS=libpoly libcookie
|
||||
MODULES=awesome-plugin
|
||||
SCRIPTS=tool1 tool2
|
||||
SUBDIRS=dir1 dir2
|
||||
|
||||
This says that we want to build programs C<foo> and C<bar>, the
|
||||
libraries C<libpoly> and C<libcookie>, an awesome plugin module
|
||||
C<awesome-plugin>, a couple of scripts C<tool1> and C<tool2>, and
|
||||
finally that there are more F<build.info> files in subdirectories
|
||||
C<dir1> and C<dir2>.
|
||||
|
||||
The second form (sometimes called "indexed statement") is used to
|
||||
specify further details for existing items, for example:
|
||||
|
||||
SOURCE[foo]=foo.c details.c
|
||||
DEPEND[foo]=libcookie
|
||||
|
||||
This says that the program C<foo> is built from the source files
|
||||
F<foo.c> and F<details.c>, and that it depends on the library
|
||||
C<libcookie> (in other words, the library will be included when
|
||||
linking that program together).
|
||||
|
||||
For any indexed statement for which the item hasn't been specified
|
||||
through any plain statement, or where the item exists but the indexed
|
||||
statement does not apply, the value is simply ignored by the build
|
||||
file generators.
|
||||
|
||||
=head3 Statement attributes
|
||||
|
||||
Some statements can have attributes added to them, to allow for
|
||||
variations on how they are treated.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<I<KEYWORD>{> I<attrib> | I<attrib>B<=>I<attrib-value> [,...]B<}>
|
||||
B<=> I<value> ...
|
||||
|
||||
=item B<I<KEYWORD>[>I<item>B<]{> I<attrib> | I<attrib>B<=>I<attrib-value>
|
||||
[,...]B<}> B<=> I<value> ...
|
||||
|
||||
=back
|
||||
|
||||
Attributes are passed as they are to the build file generators, and
|
||||
the exact interpretation of those attributes is entirely up to them
|
||||
(see L</Known attributes> below for details).
|
||||
|
||||
A current example:
|
||||
|
||||
LIBS{noinst,has_main}=libtestutil.a
|
||||
|
||||
This says that the static library C<libtestutil.a> should not be
|
||||
installed (C<noinst>), and that it includes an object file that has
|
||||
the C<main> symbol (C<has_main>). Most platforms don't need to know
|
||||
the latter, but there are some where the program linker will not look
|
||||
for C<main> in libraries unless it's explicitly told so, so this is
|
||||
way to tell the build file generator to emit the necessary command
|
||||
options to make that happen.
|
||||
|
||||
Attributes are accumulated globally. This means that a library could
|
||||
be given like this in different places:
|
||||
|
||||
# Location 1
|
||||
LIBS=libwhatever
|
||||
|
||||
# Location 2
|
||||
LIBS{noinst}=libwhatever
|
||||
|
||||
# Location 3
|
||||
LIBS{has_main}=libwhatever
|
||||
|
||||
The end result is that the library C<libwhatever> will have the
|
||||
attributes C<noinst> and C<has_main> attached to it.
|
||||
|
||||
=head3 Quoting and tokens
|
||||
|
||||
Statement values are normally split into a list of tokens, separated
|
||||
by spaces.
|
||||
|
||||
To avoid having a value split up into several tokens, they may be
|
||||
quoted with double (C<">) or single (C<'>) quotes.
|
||||
|
||||
For example:
|
||||
|
||||
PROGRAMS=foo "space cadet" bar
|
||||
|
||||
This says that we sant to build three programs, C<foo>, C<space cadet>
|
||||
and C<bar>.
|
||||
|
||||
=head3 Conditionals
|
||||
|
||||
F<build.info> files include a very simple condition system, involving
|
||||
the following keywords:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<IF[>0|1B<]>
|
||||
|
||||
=item B<ELSIF[>0|1B<]>
|
||||
|
||||
=item B<ELSE>
|
||||
|
||||
=item B<ENDIF>
|
||||
|
||||
=back
|
||||
|
||||
This works like any condition system with similar syntax, and the
|
||||
condition value in B<IF> and B<ELSIF> can really be any literal value
|
||||
that perl can interpret as true or false.
|
||||
|
||||
Conditional statements are nesting.
|
||||
|
||||
In itself, this is not very powerful, but together with L</Perl nuggets>,
|
||||
it can be.
|
||||
|
||||
=head3 Variables
|
||||
|
||||
F<build.info> handles simple variables. They are defined by
|
||||
assignment:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<$>I<NAME> B<=> I<value>
|
||||
|
||||
=back
|
||||
|
||||
These variables can then be used as part of any statement value or
|
||||
indexed statement item. This should be used with some care, as
|
||||
I<variables are expanded into their values before the value they are
|
||||
part of is tokenized>.
|
||||
|
||||
I<Variable assignment values are not tokenized.>
|
||||
|
||||
=head2 Scope
|
||||
|
||||
Most of the statement values are accumulated globally from all the
|
||||
F<build.info> files that are digested. There are two exceptions,
|
||||
F<build.info> variables and B<SUBDIRS> statement, for which the scope
|
||||
is the F<build.info> file they are in.
|
||||
|
||||
=head2 Perl nuggets
|
||||
|
||||
Whenever a F<build.info> file is read, it is passed through the Perl
|
||||
template processor L<OpenSSL::Template>, which is a small extension of
|
||||
L<Text::Template>.
|
||||
|
||||
Perl nuggets are anything between C<{-> and C<-}>, and whatever the
|
||||
result from such a nugget is, that value will replace the nugget in
|
||||
text form. This is useful to get dynamically generated F<build.info>
|
||||
statements, and is most often seen used together with the B<IF> and
|
||||
B<ELSIF> conditional statements.
|
||||
|
||||
For example:
|
||||
|
||||
IF[{- $disabled{something} -}]
|
||||
# do whatever's needed when "something" is disabled
|
||||
ELSIF[{- $somethingelse eq 'blah' -}]
|
||||
# do whatever's needed to satisfy this condition
|
||||
ELSE
|
||||
# fallback
|
||||
ENDIF
|
||||
|
||||
Normal Perl scope applies, so it's possible to have an initial perl
|
||||
nugget that sets diverse global variables that are used in later
|
||||
nuggets. Each nugget is a Perl block of its own, so B<my> definitions
|
||||
are only in scope within the same nugget, while B<our> definitions are
|
||||
in scope within the whole F<build.info> file.
|
||||
|
||||
=head1 REFERENCE
|
||||
|
||||
=head2 Conditionals
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<IF[>0|1B<]>
|
||||
|
||||
If the condition is true (represented as C<1> here), everything
|
||||
between this B<IF> and the next corresponding B<ELSIF> or B<ELSE>
|
||||
applies, and the rest until the corresponding B<ENDIF> is skipped
|
||||
over.
|
||||
|
||||
If the condition is false (represented as C<0> here), everything
|
||||
from this B<IF> is skipped over until the next corresponding B<ELSIF>
|
||||
or B<ELSE>, at which point processing continues.
|
||||
|
||||
=item B<ELSE>
|
||||
|
||||
If F<build.info> statements have been skipped over to this point since
|
||||
the corresponding B<IF> or B<ELSIF>, F<build.info> processing starts
|
||||
again following this line.
|
||||
|
||||
=item B<ELSIF[>0|1B<]>
|
||||
|
||||
This is B<ELSE> and B<IF> combined.
|
||||
|
||||
=item B<ENDIF>
|
||||
|
||||
Marks the end of a conditional.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Plain statements
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<SUBDIRS=> I<dir> ...
|
||||
|
||||
This instructs the F<build.info> reader to also read the F<build.info>
|
||||
file in every specified directory. All directories should be given
|
||||
relative to the location of the current F<build.info> file.
|
||||
|
||||
=item B<PROGRAMS=> I<name> ...
|
||||
|
||||
Collects names of programs that should be built.
|
||||
|
||||
B<PROGRAMS> statements may have attributes, which apply to all the
|
||||
programs given in such a statement. For example:
|
||||
|
||||
PROGRAMS=foo
|
||||
PROGRAMS{noinst}=bar
|
||||
|
||||
With those two lines, the program C<foo> will not have the attribute
|
||||
C<noinst>, while the program C<bar> will.
|
||||
|
||||
=item B<LIBS=> I<name> ...
|
||||
|
||||
Collects names of libraries that should be built.
|
||||
|
||||
The normal case is that libraries are built in both static and shared
|
||||
form. However, if a name ends with C<.a>, only the static form will
|
||||
be produced.
|
||||
|
||||
Similarly, libraries may be referred in indexed statements as just the
|
||||
plain name, or the name including the ending C<.a>. If given without
|
||||
the ending C<.a>, any form available will be used, but if given with
|
||||
the ending C<.a>, the static library form is used unconditionally.
|
||||
|
||||
B<LIBS> statements may have attributes, which apply to all the
|
||||
libraries given in such a statement. For example:
|
||||
|
||||
LIBS=libfoo
|
||||
LIBS{noinst}=libbar
|
||||
|
||||
With those two lines, the library C<libfoo> will not have the
|
||||
attribute C<noinst>, while the library C<libbar> will.
|
||||
|
||||
=item B<MODULES=> I<name>
|
||||
|
||||
Collects names of dynamically loadable modules that should be built.
|
||||
|
||||
B<MODULES> statements may have attributes, which apply to all the
|
||||
modules given in such a statement. For example:
|
||||
|
||||
MODULES=foo
|
||||
MODULES{noinst}=bar
|
||||
|
||||
With those two lines, the module C<foo> will not have the attribute
|
||||
C<noinst>, while the module C<bar> will.
|
||||
|
||||
=item B<SCRIPTS=> I<name>
|
||||
|
||||
Collects names of scripts that should be built, or that just exist.
|
||||
That is how they differ from programs, as programs are always expected
|
||||
to be compiled from multiple sources.
|
||||
|
||||
B<SCRIPTS> statements may have attributes, which apply to all the
|
||||
scripts given in such a statement. For example:
|
||||
|
||||
SCRIPTS=foo
|
||||
SCRIPTS{noinst}=bar
|
||||
|
||||
With those two lines, the script C<foo> will not have the attribute
|
||||
C<noinst>, while the script C<bar> will.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Indexed statements
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<DEPEND[>I<item>B<]> B<=> I<file> ...
|
||||
|
||||
Collects dependencies, where I<item> depends on the given I<file>s.
|
||||
|
||||
As a special case, the I<item> may be empty, for which the build file
|
||||
generators should make the whole build depend on the given I<file>s,
|
||||
rather than some specific I<item>.
|
||||
|
||||
The I<item> may be any program, library, module, script, or any
|
||||
filename used as a value anywhere.
|
||||
|
||||
B<DEPEND> statements may have attributes, which apply to each
|
||||
individual dependency in such a statement. For example:
|
||||
|
||||
DEPEND[libfoo.a]=libmandatory.a
|
||||
DEPEND[libfoo.a]{weak}=libbar.a libcookie.a
|
||||
|
||||
With those statements, the dependency between C<libfoo.a> and
|
||||
C<libmandatory.a> is strong, while the dependency between C<libfoo.a>
|
||||
and C<libbar.a> and C<libcookie.a> is weak. See the description of
|
||||
B<weak> in L</Known attributes> for more information.
|
||||
|
||||
=item B<GENERATE[>I<item>B<]> B<=> I<generator> I<generator-arg> ...
|
||||
|
||||
This specifies that the I<item> is generated using the I<generator>
|
||||
with the I<generator-arg>s as arguments, plus the name of the output
|
||||
file as last argument.
|
||||
|
||||
For I<generator>s where this is applicable, any B<INCLUDE> statement
|
||||
for the same I<item> will be given to the I<generator> as its
|
||||
inclusion directories. Likewise, any B<DEPEND> statement for the same
|
||||
I<item> will be given to the I<generator> as an extra file or module
|
||||
to load, where this is applicable.
|
||||
|
||||
The build file generators must be able to recognise the I<generator>.
|
||||
Currently, they at least recognise files ending in C<.pl>, and will
|
||||
execute them to generate the I<item>, and files ending in C<.in>,
|
||||
which will be used as input for L<OpenSSL::Template> to generate
|
||||
I<item> (in other words, we use the exact same style of
|
||||
L</Perl nuggets> mechanism that is used to read F<build.info> files).
|
||||
|
||||
=item B<SOURCE[>I<item>B<]> B<=> I<file> ...
|
||||
|
||||
Collects filenames that will be used as source files for I<item>.
|
||||
|
||||
The I<item> must be a singular item, and may be any program, library,
|
||||
module or script given with B<PROGRAMS>, B<LIBS>, B<MODULES> and
|
||||
B<SCRIPTS>.
|
||||
|
||||
Static libraries may be sources. In that case, its object files are
|
||||
used directly when building I<item> instead of relying on library
|
||||
dependency and symbol resolution (through B<DEPEND> statements).
|
||||
|
||||
=item B<SHARED_SOURCE[>I<item>B<]> B<=> I<file> ...
|
||||
|
||||
Collects filenames that will be used as source files for I<item>.
|
||||
|
||||
The I<item> must be a singular item, and may be any library or module
|
||||
given with B<LIBS> or B<MODULES>. For libraries, the given filenames
|
||||
are only used for their shared form, so if the item is a library name
|
||||
ending with C<.a>, the filenames will be ignored.
|
||||
|
||||
=item B<DEFINE[>I<item>B<]> B<=> I<name>[B<=>I<value>] ...
|
||||
|
||||
Collects I<name> / I<value> pairs (or just I<name> with no defined
|
||||
value if no I<value> is given) associated with I<item>.
|
||||
|
||||
The build file generators will decide what to do with them. For
|
||||
example, these pairs should become C macro definitions whenever a
|
||||
C<.c> file is built into an object file.
|
||||
|
||||
=item B<INCLUDE[>I<item>B<]> B<=> I<dir> ...
|
||||
|
||||
Collects inclusion directories that will be used when building the
|
||||
I<item> components (object files and whatever else). This is used at
|
||||
the discretion of the build file generators.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Known attributes
|
||||
|
||||
Note: this will never be a complete list of attributes.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<noinst>
|
||||
|
||||
This is used to specify that the end products this is set for should
|
||||
not be installed, that they are only internal. This is applicable on
|
||||
internal static libraries, or on test programs.
|
||||
|
||||
=item B<misc>
|
||||
|
||||
This is used with B<SCRIPTS>, to specify that some scripts should be
|
||||
installed in the "misc" directory rather than the normal program
|
||||
directory.
|
||||
|
||||
=item B<engine>
|
||||
|
||||
This is used with B<MODULES>, to specify what modules are engines and
|
||||
should be installed in the engines directory instead of the modules
|
||||
directory.
|
||||
|
||||
=item B<weak>
|
||||
|
||||
This is used with B<DEPEND> where libraries are involved, to specify
|
||||
that the dependency between two libraries is weak and is only there to
|
||||
infer order.
|
||||
|
||||
Without this attribute, a dependency between two libraries, expressed
|
||||
like this, means that if C<libfoo.a> appears in a linking command
|
||||
line, so will C<libmandatory.a>:
|
||||
|
||||
DEPEND[libfoo.a]=libmandatory.a
|
||||
|
||||
With this attribute, a dependency between two libraries, expressed
|
||||
like this, means that if I<both> C<libfoo.a> and C<libmandatory.a>
|
||||
appear in a linking command line (because of recursive dependencies
|
||||
through other libraries), they will be ordered in such a way that this
|
||||
dependency is maintained:
|
||||
|
||||
DEPEND[libfoo.a]{weak}=libfoo.a libcookie.a
|
||||
|
||||
This is useful in complex dependecy trees where two libraries can be
|
||||
used as alternatives for each other. In this example, C<lib1.a> and
|
||||
C<lib2.a> have alternative implementations of the same thing, and
|
||||
C<libmandatory.a> has unresolved references to that same thing, and is
|
||||
therefore depending on either of them, but not both at the same time:
|
||||
|
||||
DEPEND[program1]=libmandatory.a lib1.a
|
||||
DEPEND[program2]=libmandatory.a lib2.a
|
||||
DEPEND[libmandatory]{weak}=lib1.a lib2.a
|
||||
|
||||
=back
|
||||
|
||||
=head1 GLOSSARY
|
||||
|
||||
=over 4
|
||||
|
||||
=item "build file"
|
||||
|
||||
This is any platform specific file that describes the complete build,
|
||||
with platform specific commands. On Unix, this is typically
|
||||
F<Makefile>; on VMS, this is typically F<descrip.mms>.
|
||||
|
||||
=item "build file generator"
|
||||
|
||||
Perl code that generates build files, given configuration data and
|
||||
data collected from F<build.info> files.
|
||||
|
||||
=item "plain statement"
|
||||
|
||||
Any F<build.info> statement of the form B<I<KEYWORD>>=I<values>, with
|
||||
the exception of conditional statements and variable assignments.
|
||||
|
||||
=item "indexed statement"
|
||||
|
||||
Any F<build.info> statement of the form B<I<KEYWORD>[>I<item>B<]=>I<values>,
|
||||
with the exception of conditional statements.
|
||||
|
||||
=item "intermediate file"
|
||||
|
||||
Any file that's an intermediate between a source file and an end
|
||||
product.
|
||||
|
||||
=item "end product"
|
||||
|
||||
Any file that is mentioned in the B<PROGRAMS>, B<LIBS>, B<MODULES> or
|
||||
B<SCRIPTS>.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
For OpenSSL::Template documentation,
|
||||
C<perldoc -o man util/perl/OpenSSL/Template.pm>
|
||||
|
||||
L<Text::Temlate|https://metacpan.org/pod/Text::Template>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License 2.0 (the "License"). You may not use this
|
||||
file except in compliance with the License. You can obtain a copy in the file
|
||||
LICENSE in the source distribution or at
|
||||
L<https://www.openssl.org/source/license.html>.
|
||||
|
||||
=cut
|
||||
+40
-40
@@ -21,18 +21,18 @@ B<-signCA> |
|
||||
B<-signcert> |
|
||||
B<-crl> |
|
||||
B<-newca>
|
||||
[B<-extra-cmd> extra-params]
|
||||
[B<-extra-cmd> I<extra-params>]
|
||||
|
||||
B<CA.pl> B<-pkcs12> [B<-extra-pkcs12> extra-params] [B<certname>]
|
||||
B<CA.pl> B<-pkcs12> [B<-extra-pkcs12> I<extra-params>] [I<certname>]
|
||||
|
||||
B<CA.pl> B<-verify> [B<-extra-verify> extra-params] B<certfile>...
|
||||
B<CA.pl> B<-verify> [B<-extra-verify> I<extra-params>] I<certfile> ...
|
||||
|
||||
B<CA.pl> B<-revoke> [B<-extra-ca> extra-params] B<certfile> [B<reason>]
|
||||
B<CA.pl> B<-revoke> [B<-extra-ca> I<extra-params>] I<certfile> [I<reason>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<CA.pl> script is a perl script that supplies the relevant command line
|
||||
arguments to the B<openssl> command for some common certificate operations.
|
||||
arguments to the L<openssl(1)> command for some common certificate operations.
|
||||
It is intended to simplify the process of certificate creation and management
|
||||
by the use of some simple options.
|
||||
|
||||
@@ -47,19 +47,19 @@ Prints a usage message.
|
||||
=item B<-newcert>
|
||||
|
||||
Creates a new self signed certificate. The private key is written to the file
|
||||
"newkey.pem" and the request written to the file "newreq.pem".
|
||||
This argument invokes B<openssl req> command.
|
||||
F<newkey.pem> and the request written to the file F<newreq.pem>.
|
||||
Invokes L<openssl-req(1)>.
|
||||
|
||||
=item B<-newreq>
|
||||
|
||||
Creates a new certificate request. The private key is written to the file
|
||||
"newkey.pem" and the request written to the file "newreq.pem".
|
||||
Executes B<openssl req> command below the hood.
|
||||
F<newkey.pem> and the request written to the file F<newreq.pem>.
|
||||
Executes L<openssl-req(1)> under the hood.
|
||||
|
||||
=item B<-newreq-nodes>
|
||||
|
||||
Is like B<-newreq> except that the private key will not be encrypted.
|
||||
Uses B<openssl req> command.
|
||||
Uses L<openssl-req(1)>.
|
||||
|
||||
=item B<-newca>
|
||||
|
||||
@@ -67,68 +67,66 @@ Creates a new CA hierarchy for use with the B<ca> program (or the B<-signcert>
|
||||
and B<-xsign> options). The user is prompted to enter the filename of the CA
|
||||
certificates (which should also contain the private key) or by hitting ENTER
|
||||
details of the CA will be prompted for. The relevant files and directories
|
||||
are created in a directory called "demoCA" in the current directory.
|
||||
B<openssl req> and B<openssl ca> commands are get invoked.
|
||||
are created in a directory called F<demoCA> in the current directory.
|
||||
Uses L<openssl-req(1)> and L<openssl-ca(1)>.
|
||||
|
||||
=item B<-pkcs12>
|
||||
|
||||
Create a PKCS#12 file containing the user certificate, private key and CA
|
||||
certificate. It expects the user certificate and private key to be in the
|
||||
file "newcert.pem" and the CA certificate to be in the file demoCA/cacert.pem,
|
||||
it creates a file "newcert.p12". This command can thus be called after the
|
||||
file F<newcert.pem> and the CA certificate to be in the file F<demoCA/cacert.pem>,
|
||||
it creates a file F<newcert.p12>. This command can thus be called after the
|
||||
B<-sign> option. The PKCS#12 file can be imported directly into a browser.
|
||||
If there is an additional argument on the command line it will be used as the
|
||||
"friendly name" for the certificate (which is typically displayed in the browser
|
||||
list box), otherwise the name "My Certificate" is used.
|
||||
Delegates work to B<openssl pkcs12> command.
|
||||
Delegates work to L<openssl-pkcs12(1)>.
|
||||
|
||||
=item B<-sign>, B<-signcert>, B<-xsign>
|
||||
|
||||
Calls the B<ca> program to sign a certificate request. It expects the request
|
||||
to be in the file "newreq.pem". The new certificate is written to the file
|
||||
"newcert.pem" except in the case of the B<-xsign> option when it is written
|
||||
to standard output. Leverages B<openssl ca> command.
|
||||
Calls the L<openssl-ca(1)> command to sign a certificate request. It expects the
|
||||
request to be in the file F<newreq.pem>. The new certificate is written to the
|
||||
file F<newcert.pem> except in the case of the B<-xsign> option when it is
|
||||
written to standard output.
|
||||
|
||||
=item B<-signCA>
|
||||
|
||||
This option is the same as the B<-signreq> option except it uses the
|
||||
configuration file section B<v3_ca> and so makes the signed request a
|
||||
valid CA certificate. This is useful when creating intermediate CA from
|
||||
a root CA. Extra params are passed on to B<openssl ca> command.
|
||||
a root CA. Extra params are passed to L<openssl-ca(1)>.
|
||||
|
||||
=item B<-signcert>
|
||||
|
||||
This option is the same as B<-sign> except it expects a self signed certificate
|
||||
to be present in the file "newreq.pem".
|
||||
Extra params are passed on to B<openssl x509> and B<openssl ca> commands.
|
||||
to be present in the file F<newreq.pem>.
|
||||
Extra params are passed to L<openssl-x509(1)> and L<openssl-ca(1)>.
|
||||
|
||||
=item B<-crl>
|
||||
|
||||
Generate a CRL. Executes B<openssl ca> command.
|
||||
Generate a CRL. Executes L<openssl-ca(1)>.
|
||||
|
||||
=item B<-revoke certfile [reason]>
|
||||
=item B<-revoke> I<certfile> [I<reason>]
|
||||
|
||||
Revoke the certificate contained in the specified B<certfile>. An optional
|
||||
reason may be specified, and must be one of: B<unspecified>,
|
||||
B<keyCompromise>, B<CACompromise>, B<affiliationChanged>, B<superseded>,
|
||||
B<cessationOfOperation>, B<certificateHold>, or B<removeFromCRL>.
|
||||
Leverages B<openssl ca> command.
|
||||
Leverages L<openssl-ca(1)>.
|
||||
|
||||
=item B<-verify>
|
||||
|
||||
Verifies certificates against the CA certificate for "demoCA". If no
|
||||
Verifies certificates against the CA certificate for F<demoCA>. If no
|
||||
certificates are specified on the command line it tries to verify the file
|
||||
"newcert.pem". Invokes B<openssl verify> command.
|
||||
F<newcert.pem>. Invokes L<openssl-verify(1)>.
|
||||
|
||||
=item B<-extra-req> | B<-extra-ca> | B<-extra-pkcs12> | B<-extra-x509> | B<-extra-verify> <extra-params>
|
||||
=item B<-extra-req> | B<-extra-ca> | B<-extra-pkcs12> | B<-extra-x509> | B<-extra-verify> I<extra-params>
|
||||
|
||||
The purpose of these parameters is to allow optional parameters to be supplied
|
||||
to B<openssl> that this command executes. The B<-extra-cmd> are specific to the
|
||||
option being used and the B<openssl> command getting invoked. For example
|
||||
when this command invokes B<openssl req> extra parameters can be passed on
|
||||
with the B<-extra-req> parameter. The
|
||||
B<openssl> commands being invoked per option are documented below.
|
||||
Users should consult B<openssl> command documentation for more information.
|
||||
For each option B<extra-I<cmd>>, pass I<extra-params> to the L<openssl(1)>
|
||||
sub-command with the same name as I<cmd>, if that sub-command is invoked.
|
||||
For example, if L<openssl-req(1)> is invoked, the I<extra-params> given with
|
||||
B<-extra-req> will be passed to it.
|
||||
Users should consult L<openssl(1)> command documentation for more information.
|
||||
|
||||
=back
|
||||
|
||||
@@ -149,7 +147,7 @@ the request and finally create a PKCS#12 file containing it.
|
||||
=head1 DSA CERTIFICATES
|
||||
|
||||
Although the B<CA.pl> creates RSA CAs and requests it is still possible to
|
||||
use it with DSA certificates and requests using the L<req(1)> command
|
||||
use it with DSA certificates and requests using the L<openssl-req(1)> command
|
||||
directly. The following example shows the steps that would typically be taken.
|
||||
|
||||
Create some DSA parameters:
|
||||
@@ -164,7 +162,8 @@ Create the CA directories and files:
|
||||
|
||||
CA.pl -newca
|
||||
|
||||
enter cacert.pem when prompted for the CA file name.
|
||||
enter a filename (for example, F<cacert.pem>) when prompted for the CA file
|
||||
name.
|
||||
|
||||
Create a DSA certificate request and private key (a different set of parameters
|
||||
can optionally be created first):
|
||||
@@ -193,9 +192,10 @@ be wrong. In this case the command:
|
||||
can be used and the B<OPENSSL_CONF> environment variable changed to point to
|
||||
the correct path of the configuration file.
|
||||
|
||||
The script is intended as a simple front end for the B<openssl> program for use
|
||||
by a beginner. Its behaviour isn't always what is wanted. For more control over the
|
||||
behaviour of the certificate commands call the B<openssl> command directly.
|
||||
The script is intended as a simple front end for the L<openssl(1)> program for
|
||||
use by a beginner. Its behaviour isn't always what is wanted. For more control
|
||||
over the behaviour of the certificate commands call the L<openssl(1)> command
|
||||
directly.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
@@ -8,26 +8,26 @@ openssl-asn1parse - ASN.1 parsing tool
|
||||
|
||||
B<openssl> B<asn1parse>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-noout>]
|
||||
[B<-offset number>]
|
||||
[B<-length number>]
|
||||
[B<-offset> I<number>]
|
||||
[B<-length> I<number>]
|
||||
[B<-i>]
|
||||
[B<-oid filename>]
|
||||
[B<-oid> I<filename>]
|
||||
[B<-dump>]
|
||||
[B<-dlimit num>]
|
||||
[B<-strparse offset>]
|
||||
[B<-genstr string>]
|
||||
[B<-genconf file>]
|
||||
[B<-dlimit> I<num>]
|
||||
[B<-strparse> I<offset>]
|
||||
[B<-genstr> I<string>]
|
||||
[B<-genconf> I<file>]
|
||||
[B<-strictpem>]
|
||||
[B<-item name>]
|
||||
[B<-item> I<name>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<asn1parse> command is a diagnostic utility that can parse ASN.1
|
||||
structures. It can also be used to extract data from ASN.1 formatted data.
|
||||
This command is a diagnostic utility that can parse ASN.1 structures.
|
||||
It can also be used to extract data from ASN.1 formatted data.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -37,16 +37,16 @@ structures. It can also be used to extract data from ASN.1 formatted data.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform> B<DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
The input format. B<DER> is binary format and B<PEM> (the default) is base64
|
||||
encoded.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
The input file, default is standard input.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Output file to place the DER encoded data into. If this
|
||||
option is not present then no data will be output. This is most useful when
|
||||
@@ -56,11 +56,11 @@ combined with the B<-strparse> option.
|
||||
|
||||
Don't output the parsed version of the input file.
|
||||
|
||||
=item B<-offset number>
|
||||
=item B<-offset> I<number>
|
||||
|
||||
Starting offset to begin parsing, default is start of file.
|
||||
|
||||
=item B<-length number>
|
||||
=item B<-length> I<number>
|
||||
|
||||
Number of bytes to parse, default is until end of file.
|
||||
|
||||
@@ -68,7 +68,7 @@ Number of bytes to parse, default is until end of file.
|
||||
|
||||
Indents the output according to the "depth" of the structures.
|
||||
|
||||
=item B<-oid filename>
|
||||
=item B<-oid> I<filename>
|
||||
|
||||
A file containing additional OBJECT IDENTIFIERs (OIDs). The format of this
|
||||
file is described in the NOTES section below.
|
||||
@@ -77,23 +77,23 @@ file is described in the NOTES section below.
|
||||
|
||||
Dump unknown data in hex format.
|
||||
|
||||
=item B<-dlimit num>
|
||||
=item B<-dlimit> I<num>
|
||||
|
||||
Like B<-dump>, but only the first B<num> bytes are output.
|
||||
|
||||
=item B<-strparse offset>
|
||||
=item B<-strparse> I<offset>
|
||||
|
||||
Parse the contents octets of the ASN.1 object starting at B<offset>. This
|
||||
option can be used multiple times to "drill down" into a nested structure.
|
||||
|
||||
=item B<-genstr string>, B<-genconf file>
|
||||
=item B<-genstr> I<string>, B<-genconf> I<file>
|
||||
|
||||
Generate encoded data based on B<string>, B<file> or both using
|
||||
L<ASN1_generate_nconf(3)> format. If B<file> only is
|
||||
Generate encoded data based on I<string>, I<file> or both using
|
||||
L<ASN1_generate_nconf(3)> format. If I<file> only is
|
||||
present then the string is obtained from the default section using the name
|
||||
B<asn1>. The encoded data is passed through the ASN1 parser and printed out as
|
||||
though it came from a file, the contents can thus be examined and written to a
|
||||
file using the B<out> option.
|
||||
file using the B<-out> option.
|
||||
|
||||
=item B<-strictpem>
|
||||
|
||||
@@ -103,10 +103,11 @@ processed whether it has the normal PEM BEGIN and END markers or not. This
|
||||
option will ignore any data prior to the start of the BEGIN marker, or after an
|
||||
END marker in a PEM file.
|
||||
|
||||
=item B<-item name>
|
||||
=item B<-item> I<name>
|
||||
|
||||
Attempt to decode and print the data as B<ASN1_ITEM name>. This can be used to
|
||||
print out the fields of any supported ASN.1 structure if the type is known.
|
||||
Attempt to decode and print the data as an B<ASN1_ITEM> I<name>. This can be
|
||||
used to print out the fields of any supported ASN.1 structure if the type is
|
||||
known.
|
||||
|
||||
=back
|
||||
|
||||
@@ -132,9 +133,9 @@ The output will typically contain lines like this:
|
||||
.....
|
||||
|
||||
This example is part of a self-signed certificate. Each line starts with the
|
||||
offset in decimal. B<d=XX> specifies the current depth. The depth is increased
|
||||
within the scope of any SET or SEQUENCE. B<hl=XX> gives the header length
|
||||
(tag and length octets) of the current type. B<l=XX> gives the length of
|
||||
offset in decimal. C<d=XX> specifies the current depth. The depth is increased
|
||||
within the scope of any SET or SEQUENCE. C<hl=XX> gives the header length
|
||||
(tag and length octets) of the current type. C<l=XX> gives the length of
|
||||
the contents octets.
|
||||
|
||||
The B<-i> option can be used to make the output more readable.
|
||||
@@ -143,7 +144,7 @@ Some knowledge of the ASN.1 structure is needed to interpret the output.
|
||||
|
||||
In this example the BIT STRING at offset 229 is the certificate public key.
|
||||
The contents octets of this will contain the public key information. This can
|
||||
be examined using the option B<-strparse 229> to yield:
|
||||
be examined using the option C<-strparse 229> to yield:
|
||||
|
||||
0:d=0 hl=3 l= 137 cons: SEQUENCE
|
||||
3:d=1 hl=3 l= 129 prim: INTEGER :E5D21E1F5C8D208EA7A2166C7FAF9F6BDF2059669C60876DDB70840F1A5AAFA59699FE471F379F1DD6A487E7D5409AB6A88D4A9746E24B91D8CF55DB3521015460C8EDE44EE8A4189F7A7BE77D6CD3A9AF2696F486855CF58BF0EDF2B4068058C7A947F52548DDF7E15E96B385F86422BEA9064A3EE9E1158A56E4A6F47E5897
|
||||
@@ -157,10 +158,13 @@ allows additional OIDs to be included. Each line consists of three columns,
|
||||
the first column is the OID in numerical format and should be followed by white
|
||||
space. The second column is the "short name" which is a single word followed
|
||||
by white space. The final column is the rest of the line and is the
|
||||
"long name". B<asn1parse> displays the long name. Example:
|
||||
"long name". Example:
|
||||
|
||||
C<1.2.3.4 shortName A long name>
|
||||
|
||||
For any OID with an associated short and long name, this command will display
|
||||
the long name.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Parse a file:
|
||||
|
||||
+110
-116
@@ -9,59 +9,61 @@ openssl-ca - sample minimal CA application
|
||||
B<openssl> B<ca>
|
||||
[B<-help>]
|
||||
[B<-verbose>]
|
||||
[B<-config filename>]
|
||||
[B<-name section>]
|
||||
[B<-config> I<filename>]
|
||||
[B<-name> I<section>]
|
||||
[B<-gencrl>]
|
||||
[B<-revoke file>]
|
||||
[B<-valid file>]
|
||||
[B<-status serial>]
|
||||
[B<-revoke> I<file>]
|
||||
[B<-valid> I<file>]
|
||||
[B<-status> I<serial>]
|
||||
[B<-updatedb>]
|
||||
[B<-crl_reason reason>]
|
||||
[B<-crl_hold instruction>]
|
||||
[B<-crl_compromise time>]
|
||||
[B<-crl_CA_compromise time>]
|
||||
[B<-crldays days>]
|
||||
[B<-crlhours hours>]
|
||||
[B<-crlexts section>]
|
||||
[B<-startdate date>]
|
||||
[B<-enddate date>]
|
||||
[B<-days arg>]
|
||||
[B<-md arg>]
|
||||
[B<-policy arg>]
|
||||
[B<-keyfile arg>]
|
||||
[B<-keyform PEM|DER>]
|
||||
[B<-key arg>]
|
||||
[B<-passin arg>]
|
||||
[B<-cert file>]
|
||||
[B<-crl_reason> I<reason>]
|
||||
[B<-crl_hold> I<instruction>]
|
||||
[B<-crl_compromise> I<time>]
|
||||
[B<-crl_CA_compromise> I<time>]
|
||||
[B<-crldays> I<days>]
|
||||
[B<-crlhours> I<hours>]
|
||||
[B<-crlexts> I<section>]
|
||||
[B<-startdate> I<date>]
|
||||
[B<-enddate> I<date>]
|
||||
[B<-days> I<arg>]
|
||||
[B<-md> I<arg>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-keyfile> I<arg>]
|
||||
[B<-keyform> B<DER>|B<PEM>]
|
||||
[B<-key> I<arg>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-cert> I<file>]
|
||||
[B<-selfsign>]
|
||||
[B<-in file>]
|
||||
[B<-out file>]
|
||||
[B<-in> I<file>]
|
||||
[B<-out> I<file>]
|
||||
[B<-notext>]
|
||||
[B<-outdir dir>]
|
||||
[B<-outdir> I<dir>]
|
||||
[B<-infiles>]
|
||||
[B<-spkac file>]
|
||||
[B<-ss_cert file>]
|
||||
[B<-spkac> I<file>]
|
||||
[B<-ss_cert> I<file>]
|
||||
[B<-preserveDN>]
|
||||
[B<-noemailDN>]
|
||||
[B<-batch>]
|
||||
[B<-msie_hack>]
|
||||
[B<-extensions section>]
|
||||
[B<-extfile section>]
|
||||
[B<-engine id>]
|
||||
[B<-subj arg>]
|
||||
[B<-extensions> I<section>]
|
||||
[B<-extfile> I<section>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-subj> I<arg>]
|
||||
[B<-utf8>]
|
||||
[B<-sigopt nm:v>]
|
||||
[B<-sigopt> I<nm>:I<v>]
|
||||
[B<-create_serial>]
|
||||
[B<-rand_serial>]
|
||||
[B<-multivalue-rdn>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-sm2-id string>]
|
||||
[B<-sm2-hex-id hex-string>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-sm2-id> I<string>]
|
||||
[B<-sm2-hex-id> I<hex-string>]
|
||||
|
||||
=for openssl ifdef engine sm2-id sm2-hex-id
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<ca> command is a minimal CA application. It can be used
|
||||
This command is a minimal CA application. It can be used
|
||||
to sign certificate requests in a variety of forms and generate
|
||||
CRLs it also maintains a text database of issued certificates
|
||||
and their status.
|
||||
@@ -80,27 +82,27 @@ Print out a usage message.
|
||||
|
||||
This prints extra details about the operations being performed.
|
||||
|
||||
=item B<-config filename>
|
||||
=item B<-config> I<filename>
|
||||
|
||||
Specifies the configuration file to use.
|
||||
Optional; for a description of the default value,
|
||||
see L<openssl(1)/COMMAND SUMMARY>.
|
||||
|
||||
=item B<-name section>
|
||||
=item B<-name> I<section>
|
||||
|
||||
Specifies the configuration file section to use (overrides
|
||||
B<default_ca> in the B<ca> section).
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
An input filename containing a single certificate request to be
|
||||
signed by the CA.
|
||||
|
||||
=item B<-ss_cert filename>
|
||||
=item B<-ss_cert> I<filename>
|
||||
|
||||
A single self-signed certificate to be signed by the CA.
|
||||
|
||||
=item B<-spkac filename>
|
||||
=item B<-spkac> I<filename>
|
||||
|
||||
A file containing a single Netscape signed public key and challenge
|
||||
and additional field values to be signed by the CA. See the B<SPKAC FORMAT>
|
||||
@@ -111,41 +113,41 @@ section for information on the required input and output format.
|
||||
If present this should be the last option, all subsequent arguments
|
||||
are taken as the names of files containing certificate requests.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
The output file to output certificates to. The default is standard
|
||||
output. The certificate details will also be printed out to this
|
||||
file in PEM format (except that B<-spkac> outputs DER format).
|
||||
|
||||
=item B<-outdir directory>
|
||||
=item B<-outdir> I<directory>
|
||||
|
||||
The directory to output certificates to. The certificate will be
|
||||
written to a filename consisting of the serial number in hex with
|
||||
".pem" appended.
|
||||
F<.pem> appended.
|
||||
|
||||
=item B<-cert>
|
||||
|
||||
The CA certificate file.
|
||||
|
||||
=item B<-keyfile filename>
|
||||
=item B<-keyfile> I<filename>
|
||||
|
||||
The private key to sign requests with.
|
||||
|
||||
=item B<-keyform PEM|DER>
|
||||
=item B<-keyform> B<DER>|B<PEM>
|
||||
|
||||
The format of the data in the private key file.
|
||||
The default is PEM.
|
||||
|
||||
=item B<-sigopt nm:v>
|
||||
=item B<-sigopt> I<nm>:I<v>
|
||||
|
||||
Pass options to the signature algorithm during sign or verify operations.
|
||||
Names and values of these options are algorithm-specific.
|
||||
|
||||
=item B<-key password>
|
||||
=item B<-key> I<password>
|
||||
|
||||
The password used to encrypt the private key. Since on some
|
||||
systems the command line arguments are visible (e.g. Unix with
|
||||
the 'ps' utility) this option should be used with caution.
|
||||
the L<ps(1)> utility) this option should be used with caution.
|
||||
|
||||
=item B<-selfsign>
|
||||
|
||||
@@ -161,41 +163,41 @@ certificate appears among the entries in the certificate database
|
||||
serial number counter as all other certificates sign with the
|
||||
self-signed certificate.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-notext>
|
||||
|
||||
Don't output the text form of a certificate to the output file.
|
||||
|
||||
=item B<-startdate date>
|
||||
=item B<-startdate> I<date>
|
||||
|
||||
This allows the start date to be explicitly set. The format of the
|
||||
date is YYMMDDHHMMSSZ (the same as an ASN1 UTCTime structure), or
|
||||
YYYYMMDDHHMMSSZ (the same as an ASN1 GeneralizedTime structure). In
|
||||
both formats, seconds SS and timezone Z must be present.
|
||||
|
||||
=item B<-enddate date>
|
||||
=item B<-enddate> I<date>
|
||||
|
||||
This allows the expiry date to be explicitly set. The format of the
|
||||
date is YYMMDDHHMMSSZ (the same as an ASN1 UTCTime structure), or
|
||||
YYYYMMDDHHMMSSZ (the same as an ASN1 GeneralizedTime structure). In
|
||||
both formats, seconds SS and timezone Z must be present.
|
||||
|
||||
=item B<-days arg>
|
||||
=item B<-days> I<arg>
|
||||
|
||||
The number of days to certify the certificate for.
|
||||
|
||||
=item B<-md alg>
|
||||
=item B<-md> I<alg>
|
||||
|
||||
The message digest to use.
|
||||
Any digest supported by the OpenSSL B<dgst> command can be used. For signing
|
||||
Any digest supported by the L<openssl-dgst(1)> command can be used. For signing
|
||||
algorithms that do not support a digest (i.e. Ed25519 and Ed448) any message
|
||||
digest that is set is ignored. This option also applies to CRLs.
|
||||
|
||||
=item B<-policy arg>
|
||||
=item B<-policy> I<arg>
|
||||
|
||||
This option defines the CA "policy" to use. This is a section in
|
||||
the configuration file which decides which fields should be mandatory
|
||||
@@ -204,8 +206,8 @@ for more information.
|
||||
|
||||
=item B<-msie_hack>
|
||||
|
||||
This is a deprecated option to make B<ca> work with very old versions of
|
||||
the IE certificate enrollment control "certenr3". It used UniversalStrings
|
||||
This is a deprecated option to make this command work with very old versions
|
||||
of the IE certificate enrollment control "certenr3". It used UniversalStrings
|
||||
for almost everything. Since the old control has various security bugs
|
||||
its use is strongly discouraged.
|
||||
|
||||
@@ -231,7 +233,7 @@ used in the configuration file to enable this behaviour.
|
||||
This sets the batch mode. In this mode no questions will be asked
|
||||
and all certificates will be certified automatically.
|
||||
|
||||
=item B<-extensions section>
|
||||
=item B<-extensions> I<section>
|
||||
|
||||
The section of the configuration file containing certificate extensions
|
||||
to be added when a certificate is issued (defaults to B<x509_extensions>
|
||||
@@ -241,24 +243,25 @@ is present (even if it is empty), then a V3 certificate is created. See the
|
||||
L<x509v3_config(5)> manual page for details of the
|
||||
extension section format.
|
||||
|
||||
=item B<-extfile file>
|
||||
=item B<-extfile> I<file>
|
||||
|
||||
An additional configuration file to read certificate extensions from
|
||||
(using the default section unless the B<-extensions> option is also
|
||||
used).
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<ca>
|
||||
Specifying an engine (by its unique I<id> string) will cause B<ca>
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
=item B<-subj arg>
|
||||
=item B<-subj> I<arg>
|
||||
|
||||
Supersedes subject name given in the request.
|
||||
The arg must be formatted as I</type0=value0/type1=value1/type2=...>.
|
||||
Keyword characters may be escaped by \ (backslash), and whitespace is retained.
|
||||
The arg must be formatted as C</type0=value0/type1=value1/type2=...>.
|
||||
Keyword characters may be escaped by C<\> (backslash), and whitespace is
|
||||
retained.
|
||||
Empty values are permitted, but the corresponding type will not be included
|
||||
in the resulting certificate.
|
||||
|
||||
@@ -287,29 +290,20 @@ This overrides any option or configuration to use a serial number file.
|
||||
This option causes the -subj argument to be interpreted with full
|
||||
support for multivalued RDNs. Example:
|
||||
|
||||
I</DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe>
|
||||
C</DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe>
|
||||
|
||||
If -multi-rdn is not used then the UID value is I<123456+CN=John Doe>.
|
||||
If B<-multi-rdn> is not used then the UID value is C<123456+CN=John Doe>.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-sm2-id>
|
||||
=item B<-sm2-id> I<string>
|
||||
|
||||
Specify the ID string to use when verifying an SM2 certificate. The ID string is
|
||||
required by the SM2 signature algorithm for signing and verification.
|
||||
|
||||
=item B<-sm2-hex-id>
|
||||
=item B<-sm2-hex-id> I<hex-string>
|
||||
|
||||
Specify a binary ID string to use when signing or verifying using an SM2
|
||||
certificate. The argument for this option is string of hexadecimal digits.
|
||||
@@ -324,24 +318,24 @@ certificate. The argument for this option is string of hexadecimal digits.
|
||||
|
||||
This option generates a CRL based on information in the index file.
|
||||
|
||||
=item B<-crldays num>
|
||||
=item B<-crldays> I<num>
|
||||
|
||||
The number of days before the next CRL is due. That is the days from
|
||||
now to place in the CRL nextUpdate field.
|
||||
|
||||
=item B<-crlhours num>
|
||||
=item B<-crlhours> I<num>
|
||||
|
||||
The number of hours before the next CRL is due.
|
||||
|
||||
=item B<-revoke filename>
|
||||
=item B<-revoke> I<filename>
|
||||
|
||||
A filename containing a certificate to revoke.
|
||||
|
||||
=item B<-valid filename>
|
||||
=item B<-valid> I<filename>
|
||||
|
||||
A filename containing a certificate to add a Valid certificate entry.
|
||||
|
||||
=item B<-status serial>
|
||||
=item B<-status> I<serial>
|
||||
|
||||
Displays the revocation status of the certificate with the specified
|
||||
serial number and exits.
|
||||
@@ -350,34 +344,34 @@ serial number and exits.
|
||||
|
||||
Updates the database index to purge expired certificates.
|
||||
|
||||
=item B<-crl_reason reason>
|
||||
=item B<-crl_reason> I<reason>
|
||||
|
||||
Revocation reason, where B<reason> is one of: B<unspecified>, B<keyCompromise>,
|
||||
Revocation reason, where I<reason> is one of: B<unspecified>, B<keyCompromise>,
|
||||
B<CACompromise>, B<affiliationChanged>, B<superseded>, B<cessationOfOperation>,
|
||||
B<certificateHold> or B<removeFromCRL>. The matching of B<reason> is case
|
||||
B<certificateHold> or B<removeFromCRL>. The matching of I<reason> is case
|
||||
insensitive. Setting any revocation reason will make the CRL v2.
|
||||
|
||||
In practice B<removeFromCRL> is not particularly useful because it is only used
|
||||
in delta CRLs which are not currently implemented.
|
||||
|
||||
=item B<-crl_hold instruction>
|
||||
=item B<-crl_hold> I<instruction>
|
||||
|
||||
This sets the CRL revocation reason code to B<certificateHold> and the hold
|
||||
instruction to B<instruction> which must be an OID. Although any OID can be
|
||||
instruction to I<instruction> which must be an OID. Although any OID can be
|
||||
used only B<holdInstructionNone> (the use of which is discouraged by RFC2459)
|
||||
B<holdInstructionCallIssuer> or B<holdInstructionReject> will normally be used.
|
||||
|
||||
=item B<-crl_compromise time>
|
||||
=item B<-crl_compromise> I<time>
|
||||
|
||||
This sets the revocation reason to B<keyCompromise> and the compromise time to
|
||||
B<time>. B<time> should be in GeneralizedTime format that is B<YYYYMMDDHHMMSSZ>.
|
||||
I<time>. I<time> should be in GeneralizedTime format that is I<YYYYMMDDHHMMSSZ>.
|
||||
|
||||
=item B<-crl_CA_compromise time>
|
||||
=item B<-crl_CA_compromise> I<time>
|
||||
|
||||
This is the same as B<crl_compromise> except the revocation reason is set to
|
||||
B<CACompromise>.
|
||||
|
||||
=item B<-crlexts section>
|
||||
=item B<-crlexts> I<section>
|
||||
|
||||
The section of the configuration file containing CRL extensions to
|
||||
include. If no CRL extension section is present then a V1 CRL is
|
||||
@@ -392,7 +386,7 @@ extension section format.
|
||||
|
||||
=head1 CONFIGURATION FILE OPTIONS
|
||||
|
||||
The section of the configuration file containing options for B<ca>
|
||||
The section of the configuration file containing options for this command
|
||||
is found as follows: If the B<-name> command line option is used,
|
||||
then it names the section to be used. Otherwise the section to
|
||||
be used must be named in the B<default_ca> option of the B<ca> section
|
||||
@@ -580,7 +574,7 @@ this can be regarded more of a quirk than intended behaviour.
|
||||
The input to the B<-spkac> command line option is a Netscape
|
||||
signed public key and challenge. This will usually come from
|
||||
the B<KEYGEN> tag in an HTML form to create a new private key.
|
||||
It is however possible to create SPKACs using the B<spkac> utility.
|
||||
It is however possible to create SPKACs using L<openssl-spkac(1)>.
|
||||
|
||||
The file should contain the variable SPKAC set to the value of
|
||||
the SPKAC and also the required DN components as name value pairs.
|
||||
@@ -593,18 +587,18 @@ flag is used.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Note: these examples assume that the B<ca> directory structure is
|
||||
already set up and the relevant files already exist. This usually
|
||||
involves creating a CA certificate and private key with B<req>, a
|
||||
serial number file and an empty index file and placing them in
|
||||
the relevant directories.
|
||||
Note: these examples assume that the directory structure this command
|
||||
assumes is already set up and the relevant files already exist. This
|
||||
usually involves creating a CA certificate and private key with
|
||||
L<openssl-req(1)>, a serial number file and an empty index file and
|
||||
placing them in the relevant directories.
|
||||
|
||||
To use the sample configuration file below the directories demoCA,
|
||||
demoCA/private and demoCA/newcerts would be created. The CA
|
||||
certificate would be copied to demoCA/cacert.pem and its private
|
||||
key to demoCA/private/cakey.pem. A file demoCA/serial would be
|
||||
To use the sample configuration file below the directories F<demoCA>,
|
||||
F<demoCA/private> and F<demoCA/newcerts> would be created. The CA
|
||||
certificate would be copied to F<demoCA/cacert.pem> and its private
|
||||
key to F<demoCA/private/cakey.pem>. A file F<demoCA/serial> would be
|
||||
created containing for example "01" and the empty index file
|
||||
demoCA/index.txt.
|
||||
F<demoCA/index.txt>.
|
||||
|
||||
|
||||
Sign a certificate request:
|
||||
@@ -639,7 +633,7 @@ A sample SPKAC file (the SPKAC line has been truncated for clarity):
|
||||
0.OU=OpenSSL Group
|
||||
1.OU=Another Group
|
||||
|
||||
A sample configuration file with the relevant sections for B<ca>:
|
||||
A sample configuration file with the relevant sections for this command:
|
||||
|
||||
[ ca ]
|
||||
default_ca = CA_default # The default ca section
|
||||
@@ -710,7 +704,7 @@ The use of an in-memory text database can cause problems when large
|
||||
numbers of certificates are present because, as the name implies
|
||||
the database has to be kept in memory.
|
||||
|
||||
The B<ca> command really needs rewriting or the required functionality
|
||||
This command really needs rewriting or the required functionality
|
||||
exposed at either a command or interface level so a more friendly utility
|
||||
(perl script or GUI) can handle things properly. The script
|
||||
B<CA.pl> helps a little but not very much.
|
||||
@@ -727,15 +721,15 @@ create an empty file.
|
||||
|
||||
=head1 WARNINGS
|
||||
|
||||
The B<ca> command is quirky and at times downright unfriendly.
|
||||
This command is quirky and at times downright unfriendly.
|
||||
|
||||
The B<ca> utility was originally meant as an example of how to do things
|
||||
in a CA. It was not supposed to be used as a full blown CA itself:
|
||||
This command was originally meant as an example of how to do
|
||||
things in a CA. It was not supposed to be used as a full blown CA itself:
|
||||
nevertheless some people are using it for this purpose.
|
||||
|
||||
The B<ca> command is effectively a single user command: no locking is
|
||||
done on the various files and attempts to run more than one B<ca> command
|
||||
on the same database can have unpredictable results.
|
||||
This command command is effectively a single user command: no locking
|
||||
is done on the various files and attempts to run more than one B<openssl ca>
|
||||
command on the same database can have unpredictable results.
|
||||
|
||||
The B<copy_extensions> option should be used with caution. If care is
|
||||
not taken then it can be a security risk. For example if a certificate
|
||||
|
||||
@@ -20,15 +20,17 @@ B<openssl> B<ciphers>
|
||||
[B<-psk>]
|
||||
[B<-srp>]
|
||||
[B<-stdname>]
|
||||
[B<-convert name>]
|
||||
[B<-ciphersuites val>]
|
||||
[B<cipherlist>]
|
||||
[B<-convert> I<name>]
|
||||
[B<-ciphersuites> I<val>]
|
||||
[I<cipherlist>]
|
||||
|
||||
=for openssl ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3 psk srp
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<ciphers> command converts textual OpenSSL cipher lists into ordered
|
||||
SSL cipher preference lists. It can be used as a test tool to determine
|
||||
the appropriate cipherlist.
|
||||
This command converts textual OpenSSL cipher lists into
|
||||
ordered SSL cipher preference lists. It can be used as a test tool to
|
||||
determine the appropriate cipherlist.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -83,11 +85,11 @@ OpenSSL was built.
|
||||
|
||||
Precede each cipher suite by its standard name.
|
||||
|
||||
=item B<-convert name>
|
||||
=item B<-convert> I<name>
|
||||
|
||||
Convert a standard cipher B<name> to its OpenSSL name.
|
||||
Convert a standard cipher I<name> to its OpenSSL name.
|
||||
|
||||
=item B<-ciphersuites val>
|
||||
=item B<-ciphersuites> I<val>
|
||||
|
||||
Sets the list of TLSv1.3 ciphersuites. This list will be combined with any
|
||||
TLSv1.2 and below ciphersuites that have been configured. The format for this
|
||||
@@ -145,8 +147,8 @@ will not moved to the end of the list.
|
||||
The cipher string B<@STRENGTH> can be used at any point to sort the current
|
||||
cipher list in order of encryption algorithm key length.
|
||||
|
||||
The cipher string B<@SECLEVEL=n> can be used at any point to set the security
|
||||
level to B<n>, which should be a number between zero and five, inclusive.
|
||||
The cipher string B<@SECLEVEL>=I<n> can be used at any point to set the security
|
||||
level to I<n>, which should be a number between zero and five, inclusive.
|
||||
See L<SSL_CTX_set_security_level> for a description of what each level means.
|
||||
|
||||
The cipher list can be prefixed with the B<DEFAULT> keyword, which enables
|
||||
@@ -510,7 +512,8 @@ e.g. DES-CBC3-SHA. In these cases, RSA authentication is used.
|
||||
=head2 GOST cipher suites from draft-chudov-cryptopro-cptls, extending TLS v1.0
|
||||
|
||||
Note: these ciphers require an engine which including GOST cryptographic
|
||||
algorithms, such as the B<ccgost> engine, included in the OpenSSL distribution.
|
||||
algorithms, such as the B<gost> engine, which isn't part of the OpenSSL
|
||||
distribution.
|
||||
|
||||
TLS_GOSTR341094_WITH_28147_CNT_IMIT GOST94-GOST89-GOST89
|
||||
TLS_GOSTR341001_WITH_28147_CNT_IMIT GOST2001-GOST89-GOST89
|
||||
@@ -774,7 +777,7 @@ L<ssl(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The B<-V> option for the B<ciphers> command was added in OpenSSL 1.0.0.
|
||||
The B<-V> option was added in OpenSSL 1.0.0.
|
||||
|
||||
The B<-stdname> is only available if OpenSSL is built with tracing enabled
|
||||
(B<enable-ssl-trace> argument to Configure) before OpenSSL 1.1.1.
|
||||
|
||||
@@ -0,0 +1,781 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
openssl-ciphers - SSL cipher display and cipher list tool
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl> B<ciphers>
|
||||
[B<-help>]
|
||||
[B<-s>]
|
||||
[B<-v>]
|
||||
[B<-V>]
|
||||
[B<-ssl3>]
|
||||
[B<-tls1>]
|
||||
[B<-tls1_1>]
|
||||
[B<-tls1_2>]
|
||||
[B<-tls1_3>]
|
||||
[B<-s>]
|
||||
[B<-psk>]
|
||||
[B<-srp>]
|
||||
[B<-stdname>]
|
||||
[B<-convert> I<name>]
|
||||
[B<-ciphersuites> I<val>]
|
||||
[I<cipherlist>]
|
||||
|
||||
=for openssl ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3 psk srp
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This command converts textual OpenSSL cipher lists into
|
||||
ordered SSL cipher preference lists. It can be used as a test tool to
|
||||
determine the appropriate cipherlist.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-help>
|
||||
|
||||
Print a usage message.
|
||||
|
||||
=item B<-s>
|
||||
|
||||
Only list supported ciphers: those consistent with the security level, and
|
||||
minimum and maximum protocol version. This is closer to the actual cipher list
|
||||
an application will support.
|
||||
|
||||
PSK and SRP ciphers are not enabled by default: they require B<-psk> or B<-srp>
|
||||
to enable them.
|
||||
|
||||
It also does not change the default list of supported signature algorithms.
|
||||
|
||||
On a server the list of supported ciphers might also exclude other ciphers
|
||||
depending on the configured certificates and presence of DH parameters.
|
||||
|
||||
If this option is not used then all ciphers that match the cipherlist will be
|
||||
listed.
|
||||
|
||||
=item B<-psk>
|
||||
|
||||
When combined with B<-s> includes cipher suites which require PSK.
|
||||
|
||||
=item B<-srp>
|
||||
|
||||
When combined with B<-s> includes cipher suites which require SRP.
|
||||
|
||||
=item B<-v>
|
||||
|
||||
Verbose output: For each cipher suite, list details as provided by
|
||||
L<SSL_CIPHER_description(3)>.
|
||||
|
||||
=item B<-V>
|
||||
|
||||
Like B<-v>, but include the official cipher suite values in hex.
|
||||
|
||||
=item B<-tls1_3>, B<-tls1_2>, B<-tls1_1>, B<-tls1>, B<-ssl3>
|
||||
|
||||
In combination with the B<-s> option, list the ciphers which could be used if
|
||||
the specified protocol were negotiated.
|
||||
Note that not all protocols and flags may be available, depending on how
|
||||
OpenSSL was built.
|
||||
|
||||
=item B<-stdname>
|
||||
|
||||
Precede each cipher suite by its standard name.
|
||||
|
||||
=item B<-convert> I<name>
|
||||
|
||||
Convert a standard cipher I<name> to its OpenSSL name.
|
||||
|
||||
=item B<-ciphersuites> I<val>
|
||||
|
||||
Sets the list of TLSv1.3 ciphersuites. This list will be combined with any
|
||||
TLSv1.2 and below ciphersuites that have been configured. The format for this
|
||||
list is a simple colon (":") separated list of TLSv1.3 ciphersuite names. By
|
||||
default this value is:
|
||||
|
||||
TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
|
||||
|
||||
=item B<cipherlist>
|
||||
|
||||
A cipher list of TLSv1.2 and below ciphersuites to convert to a cipher
|
||||
preference list. This list will be combined with any TLSv1.3 ciphersuites that
|
||||
have been configured. If it is not included then the default cipher list will be
|
||||
used. The format is described below.
|
||||
|
||||
=back
|
||||
|
||||
=head1 CIPHER LIST FORMAT
|
||||
|
||||
The cipher list consists of one or more I<cipher strings> separated by colons.
|
||||
Commas or spaces are also acceptable separators but colons are normally used.
|
||||
|
||||
The actual cipher string can take several different forms.
|
||||
|
||||
It can consist of a single cipher suite such as B<RC4-SHA>.
|
||||
|
||||
It can represent a list of cipher suites containing a certain algorithm, or
|
||||
cipher suites of a certain type. For example B<SHA1> represents all ciphers
|
||||
suites using the digest algorithm SHA1 and B<SSLv3> represents all SSL v3
|
||||
algorithms.
|
||||
|
||||
Lists of cipher suites can be combined in a single cipher string using the
|
||||
B<+> character. This is used as a logical B<and> operation. For example
|
||||
B<SHA1+DES> represents all cipher suites containing the SHA1 B<and> the DES
|
||||
algorithms.
|
||||
|
||||
Each cipher string can be optionally preceded by the characters B<!>,
|
||||
B<-> or B<+>.
|
||||
|
||||
If B<!> is used then the ciphers are permanently deleted from the list.
|
||||
The ciphers deleted can never reappear in the list even if they are
|
||||
explicitly stated.
|
||||
|
||||
If B<-> is used then the ciphers are deleted from the list, but some or
|
||||
all of the ciphers can be added again by later options.
|
||||
|
||||
If B<+> is used then the ciphers are moved to the end of the list. This
|
||||
option doesn't add any new ciphers it just moves matching existing ones.
|
||||
|
||||
If none of these characters is present then the string is just interpreted
|
||||
as a list of ciphers to be appended to the current preference list. If the
|
||||
list includes any ciphers already present they will be ignored: that is they
|
||||
will not moved to the end of the list.
|
||||
|
||||
The cipher string B<@STRENGTH> can be used at any point to sort the current
|
||||
cipher list in order of encryption algorithm key length.
|
||||
|
||||
The cipher string B<@SECLEVEL>=I<n> can be used at any point to set the security
|
||||
level to I<n>, which should be a number between zero and five, inclusive.
|
||||
See L<SSL_CTX_set_security_level> for a description of what each level means.
|
||||
|
||||
The cipher list can be prefixed with the B<DEFAULT> keyword, which enables
|
||||
the default cipher list as defined below. Unlike cipher strings,
|
||||
this prefix may not be combined with other strings using B<+> character.
|
||||
For example, B<DEFAULT+DES> is not valid.
|
||||
|
||||
The content of the default list is determined at compile time and normally
|
||||
corresponds to B<ALL:!COMPLEMENTOFDEFAULT:!eNULL>.
|
||||
|
||||
=head1 CIPHER STRINGS
|
||||
|
||||
The following is a list of all permitted cipher strings and their meanings.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<COMPLEMENTOFDEFAULT>
|
||||
|
||||
The ciphers included in B<ALL>, but not enabled by default. Currently
|
||||
this includes all RC4 and anonymous ciphers. Note that this rule does
|
||||
not cover B<eNULL>, which is not included by B<ALL> (use B<COMPLEMENTOFALL> if
|
||||
necessary). Note that RC4 based cipher suites are not built into OpenSSL by
|
||||
default (see the enable-weak-ssl-ciphers option to Configure).
|
||||
|
||||
=item B<ALL>
|
||||
|
||||
All cipher suites except the B<eNULL> ciphers (which must be explicitly enabled
|
||||
if needed).
|
||||
As of OpenSSL 1.0.0, the B<ALL> cipher suites are sensibly ordered by default.
|
||||
|
||||
=item B<COMPLEMENTOFALL>
|
||||
|
||||
The cipher suites not enabled by B<ALL>, currently B<eNULL>.
|
||||
|
||||
=item B<HIGH>
|
||||
|
||||
"High" encryption cipher suites. This currently means those with key lengths
|
||||
larger than 128 bits, and some cipher suites with 128-bit keys.
|
||||
|
||||
=item B<MEDIUM>
|
||||
|
||||
"Medium" encryption cipher suites, currently some of those using 128 bit
|
||||
encryption.
|
||||
|
||||
=item B<LOW>
|
||||
|
||||
"Low" encryption cipher suites, currently those using 64 or 56 bit
|
||||
encryption algorithms but excluding export cipher suites. All these
|
||||
cipher suites have been removed as of OpenSSL 1.1.0.
|
||||
|
||||
=item B<eNULL>, B<NULL>
|
||||
|
||||
The "NULL" ciphers that is those offering no encryption. Because these offer no
|
||||
encryption at all and are a security risk they are not enabled via either the
|
||||
B<DEFAULT> or B<ALL> cipher strings.
|
||||
Be careful when building cipherlists out of lower-level primitives such as
|
||||
B<kRSA> or B<aECDSA> as these do overlap with the B<eNULL> ciphers. When in
|
||||
doubt, include B<!eNULL> in your cipherlist.
|
||||
|
||||
=item B<aNULL>
|
||||
|
||||
The cipher suites offering no authentication. This is currently the anonymous
|
||||
DH algorithms and anonymous ECDH algorithms. These cipher suites are vulnerable
|
||||
to "man in the middle" attacks and so their use is discouraged.
|
||||
These are excluded from the B<DEFAULT> ciphers, but included in the B<ALL>
|
||||
ciphers.
|
||||
Be careful when building cipherlists out of lower-level primitives such as
|
||||
B<kDHE> or B<AES> as these do overlap with the B<aNULL> ciphers.
|
||||
When in doubt, include B<!aNULL> in your cipherlist.
|
||||
|
||||
=item B<kRSA>, B<aRSA>, B<RSA>
|
||||
|
||||
Cipher suites using RSA key exchange or authentication. B<RSA> is an alias for
|
||||
B<kRSA>.
|
||||
|
||||
=item B<kDHr>, B<kDHd>, B<kDH>
|
||||
|
||||
Cipher suites using static DH key agreement and DH certificates signed by CAs
|
||||
with RSA and DSS keys or either respectively.
|
||||
All these cipher suites have been removed in OpenSSL 1.1.0.
|
||||
|
||||
=item B<kDHE>, B<kEDH>, B<DH>
|
||||
|
||||
Cipher suites using ephemeral DH key agreement, including anonymous cipher
|
||||
suites.
|
||||
|
||||
=item B<DHE>, B<EDH>
|
||||
|
||||
Cipher suites using authenticated ephemeral DH key agreement.
|
||||
|
||||
=item B<ADH>
|
||||
|
||||
Anonymous DH cipher suites, note that this does not include anonymous Elliptic
|
||||
Curve DH (ECDH) cipher suites.
|
||||
|
||||
=item B<kEECDH>, B<kECDHE>, B<ECDH>
|
||||
|
||||
Cipher suites using ephemeral ECDH key agreement, including anonymous
|
||||
cipher suites.
|
||||
|
||||
=item B<ECDHE>, B<EECDH>
|
||||
|
||||
Cipher suites using authenticated ephemeral ECDH key agreement.
|
||||
|
||||
=item B<AECDH>
|
||||
|
||||
Anonymous Elliptic Curve Diffie-Hellman cipher suites.
|
||||
|
||||
=item B<aDSS>, B<DSS>
|
||||
|
||||
Cipher suites using DSS authentication, i.e. the certificates carry DSS keys.
|
||||
|
||||
=item B<aDH>
|
||||
|
||||
Cipher suites effectively using DH authentication, i.e. the certificates carry
|
||||
DH keys.
|
||||
All these cipher suites have been removed in OpenSSL 1.1.0.
|
||||
|
||||
=item B<aECDSA>, B<ECDSA>
|
||||
|
||||
Cipher suites using ECDSA authentication, i.e. the certificates carry ECDSA
|
||||
keys.
|
||||
|
||||
=item B<TLSv1.2>, B<TLSv1.0>, B<SSLv3>
|
||||
|
||||
Lists cipher suites which are only supported in at least TLS v1.2, TLS v1.0 or
|
||||
SSL v3.0 respectively.
|
||||
Note: there are no cipher suites specific to TLS v1.1.
|
||||
Since this is only the minimum version, if, for example, TLSv1.0 is negotiated
|
||||
then both TLSv1.0 and SSLv3.0 cipher suites are available.
|
||||
|
||||
Note: these cipher strings B<do not> change the negotiated version of SSL or
|
||||
TLS, they only affect the list of available cipher suites.
|
||||
|
||||
=item B<AES128>, B<AES256>, B<AES>
|
||||
|
||||
cipher suites using 128 bit AES, 256 bit AES or either 128 or 256 bit AES.
|
||||
|
||||
=item B<AESGCM>
|
||||
|
||||
AES in Galois Counter Mode (GCM): these cipher suites are only supported
|
||||
in TLS v1.2.
|
||||
|
||||
=item B<AESCCM>, B<AESCCM8>
|
||||
|
||||
AES in Cipher Block Chaining - Message Authentication Mode (CCM): these
|
||||
cipher suites are only supported in TLS v1.2. B<AESCCM> references CCM
|
||||
cipher suites using both 16 and 8 octet Integrity Check Value (ICV)
|
||||
while B<AESCCM8> only references 8 octet ICV.
|
||||
|
||||
=item B<ARIA128>, B<ARIA256>, B<ARIA>
|
||||
|
||||
Cipher suites using 128 bit ARIA, 256 bit ARIA or either 128 or 256 bit
|
||||
ARIA.
|
||||
|
||||
=item B<CAMELLIA128>, B<CAMELLIA256>, B<CAMELLIA>
|
||||
|
||||
Cipher suites using 128 bit CAMELLIA, 256 bit CAMELLIA or either 128 or 256 bit
|
||||
CAMELLIA.
|
||||
|
||||
=item B<CHACHA20>
|
||||
|
||||
Cipher suites using ChaCha20.
|
||||
|
||||
=item B<3DES>
|
||||
|
||||
Cipher suites using triple DES.
|
||||
|
||||
=item B<DES>
|
||||
|
||||
Cipher suites using DES (not triple DES).
|
||||
All these cipher suites have been removed in OpenSSL 1.1.0.
|
||||
|
||||
=item B<RC4>
|
||||
|
||||
Cipher suites using RC4.
|
||||
|
||||
=item B<RC2>
|
||||
|
||||
Cipher suites using RC2.
|
||||
|
||||
=item B<IDEA>
|
||||
|
||||
Cipher suites using IDEA.
|
||||
|
||||
=item B<SEED>
|
||||
|
||||
Cipher suites using SEED.
|
||||
|
||||
=item B<MD5>
|
||||
|
||||
Cipher suites using MD5.
|
||||
|
||||
=item B<SHA1>, B<SHA>
|
||||
|
||||
Cipher suites using SHA1.
|
||||
|
||||
=item B<SHA256>, B<SHA384>
|
||||
|
||||
Cipher suites using SHA256 or SHA384.
|
||||
|
||||
=item B<aGOST>
|
||||
|
||||
Cipher suites using GOST R 34.10 (either 2001 or 94) for authentication
|
||||
(needs an engine supporting GOST algorithms).
|
||||
|
||||
=item B<aGOST01>
|
||||
|
||||
Cipher suites using GOST R 34.10-2001 authentication.
|
||||
|
||||
=item B<kGOST>
|
||||
|
||||
Cipher suites, using VKO 34.10 key exchange, specified in the RFC 4357.
|
||||
|
||||
=item B<GOST94>
|
||||
|
||||
Cipher suites, using HMAC based on GOST R 34.11-94.
|
||||
|
||||
=item B<GOST89MAC>
|
||||
|
||||
Cipher suites using GOST 28147-89 MAC B<instead of> HMAC.
|
||||
|
||||
=item B<PSK>
|
||||
|
||||
All cipher suites using pre-shared keys (PSK).
|
||||
|
||||
=item B<kPSK>, B<kECDHEPSK>, B<kDHEPSK>, B<kRSAPSK>
|
||||
|
||||
Cipher suites using PSK key exchange, ECDHE_PSK, DHE_PSK or RSA_PSK.
|
||||
|
||||
=item B<aPSK>
|
||||
|
||||
Cipher suites using PSK authentication (currently all PSK modes apart from
|
||||
RSA_PSK).
|
||||
|
||||
=item B<SUITEB128>, B<SUITEB128ONLY>, B<SUITEB192>
|
||||
|
||||
Enables suite B mode of operation using 128 (permitting 192 bit mode by peer)
|
||||
128 bit (not permitting 192 bit by peer) or 192 bit level of security
|
||||
respectively.
|
||||
If used these cipherstrings should appear first in the cipher
|
||||
list and anything after them is ignored.
|
||||
Setting Suite B mode has additional consequences required to comply with
|
||||
RFC6460.
|
||||
In particular the supported signature algorithms is reduced to support only
|
||||
ECDSA and SHA256 or SHA384, only the elliptic curves P-256 and P-384 can be
|
||||
used and only the two suite B compliant cipher suites
|
||||
(ECDHE-ECDSA-AES128-GCM-SHA256 and ECDHE-ECDSA-AES256-GCM-SHA384) are
|
||||
permissible.
|
||||
|
||||
=back
|
||||
|
||||
=head1 CIPHER SUITE NAMES
|
||||
|
||||
The following lists give the SSL or TLS cipher suites names from the
|
||||
relevant specification and their OpenSSL equivalents. It should be noted,
|
||||
that several cipher suite names do not include the authentication used,
|
||||
e.g. DES-CBC3-SHA. In these cases, RSA authentication is used.
|
||||
|
||||
=head2 SSL v3.0 cipher suites
|
||||
|
||||
SSL_RSA_WITH_NULL_MD5 NULL-MD5
|
||||
SSL_RSA_WITH_NULL_SHA NULL-SHA
|
||||
SSL_RSA_WITH_RC4_128_MD5 RC4-MD5
|
||||
SSL_RSA_WITH_RC4_128_SHA RC4-SHA
|
||||
SSL_RSA_WITH_IDEA_CBC_SHA IDEA-CBC-SHA
|
||||
SSL_RSA_WITH_3DES_EDE_CBC_SHA DES-CBC3-SHA
|
||||
|
||||
SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA DH-DSS-DES-CBC3-SHA
|
||||
SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA DH-RSA-DES-CBC3-SHA
|
||||
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA DHE-DSS-DES-CBC3-SHA
|
||||
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA DHE-RSA-DES-CBC3-SHA
|
||||
|
||||
SSL_DH_anon_WITH_RC4_128_MD5 ADH-RC4-MD5
|
||||
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA ADH-DES-CBC3-SHA
|
||||
|
||||
SSL_FORTEZZA_KEA_WITH_NULL_SHA Not implemented.
|
||||
SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA Not implemented.
|
||||
SSL_FORTEZZA_KEA_WITH_RC4_128_SHA Not implemented.
|
||||
|
||||
=head2 TLS v1.0 cipher suites
|
||||
|
||||
TLS_RSA_WITH_NULL_MD5 NULL-MD5
|
||||
TLS_RSA_WITH_NULL_SHA NULL-SHA
|
||||
TLS_RSA_WITH_RC4_128_MD5 RC4-MD5
|
||||
TLS_RSA_WITH_RC4_128_SHA RC4-SHA
|
||||
TLS_RSA_WITH_IDEA_CBC_SHA IDEA-CBC-SHA
|
||||
TLS_RSA_WITH_3DES_EDE_CBC_SHA DES-CBC3-SHA
|
||||
|
||||
TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA Not implemented.
|
||||
TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA Not implemented.
|
||||
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA DHE-DSS-DES-CBC3-SHA
|
||||
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA DHE-RSA-DES-CBC3-SHA
|
||||
|
||||
TLS_DH_anon_WITH_RC4_128_MD5 ADH-RC4-MD5
|
||||
TLS_DH_anon_WITH_3DES_EDE_CBC_SHA ADH-DES-CBC3-SHA
|
||||
|
||||
=head2 AES cipher suites from RFC3268, extending TLS v1.0
|
||||
|
||||
TLS_RSA_WITH_AES_128_CBC_SHA AES128-SHA
|
||||
TLS_RSA_WITH_AES_256_CBC_SHA AES256-SHA
|
||||
|
||||
TLS_DH_DSS_WITH_AES_128_CBC_SHA DH-DSS-AES128-SHA
|
||||
TLS_DH_DSS_WITH_AES_256_CBC_SHA DH-DSS-AES256-SHA
|
||||
TLS_DH_RSA_WITH_AES_128_CBC_SHA DH-RSA-AES128-SHA
|
||||
TLS_DH_RSA_WITH_AES_256_CBC_SHA DH-RSA-AES256-SHA
|
||||
|
||||
TLS_DHE_DSS_WITH_AES_128_CBC_SHA DHE-DSS-AES128-SHA
|
||||
TLS_DHE_DSS_WITH_AES_256_CBC_SHA DHE-DSS-AES256-SHA
|
||||
TLS_DHE_RSA_WITH_AES_128_CBC_SHA DHE-RSA-AES128-SHA
|
||||
TLS_DHE_RSA_WITH_AES_256_CBC_SHA DHE-RSA-AES256-SHA
|
||||
|
||||
TLS_DH_anon_WITH_AES_128_CBC_SHA ADH-AES128-SHA
|
||||
TLS_DH_anon_WITH_AES_256_CBC_SHA ADH-AES256-SHA
|
||||
|
||||
=head2 Camellia cipher suites from RFC4132, extending TLS v1.0
|
||||
|
||||
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA CAMELLIA128-SHA
|
||||
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA CAMELLIA256-SHA
|
||||
|
||||
TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA DH-DSS-CAMELLIA128-SHA
|
||||
TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA DH-DSS-CAMELLIA256-SHA
|
||||
TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA DH-RSA-CAMELLIA128-SHA
|
||||
TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA DH-RSA-CAMELLIA256-SHA
|
||||
|
||||
TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA DHE-DSS-CAMELLIA128-SHA
|
||||
TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA DHE-DSS-CAMELLIA256-SHA
|
||||
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA DHE-RSA-CAMELLIA128-SHA
|
||||
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA DHE-RSA-CAMELLIA256-SHA
|
||||
|
||||
TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA ADH-CAMELLIA128-SHA
|
||||
TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA ADH-CAMELLIA256-SHA
|
||||
|
||||
=head2 SEED cipher suites from RFC4162, extending TLS v1.0
|
||||
|
||||
TLS_RSA_WITH_SEED_CBC_SHA SEED-SHA
|
||||
|
||||
TLS_DH_DSS_WITH_SEED_CBC_SHA DH-DSS-SEED-SHA
|
||||
TLS_DH_RSA_WITH_SEED_CBC_SHA DH-RSA-SEED-SHA
|
||||
|
||||
TLS_DHE_DSS_WITH_SEED_CBC_SHA DHE-DSS-SEED-SHA
|
||||
TLS_DHE_RSA_WITH_SEED_CBC_SHA DHE-RSA-SEED-SHA
|
||||
|
||||
TLS_DH_anon_WITH_SEED_CBC_SHA ADH-SEED-SHA
|
||||
|
||||
=head2 GOST cipher suites from draft-chudov-cryptopro-cptls, extending TLS v1.0
|
||||
|
||||
Note: these ciphers require an engine which including GOST cryptographic
|
||||
algorithms, such as the B<gost> engine, which isn't part of the OpenSSL
|
||||
distribution.
|
||||
|
||||
TLS_GOSTR341094_WITH_28147_CNT_IMIT GOST94-GOST89-GOST89
|
||||
TLS_GOSTR341001_WITH_28147_CNT_IMIT GOST2001-GOST89-GOST89
|
||||
TLS_GOSTR341094_WITH_NULL_GOSTR3411 GOST94-NULL-GOST94
|
||||
TLS_GOSTR341001_WITH_NULL_GOSTR3411 GOST2001-NULL-GOST94
|
||||
|
||||
=head2 Additional Export 1024 and other cipher suites
|
||||
|
||||
Note: these ciphers can also be used in SSL v3.
|
||||
|
||||
TLS_DHE_DSS_WITH_RC4_128_SHA DHE-DSS-RC4-SHA
|
||||
|
||||
=head2 Elliptic curve cipher suites
|
||||
|
||||
TLS_ECDHE_RSA_WITH_NULL_SHA ECDHE-RSA-NULL-SHA
|
||||
TLS_ECDHE_RSA_WITH_RC4_128_SHA ECDHE-RSA-RC4-SHA
|
||||
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA ECDHE-RSA-DES-CBC3-SHA
|
||||
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA ECDHE-RSA-AES128-SHA
|
||||
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA ECDHE-RSA-AES256-SHA
|
||||
|
||||
TLS_ECDHE_ECDSA_WITH_NULL_SHA ECDHE-ECDSA-NULL-SHA
|
||||
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA ECDHE-ECDSA-RC4-SHA
|
||||
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA ECDHE-ECDSA-DES-CBC3-SHA
|
||||
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA ECDHE-ECDSA-AES128-SHA
|
||||
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA ECDHE-ECDSA-AES256-SHA
|
||||
|
||||
TLS_ECDH_anon_WITH_NULL_SHA AECDH-NULL-SHA
|
||||
TLS_ECDH_anon_WITH_RC4_128_SHA AECDH-RC4-SHA
|
||||
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA AECDH-DES-CBC3-SHA
|
||||
TLS_ECDH_anon_WITH_AES_128_CBC_SHA AECDH-AES128-SHA
|
||||
TLS_ECDH_anon_WITH_AES_256_CBC_SHA AECDH-AES256-SHA
|
||||
|
||||
=head2 TLS v1.2 cipher suites
|
||||
|
||||
TLS_RSA_WITH_NULL_SHA256 NULL-SHA256
|
||||
|
||||
TLS_RSA_WITH_AES_128_CBC_SHA256 AES128-SHA256
|
||||
TLS_RSA_WITH_AES_256_CBC_SHA256 AES256-SHA256
|
||||
TLS_RSA_WITH_AES_128_GCM_SHA256 AES128-GCM-SHA256
|
||||
TLS_RSA_WITH_AES_256_GCM_SHA384 AES256-GCM-SHA384
|
||||
|
||||
TLS_DH_RSA_WITH_AES_128_CBC_SHA256 DH-RSA-AES128-SHA256
|
||||
TLS_DH_RSA_WITH_AES_256_CBC_SHA256 DH-RSA-AES256-SHA256
|
||||
TLS_DH_RSA_WITH_AES_128_GCM_SHA256 DH-RSA-AES128-GCM-SHA256
|
||||
TLS_DH_RSA_WITH_AES_256_GCM_SHA384 DH-RSA-AES256-GCM-SHA384
|
||||
|
||||
TLS_DH_DSS_WITH_AES_128_CBC_SHA256 DH-DSS-AES128-SHA256
|
||||
TLS_DH_DSS_WITH_AES_256_CBC_SHA256 DH-DSS-AES256-SHA256
|
||||
TLS_DH_DSS_WITH_AES_128_GCM_SHA256 DH-DSS-AES128-GCM-SHA256
|
||||
TLS_DH_DSS_WITH_AES_256_GCM_SHA384 DH-DSS-AES256-GCM-SHA384
|
||||
|
||||
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 DHE-RSA-AES128-SHA256
|
||||
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 DHE-RSA-AES256-SHA256
|
||||
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 DHE-RSA-AES128-GCM-SHA256
|
||||
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 DHE-RSA-AES256-GCM-SHA384
|
||||
|
||||
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 DHE-DSS-AES128-SHA256
|
||||
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 DHE-DSS-AES256-SHA256
|
||||
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 DHE-DSS-AES128-GCM-SHA256
|
||||
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 DHE-DSS-AES256-GCM-SHA384
|
||||
|
||||
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 ECDHE-RSA-AES128-SHA256
|
||||
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 ECDHE-RSA-AES256-SHA384
|
||||
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256
|
||||
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ECDHE-RSA-AES256-GCM-SHA384
|
||||
|
||||
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 ECDHE-ECDSA-AES128-SHA256
|
||||
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 ECDHE-ECDSA-AES256-SHA384
|
||||
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ECDHE-ECDSA-AES128-GCM-SHA256
|
||||
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ECDHE-ECDSA-AES256-GCM-SHA384
|
||||
|
||||
TLS_DH_anon_WITH_AES_128_CBC_SHA256 ADH-AES128-SHA256
|
||||
TLS_DH_anon_WITH_AES_256_CBC_SHA256 ADH-AES256-SHA256
|
||||
TLS_DH_anon_WITH_AES_128_GCM_SHA256 ADH-AES128-GCM-SHA256
|
||||
TLS_DH_anon_WITH_AES_256_GCM_SHA384 ADH-AES256-GCM-SHA384
|
||||
|
||||
RSA_WITH_AES_128_CCM AES128-CCM
|
||||
RSA_WITH_AES_256_CCM AES256-CCM
|
||||
DHE_RSA_WITH_AES_128_CCM DHE-RSA-AES128-CCM
|
||||
DHE_RSA_WITH_AES_256_CCM DHE-RSA-AES256-CCM
|
||||
RSA_WITH_AES_128_CCM_8 AES128-CCM8
|
||||
RSA_WITH_AES_256_CCM_8 AES256-CCM8
|
||||
DHE_RSA_WITH_AES_128_CCM_8 DHE-RSA-AES128-CCM8
|
||||
DHE_RSA_WITH_AES_256_CCM_8 DHE-RSA-AES256-CCM8
|
||||
ECDHE_ECDSA_WITH_AES_128_CCM ECDHE-ECDSA-AES128-CCM
|
||||
ECDHE_ECDSA_WITH_AES_256_CCM ECDHE-ECDSA-AES256-CCM
|
||||
ECDHE_ECDSA_WITH_AES_128_CCM_8 ECDHE-ECDSA-AES128-CCM8
|
||||
ECDHE_ECDSA_WITH_AES_256_CCM_8 ECDHE-ECDSA-AES256-CCM8
|
||||
|
||||
=head2 ARIA cipher suites from RFC6209, extending TLS v1.2
|
||||
|
||||
Note: the CBC modes mentioned in this RFC are not supported.
|
||||
|
||||
TLS_RSA_WITH_ARIA_128_GCM_SHA256 ARIA128-GCM-SHA256
|
||||
TLS_RSA_WITH_ARIA_256_GCM_SHA384 ARIA256-GCM-SHA384
|
||||
TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 DHE-RSA-ARIA128-GCM-SHA256
|
||||
TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 DHE-RSA-ARIA256-GCM-SHA384
|
||||
TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 DHE-DSS-ARIA128-GCM-SHA256
|
||||
TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 DHE-DSS-ARIA256-GCM-SHA384
|
||||
TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 ECDHE-ECDSA-ARIA128-GCM-SHA256
|
||||
TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 ECDHE-ECDSA-ARIA256-GCM-SHA384
|
||||
TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 ECDHE-ARIA128-GCM-SHA256
|
||||
TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 ECDHE-ARIA256-GCM-SHA384
|
||||
TLS_PSK_WITH_ARIA_128_GCM_SHA256 PSK-ARIA128-GCM-SHA256
|
||||
TLS_PSK_WITH_ARIA_256_GCM_SHA384 PSK-ARIA256-GCM-SHA384
|
||||
TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 DHE-PSK-ARIA128-GCM-SHA256
|
||||
TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 DHE-PSK-ARIA256-GCM-SHA384
|
||||
TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 RSA-PSK-ARIA128-GCM-SHA256
|
||||
TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 RSA-PSK-ARIA256-GCM-SHA384
|
||||
|
||||
=head2 Camellia HMAC-Based cipher suites from RFC6367, extending TLS v1.2
|
||||
|
||||
TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 ECDHE-ECDSA-CAMELLIA128-SHA256
|
||||
TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 ECDHE-ECDSA-CAMELLIA256-SHA384
|
||||
TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 ECDHE-RSA-CAMELLIA128-SHA256
|
||||
TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 ECDHE-RSA-CAMELLIA256-SHA384
|
||||
|
||||
=head2 Pre-shared keying (PSK) cipher suites
|
||||
|
||||
PSK_WITH_NULL_SHA PSK-NULL-SHA
|
||||
DHE_PSK_WITH_NULL_SHA DHE-PSK-NULL-SHA
|
||||
RSA_PSK_WITH_NULL_SHA RSA-PSK-NULL-SHA
|
||||
|
||||
PSK_WITH_RC4_128_SHA PSK-RC4-SHA
|
||||
PSK_WITH_3DES_EDE_CBC_SHA PSK-3DES-EDE-CBC-SHA
|
||||
PSK_WITH_AES_128_CBC_SHA PSK-AES128-CBC-SHA
|
||||
PSK_WITH_AES_256_CBC_SHA PSK-AES256-CBC-SHA
|
||||
|
||||
DHE_PSK_WITH_RC4_128_SHA DHE-PSK-RC4-SHA
|
||||
DHE_PSK_WITH_3DES_EDE_CBC_SHA DHE-PSK-3DES-EDE-CBC-SHA
|
||||
DHE_PSK_WITH_AES_128_CBC_SHA DHE-PSK-AES128-CBC-SHA
|
||||
DHE_PSK_WITH_AES_256_CBC_SHA DHE-PSK-AES256-CBC-SHA
|
||||
|
||||
RSA_PSK_WITH_RC4_128_SHA RSA-PSK-RC4-SHA
|
||||
RSA_PSK_WITH_3DES_EDE_CBC_SHA RSA-PSK-3DES-EDE-CBC-SHA
|
||||
RSA_PSK_WITH_AES_128_CBC_SHA RSA-PSK-AES128-CBC-SHA
|
||||
RSA_PSK_WITH_AES_256_CBC_SHA RSA-PSK-AES256-CBC-SHA
|
||||
|
||||
PSK_WITH_AES_128_GCM_SHA256 PSK-AES128-GCM-SHA256
|
||||
PSK_WITH_AES_256_GCM_SHA384 PSK-AES256-GCM-SHA384
|
||||
DHE_PSK_WITH_AES_128_GCM_SHA256 DHE-PSK-AES128-GCM-SHA256
|
||||
DHE_PSK_WITH_AES_256_GCM_SHA384 DHE-PSK-AES256-GCM-SHA384
|
||||
RSA_PSK_WITH_AES_128_GCM_SHA256 RSA-PSK-AES128-GCM-SHA256
|
||||
RSA_PSK_WITH_AES_256_GCM_SHA384 RSA-PSK-AES256-GCM-SHA384
|
||||
|
||||
PSK_WITH_AES_128_CBC_SHA256 PSK-AES128-CBC-SHA256
|
||||
PSK_WITH_AES_256_CBC_SHA384 PSK-AES256-CBC-SHA384
|
||||
PSK_WITH_NULL_SHA256 PSK-NULL-SHA256
|
||||
PSK_WITH_NULL_SHA384 PSK-NULL-SHA384
|
||||
DHE_PSK_WITH_AES_128_CBC_SHA256 DHE-PSK-AES128-CBC-SHA256
|
||||
DHE_PSK_WITH_AES_256_CBC_SHA384 DHE-PSK-AES256-CBC-SHA384
|
||||
DHE_PSK_WITH_NULL_SHA256 DHE-PSK-NULL-SHA256
|
||||
DHE_PSK_WITH_NULL_SHA384 DHE-PSK-NULL-SHA384
|
||||
RSA_PSK_WITH_AES_128_CBC_SHA256 RSA-PSK-AES128-CBC-SHA256
|
||||
RSA_PSK_WITH_AES_256_CBC_SHA384 RSA-PSK-AES256-CBC-SHA384
|
||||
RSA_PSK_WITH_NULL_SHA256 RSA-PSK-NULL-SHA256
|
||||
RSA_PSK_WITH_NULL_SHA384 RSA-PSK-NULL-SHA384
|
||||
PSK_WITH_AES_128_GCM_SHA256 PSK-AES128-GCM-SHA256
|
||||
PSK_WITH_AES_256_GCM_SHA384 PSK-AES256-GCM-SHA384
|
||||
|
||||
ECDHE_PSK_WITH_RC4_128_SHA ECDHE-PSK-RC4-SHA
|
||||
ECDHE_PSK_WITH_3DES_EDE_CBC_SHA ECDHE-PSK-3DES-EDE-CBC-SHA
|
||||
ECDHE_PSK_WITH_AES_128_CBC_SHA ECDHE-PSK-AES128-CBC-SHA
|
||||
ECDHE_PSK_WITH_AES_256_CBC_SHA ECDHE-PSK-AES256-CBC-SHA
|
||||
ECDHE_PSK_WITH_AES_128_CBC_SHA256 ECDHE-PSK-AES128-CBC-SHA256
|
||||
ECDHE_PSK_WITH_AES_256_CBC_SHA384 ECDHE-PSK-AES256-CBC-SHA384
|
||||
ECDHE_PSK_WITH_NULL_SHA ECDHE-PSK-NULL-SHA
|
||||
ECDHE_PSK_WITH_NULL_SHA256 ECDHE-PSK-NULL-SHA256
|
||||
ECDHE_PSK_WITH_NULL_SHA384 ECDHE-PSK-NULL-SHA384
|
||||
|
||||
PSK_WITH_CAMELLIA_128_CBC_SHA256 PSK-CAMELLIA128-SHA256
|
||||
PSK_WITH_CAMELLIA_256_CBC_SHA384 PSK-CAMELLIA256-SHA384
|
||||
|
||||
DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 DHE-PSK-CAMELLIA128-SHA256
|
||||
DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 DHE-PSK-CAMELLIA256-SHA384
|
||||
|
||||
RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 RSA-PSK-CAMELLIA128-SHA256
|
||||
RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 RSA-PSK-CAMELLIA256-SHA384
|
||||
|
||||
ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 ECDHE-PSK-CAMELLIA128-SHA256
|
||||
ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 ECDHE-PSK-CAMELLIA256-SHA384
|
||||
|
||||
PSK_WITH_AES_128_CCM PSK-AES128-CCM
|
||||
PSK_WITH_AES_256_CCM PSK-AES256-CCM
|
||||
DHE_PSK_WITH_AES_128_CCM DHE-PSK-AES128-CCM
|
||||
DHE_PSK_WITH_AES_256_CCM DHE-PSK-AES256-CCM
|
||||
PSK_WITH_AES_128_CCM_8 PSK-AES128-CCM8
|
||||
PSK_WITH_AES_256_CCM_8 PSK-AES256-CCM8
|
||||
DHE_PSK_WITH_AES_128_CCM_8 DHE-PSK-AES128-CCM8
|
||||
DHE_PSK_WITH_AES_256_CCM_8 DHE-PSK-AES256-CCM8
|
||||
|
||||
=head2 ChaCha20-Poly1305 cipher suites, extending TLS v1.2
|
||||
|
||||
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 ECDHE-RSA-CHACHA20-POLY1305
|
||||
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 ECDHE-ECDSA-CHACHA20-POLY1305
|
||||
TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 DHE-RSA-CHACHA20-POLY1305
|
||||
TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 PSK-CHACHA20-POLY1305
|
||||
TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 ECDHE-PSK-CHACHA20-POLY1305
|
||||
TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 DHE-PSK-CHACHA20-POLY1305
|
||||
TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 RSA-PSK-CHACHA20-POLY1305
|
||||
|
||||
=head2 TLS v1.3 cipher suites
|
||||
|
||||
TLS_AES_128_GCM_SHA256 TLS_AES_128_GCM_SHA256
|
||||
TLS_AES_256_GCM_SHA384 TLS_AES_256_GCM_SHA384
|
||||
TLS_CHACHA20_POLY1305_SHA256 TLS_CHACHA20_POLY1305_SHA256
|
||||
TLS_AES_128_CCM_SHA256 TLS_AES_128_CCM_SHA256
|
||||
TLS_AES_128_CCM_8_SHA256 TLS_AES_128_CCM_8_SHA256
|
||||
|
||||
=head2 Older names used by OpenSSL
|
||||
|
||||
The following names are accepted by older releases:
|
||||
|
||||
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA EDH-RSA-DES-CBC3-SHA (DHE-RSA-DES-CBC3-SHA)
|
||||
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA EDH-DSS-DES-CBC3-SHA (DHE-DSS-DES-CBC3-SHA)
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Some compiled versions of OpenSSL may not include all the ciphers
|
||||
listed here because some ciphers were excluded at compile time.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Verbose listing of all OpenSSL ciphers including NULL ciphers:
|
||||
|
||||
openssl ciphers -v 'ALL:eNULL'
|
||||
|
||||
Include all ciphers except NULL and anonymous DH then sort by
|
||||
strength:
|
||||
|
||||
openssl ciphers -v 'ALL:!ADH:@STRENGTH'
|
||||
|
||||
Include all ciphers except ones with no encryption (eNULL) or no
|
||||
authentication (aNULL):
|
||||
|
||||
openssl ciphers -v 'ALL:!aNULL'
|
||||
|
||||
Include only 3DES ciphers and then place RSA ciphers last:
|
||||
|
||||
openssl ciphers -v '3DES:+RSA'
|
||||
|
||||
Include all RC4 ciphers but leave out those without authentication:
|
||||
|
||||
openssl ciphers -v 'RC4:!COMPLEMENTOFDEFAULT'
|
||||
|
||||
Include all ciphers with RSA authentication but leave out ciphers without
|
||||
encryption.
|
||||
|
||||
openssl ciphers -v 'RSA:!COMPLEMENTOFALL'
|
||||
|
||||
Set security level to 2 and display all ciphers consistent with level 2:
|
||||
|
||||
openssl ciphers -s -v 'ALL:@SECLEVEL=2'
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<openssl(1)>,
|
||||
L<openssl-s_client(1)>,
|
||||
L<openssl-s_server(1)>,
|
||||
L<ssl(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The B<-V> option was added in OpenSSL 1.0.0.
|
||||
|
||||
The B<-stdname> is only available if OpenSSL is built with tracing enabled
|
||||
(B<enable-ssl-trace> argument to Configure) before OpenSSL 1.1.1.
|
||||
|
||||
The B<-convert> option was added in OpenSSL 1.1.1.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
this file except in compliance with the License. You can obtain a copy
|
||||
in the file LICENSE in the source distribution or at
|
||||
L<https://www.openssl.org/source/license.html>.
|
||||
|
||||
=cut
|
||||
@@ -55,15 +55,15 @@ x509
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment generic
|
||||
=for openssl generic
|
||||
|
||||
B<openssl> B<cmd> [B<-help>] [B<...>]
|
||||
B<openssl> I<cmd> B<-help> | [I<-option> | I<-option> I<arg>] ... [I<arg>] ...
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Every B<cmd> listed above is a (sub-)command of the L<openssl(1)> application.
|
||||
It has its own detailed manual page at B<openssl-cmd(1)>. For example, to view
|
||||
the manual page for the B<openssl dgst> command, type B<man openssl-dgst>.
|
||||
Every I<cmd> listed above is a (sub-)command of the L<openssl(1)> application.
|
||||
It has its own detailed manual page at B<openssl-I<cmd>>(1). For example, to
|
||||
view the manual page for the B<openssl dgst> command, type C<man openssl-dgst>.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -132,8 +132,8 @@ L<openssl-x509(1)>,
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
Initially, the manual page entry for the B<openssl cmd> command used
|
||||
to be available at B<cmd(1)>. Later, the alias B<openssl-cmd(1)> was
|
||||
Initially, the manual page entry for the C<openssl I<cmd>> command used
|
||||
to be available at I<cmd>(1). Later, the alias B<openssl-I<cmd>>(1) was
|
||||
introduced, which made it easier to group the openssl commands using
|
||||
the L<apropos(1)> command or the shell's tab completion.
|
||||
|
||||
|
||||
+85
-106
@@ -23,23 +23,25 @@ B<openssl> B<cms>
|
||||
[B<-uncompress>]
|
||||
[B<-EncryptedData_encrypt>]
|
||||
[B<-sign_receipt>]
|
||||
[B<-verify_receipt receipt>]
|
||||
[B<-in filename>]
|
||||
[B<-inform SMIME|PEM|DER>]
|
||||
[B<-rctform SMIME|PEM|DER>]
|
||||
[B<-out filename>]
|
||||
[B<-outform SMIME|PEM|DER>]
|
||||
[B<-stream -indef -noindef>]
|
||||
[B<-verify_receipt> I<receipt>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-inform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-rctform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-outform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-stream>]
|
||||
[B<-indef>]
|
||||
[B<-noindef>]
|
||||
[B<-content filename>]
|
||||
[B<-noindef>]
|
||||
[B<-content> I<filename>]
|
||||
[B<-text>]
|
||||
[B<-noout>]
|
||||
[B<-print>]
|
||||
[B<-CAfile file>]
|
||||
[B<-CApath dir>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-attime timestamp>]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
@@ -50,24 +52,24 @@ B<openssl> B<cms>
|
||||
[B<-inhibit_map>]
|
||||
[B<-no_check_time>]
|
||||
[B<-partial_chain>]
|
||||
[B<-policy arg>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-policy_check>]
|
||||
[B<-policy_print>]
|
||||
[B<-purpose purpose>]
|
||||
[B<-purpose> I<purpose>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-trusted_first>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-use_deltas>]
|
||||
[B<-auth_level num>]
|
||||
[B<-verify_depth num>]
|
||||
[B<-verify_email email>]
|
||||
[B<-verify_hostname hostname>]
|
||||
[B<-verify_ip ip>]
|
||||
[B<-verify_name name>]
|
||||
[B<-auth_level> I<num>]
|
||||
[B<-verify_depth> I<num>]
|
||||
[B<-verify_email> I<email>]
|
||||
[B<-verify_hostname> I<hostname>]
|
||||
[B<-verify_ip> I<ip>]
|
||||
[B<-verify_name> I<name>]
|
||||
[B<-x509_strict>]
|
||||
[B<-md digest>]
|
||||
[B<-md> I<digest>]
|
||||
[B<-I<cipher>>]
|
||||
[B<-nointern>]
|
||||
[B<-noverify>]
|
||||
@@ -78,34 +80,35 @@ B<openssl> B<cms>
|
||||
[B<-crlfeol>]
|
||||
[B<-asciicrlf>]
|
||||
[B<-nodetach>]
|
||||
[B<-certfile file>]
|
||||
[B<-certsout file>]
|
||||
[B<-signer file>]
|
||||
[B<-recip file>]
|
||||
[B<-certfile> I<file>]
|
||||
[B<-certsout> I<file>]
|
||||
[B<-signer> I<file>]
|
||||
[B<-recip> I<file>]
|
||||
[B<-keyid>]
|
||||
[B<-receipt_request_all>]
|
||||
[B<-receipt_request_first>]
|
||||
[B<-receipt_request_from emailaddress>]
|
||||
[B<-receipt_request_to emailaddress>]
|
||||
[B<-receipt_request_from> I<emailaddress>]
|
||||
[B<-receipt_request_to> I<emailaddress>]
|
||||
[B<-receipt_request_print>]
|
||||
[B<-secretkey key>]
|
||||
[B<-secretkeyid id>]
|
||||
[B<-econtent_type type>]
|
||||
[B<-inkey file>]
|
||||
[B<-keyopt name:parameter>]
|
||||
[B<-passin arg>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<cert.pem...>]
|
||||
[B<-to addr>]
|
||||
[B<-from addr>]
|
||||
[B<-subject subj>]
|
||||
[cert.pem]...
|
||||
[B<-secretkey> I<key>]
|
||||
[B<-secretkeyid> I<id>]
|
||||
[B<-econtent_type> I<type>]
|
||||
[B<-inkey> I<file>]
|
||||
[B<-keyopt> I<name>:I<parameter>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-to> I<addr>]
|
||||
[B<-from> I<addr>]
|
||||
[B<-subject> I<subj>]
|
||||
[I<cert.pem> ...]
|
||||
|
||||
=for openssl ifdef des-wrap engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<cms> command handles S/MIME v3.1 mail. It can encrypt, decrypt, sign and
|
||||
verify, compress and uncompress S/MIME messages.
|
||||
This command handles S/MIME v3.1 mail. It can encrypt, decrypt,
|
||||
sign and verify, compress and uncompress S/MIME messages.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -202,18 +205,18 @@ Generate and output a signed receipt for the supplied message. The input
|
||||
message B<must> contain a signed receipt request. Functionality is otherwise
|
||||
similar to the B<-sign> operation.
|
||||
|
||||
=item B<-verify_receipt receipt>
|
||||
=item B<-verify_receipt> I<receipt>
|
||||
|
||||
Verify a signed receipt in filename B<receipt>. The input message B<must>
|
||||
contain the original receipt request. Functionality is otherwise similar
|
||||
to the B<-verify> operation.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
The input message to be encrypted or signed or the message to be decrypted
|
||||
or verified.
|
||||
|
||||
=item B<-inform SMIME|PEM|DER>
|
||||
=item B<-inform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
This specifies the input format for the CMS structure. The default
|
||||
is B<SMIME> which reads an S/MIME format message. B<PEM> and B<DER>
|
||||
@@ -222,17 +225,17 @@ instead. This currently only affects the input format of the CMS
|
||||
structure, if no CMS structure is being input (for example with
|
||||
B<-encrypt> or B<-sign>) this option has no effect.
|
||||
|
||||
=item B<-rctform SMIME|PEM|DER>
|
||||
=item B<-rctform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
Specify the format for a signed receipt for use with the B<-receipt_verify>
|
||||
operation.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
The message text that has been decrypted or verified or the output MIME
|
||||
format message that has been signed or verified.
|
||||
|
||||
=item B<-outform SMIME|PEM|DER>
|
||||
=item B<-outform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
This specifies the output format for the CMS structure. The default
|
||||
is B<SMIME> which writes an S/MIME format message. B<PEM> and B<DER>
|
||||
@@ -241,7 +244,7 @@ instead. This currently only affects the output format of the CMS
|
||||
structure, if no CMS structure is being output (for example with
|
||||
B<-verify> or B<-decrypt>) this option has no effect.
|
||||
|
||||
=item B<-stream -indef -noindef>
|
||||
=item B<-stream>, B<-indef>, B<-noindef>
|
||||
|
||||
The B<-stream> and B<-indef> options are equivalent and enable streaming I/O
|
||||
for encoding operations. This permits single pass processing of data without
|
||||
@@ -256,7 +259,7 @@ Disable streaming I/O where it would produce and indefinite length constructed
|
||||
encoding. This option currently has no effect. In future streaming will be
|
||||
enabled by default on all relevant operations and this option will disable it.
|
||||
|
||||
=item B<-content filename>
|
||||
=item B<-content> I<filename>
|
||||
|
||||
This specifies a file containing the detached content, this is only
|
||||
useful with the B<-verify> command. This is only usable if the CMS
|
||||
@@ -282,26 +285,11 @@ structure is being checked.
|
||||
For the B<-cmsout> operation print out all fields of the CMS structure. This
|
||||
is mainly useful for testing purposes.
|
||||
|
||||
=item B<-CAfile file>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
A file containing trusted CA certificates, only used with B<-verify>.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-CApath dir>
|
||||
|
||||
A directory containing trusted CA certificates, only used with
|
||||
B<-verify>. This directory must be a standard certificate directory: that
|
||||
is a hash of each subject name (using B<x509 -hash>) should be linked
|
||||
to each certificate.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location
|
||||
|
||||
=item B<-md digest>
|
||||
=item B<-md> I<digest>
|
||||
|
||||
Digest algorithm to use when signing or resigning. If not present then the
|
||||
default digest algorithm for the signing key will be used (usually SHA1).
|
||||
@@ -311,7 +299,7 @@ default digest algorithm for the signing key will be used (usually SHA1).
|
||||
The encryption algorithm to use. For example triple DES (168 bits) - B<-des3>
|
||||
or 256 bit AES - B<-aes256>. Any standard algorithm name (as used by the
|
||||
EVP_get_cipherbyname() function) can also be used preceded by a dash, for
|
||||
example B<-aes-128-cbc>. See L<enc(1)> for a list of ciphers
|
||||
example B<-aes-128-cbc>. See L<openssl-enc(1)> for a list of ciphers
|
||||
supported by your version of OpenSSL.
|
||||
|
||||
If not specified triple DES is used. Only used with B<-encrypt> and
|
||||
@@ -374,24 +362,24 @@ to translation by mail relays but it cannot be read by mail agents that
|
||||
do not support S/MIME. Without this option cleartext signing with
|
||||
the MIME type multipart/signed is used.
|
||||
|
||||
=item B<-certfile file>
|
||||
=item B<-certfile> I<file>
|
||||
|
||||
Allows additional certificates to be specified. When signing these will
|
||||
be included with the message. When verifying these will be searched for
|
||||
the signers certificates. The certificates should be in PEM format.
|
||||
|
||||
=item B<-certsout file>
|
||||
=item B<-certsout> I<file>
|
||||
|
||||
Any certificates contained in the message are written to B<file>.
|
||||
Any certificates contained in the message are written to I<file>.
|
||||
|
||||
=item B<-signer file>
|
||||
=item B<-signer> I<file>
|
||||
|
||||
A signing certificate when signing or resigning a message, this option can be
|
||||
used multiple times if more than one signer is required. If a message is being
|
||||
verified then the signers certificates will be written to this file if the
|
||||
verification was successful.
|
||||
|
||||
=item B<-recip file>
|
||||
=item B<-recip> I<file>
|
||||
|
||||
When decrypting a message this specifies the recipients certificate. The
|
||||
certificate must match one of the recipients of the message or an error
|
||||
@@ -416,12 +404,12 @@ For B<-sign> option include a signed receipt request. Indicate requests should
|
||||
be provided by all recipient or first tier recipients (those mailed directly
|
||||
and not from a mailing list). Ignored it B<-receipt_request_from> is included.
|
||||
|
||||
=item B<-receipt_request_from emailaddress>
|
||||
=item B<-receipt_request_from> I<emailaddress>
|
||||
|
||||
For B<-sign> option include a signed receipt request. Add an explicit email
|
||||
address where receipts should be supplied.
|
||||
|
||||
=item B<-receipt_request_to emailaddress>
|
||||
=item B<-receipt_request_to> I<emailaddress>
|
||||
|
||||
Add an explicit email address where signed receipts should be sent to. This
|
||||
option B<must> but supplied if a signed receipt it requested.
|
||||
@@ -431,7 +419,7 @@ option B<must> but supplied if a signed receipt it requested.
|
||||
For the B<-verify> operation print out the contents of any signed receipt
|
||||
requests.
|
||||
|
||||
=item B<-secretkey key>
|
||||
=item B<-secretkey> I<key>
|
||||
|
||||
Specify symmetric key to use. The key must be supplied in hex format and be
|
||||
consistent with the algorithm used. Supported by the B<-EncryptedData_encrypt>
|
||||
@@ -439,21 +427,21 @@ B<-EncryptedData_decrypt>, B<-encrypt> and B<-decrypt> options. When used
|
||||
with B<-encrypt> or B<-decrypt> the supplied key is used to wrap or unwrap the
|
||||
content encryption key using an AES key in the B<KEKRecipientInfo> type.
|
||||
|
||||
=item B<-secretkeyid id>
|
||||
=item B<-secretkeyid> I<id>
|
||||
|
||||
The key identifier for the supplied symmetric key for B<KEKRecipientInfo> type.
|
||||
This option B<must> be present if the B<-secretkey> option is used with
|
||||
B<-encrypt>. With B<-decrypt> operations the B<id> is used to locate the
|
||||
B<-encrypt>. With B<-decrypt> operations the I<id> is used to locate the
|
||||
relevant key if it is not supplied then an attempt is used to decrypt any
|
||||
B<KEKRecipientInfo> structures.
|
||||
|
||||
=item B<-econtent_type type>
|
||||
=item B<-econtent_type> I<type>
|
||||
|
||||
Set the encapsulated content type to B<type> if not supplied the B<Data> type
|
||||
is used. The B<type> argument can be any valid OID name in either text or
|
||||
Set the encapsulated content type to I<type> if not supplied the B<Data> type
|
||||
is used. The I<type> argument can be any valid OID name in either text or
|
||||
numerical format.
|
||||
|
||||
=item B<-inkey file>
|
||||
=item B<-inkey> I<file>
|
||||
|
||||
The private key to use when signing or decrypting. This must match the
|
||||
corresponding certificate. If this option is not specified then the
|
||||
@@ -461,37 +449,28 @@ private key must be included in the certificate file specified with
|
||||
the B<-recip> or B<-signer> file. When signing this option can be used
|
||||
multiple times to specify successive keys.
|
||||
|
||||
=item B<-keyopt name:opt>
|
||||
=item B<-keyopt> I<name>:I<parameter>
|
||||
|
||||
For signing and encryption this option can be used multiple times to
|
||||
set customised parameters for the preceding key or certificate. It can
|
||||
currently be used to set RSA-PSS for signing, RSA-OAEP for encryption
|
||||
or to modify default parameters for ECDH.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The private key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<cert.pem...>
|
||||
=item I<cert.pem> ...
|
||||
|
||||
One or more certificates of message recipients: used when encrypting
|
||||
a message.
|
||||
|
||||
=item B<-to, -from, -subject>
|
||||
=item B<-to>, B<-from>, B<-subject>
|
||||
|
||||
The relevant mail headers. These are included outside the signed
|
||||
portion of a message so they may be included manually. If signing
|
||||
@@ -507,7 +486,7 @@ B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,
|
||||
B<-verify_ip>, B<-verify_name>, B<-x509_strict>
|
||||
|
||||
Set various certificate chain validation options. See the
|
||||
L<verify(1)> manual page for details.
|
||||
L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=back
|
||||
|
||||
@@ -627,14 +606,14 @@ the signers certificates.
|
||||
|
||||
=head1 COMPATIBILITY WITH PKCS#7 FORMAT
|
||||
|
||||
The B<smime> utility can only process the older B<PKCS#7> format. The B<cms>
|
||||
utility supports Cryptographic Message Syntax format. Use of some features
|
||||
will result in messages which cannot be processed by applications which only
|
||||
support the older format. These are detailed below.
|
||||
L<openssl-smime(1)> can only process the older B<PKCS#7> format.
|
||||
B<openssl cms> supports Cryptographic Message Syntax format.
|
||||
Use of some features will result in messages which cannot be processed by
|
||||
applications which only support the older format. These are detailed below.
|
||||
|
||||
The use of the B<-keyid> option with B<-sign> or B<-encrypt>.
|
||||
|
||||
The B<-outform PEM> option uses different headers.
|
||||
The B<-outform> I<PEM> option uses different headers.
|
||||
|
||||
The B<-compress> option.
|
||||
|
||||
@@ -645,7 +624,7 @@ The use of PSS with B<-sign>.
|
||||
The use of OAEP or non-RSA keys with B<-encrypt>.
|
||||
|
||||
Additionally the B<-EncryptedData_create> and B<-data_create> type cannot
|
||||
be processed by the older B<smime> command.
|
||||
be processed by the older L<openssl-smime(1)> command.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
@@ -764,7 +743,7 @@ No revocation checking is done on the signer's certificate.
|
||||
The use of multiple B<-signer> options and the B<-resign> command were first
|
||||
added in OpenSSL 1.0.0.
|
||||
|
||||
The B<keyopt> option was added in OpenSSL 1.0.2.
|
||||
The B<-keyopt> option was added in OpenSSL 1.0.2.
|
||||
|
||||
Support for RSA-OAEP and RSA-PSS was added in OpenSSL 1.0.2.
|
||||
|
||||
|
||||
+20
-24
@@ -8,23 +8,27 @@ openssl-crl - CRL utility
|
||||
|
||||
B<openssl> B<crl>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-text>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-nameopt option>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-nameopt> I<option>]
|
||||
[B<-noout>]
|
||||
[B<-hash>]
|
||||
[B<-issuer>]
|
||||
[B<-lastupdate>]
|
||||
[B<-nextupdate>]
|
||||
[B<-CAfile file>]
|
||||
[B<-CApath dir>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
|
||||
=for openssl ifdef hash_old
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<crl> command processes CRL files in DER or PEM format.
|
||||
This command processes CRL files in DER or PEM format.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -34,23 +38,23 @@ The B<crl> command processes CRL files in DER or PEM format.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. B<DER> format is DER encoded CRL
|
||||
structure. B<PEM> (the default) is a base64 encoded version of
|
||||
the DER form with header and footer lines.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read from or standard input if this
|
||||
option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename to write to or standard output by
|
||||
default.
|
||||
@@ -59,10 +63,10 @@ default.
|
||||
|
||||
Print out the CRL in text form.
|
||||
|
||||
=item B<-nameopt option>
|
||||
=item B<-nameopt> I<option>
|
||||
|
||||
Option which determines how the subject or issuer names are displayed. See
|
||||
the description of B<-nameopt> in L<x509(1)>.
|
||||
the description of B<-nameopt> in L<openssl-x509(1)>.
|
||||
|
||||
=item B<-noout>
|
||||
|
||||
@@ -90,17 +94,9 @@ Output the lastUpdate field.
|
||||
|
||||
Output the nextUpdate field.
|
||||
|
||||
=item B<-CAfile file>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
Verify the signature on a CRL by looking up the issuing certificate in
|
||||
B<file>.
|
||||
|
||||
=item B<-CApath dir>
|
||||
|
||||
Verify the signature on a CRL by looking up the issuing certificate in
|
||||
B<dir>. This directory must be a standard certificate directory: that
|
||||
is a hash of each subject name (using B<x509 -hash>) should be linked
|
||||
to each certificate.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@ openssl-crl2pkcs7 - Create a PKCS#7 structure from a CRL and certificates
|
||||
|
||||
B<openssl> B<crl2pkcs7>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-certfile filename>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-certfile> I<filename>]
|
||||
[B<-nocrl>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<crl2pkcs7> command takes an optional CRL and one or more
|
||||
This command takes an optional CRL and one or more
|
||||
certificates and converts them into a PKCS#7 degenerate "certificates
|
||||
only" structure.
|
||||
|
||||
@@ -29,29 +29,29 @@ only" structure.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the CRL input format. B<DER> format is DER encoded CRL
|
||||
structure.B<PEM> (the default) is a base64 encoded version of
|
||||
the DER form with header and footer lines. The default format is PEM.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the PKCS#7 structure output format. B<DER> format is DER
|
||||
encoded PKCS#7 structure.B<PEM> (the default) is a base64 encoded version of
|
||||
the DER form with header and footer lines. The default format is PEM.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a CRL from or standard input if this
|
||||
option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename to write the PKCS#7 structure to or standard
|
||||
output by default.
|
||||
|
||||
=item B<-certfile filename>
|
||||
=item B<-certfile> I<filename>
|
||||
|
||||
Specifies a filename containing one or more certificates in B<PEM> format.
|
||||
All certificates in the file will be added to the PKCS#7 structure. This
|
||||
@@ -82,7 +82,7 @@ different certificates:
|
||||
The output file is a PKCS#7 signed data structure containing no signers and
|
||||
just certificates and an optional CRL.
|
||||
|
||||
This utility can be used to send certificates and CAs to Netscape as part of
|
||||
This command can be used to send certificates and CAs to Netscape as part of
|
||||
the certificate enrollment process. This involves sending the DER encoded output
|
||||
as MIME type application/x-x509-user-cert.
|
||||
|
||||
|
||||
+49
-60
@@ -6,7 +6,7 @@ openssl-dgst - perform digest operations
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl dgst>
|
||||
B<openssl> B<dgst>|I<digest>
|
||||
[B<-I<digest>>]
|
||||
[B<-help>]
|
||||
[B<-c>]
|
||||
@@ -14,35 +14,33 @@ B<openssl dgst>
|
||||
[B<-hex>]
|
||||
[B<-binary>]
|
||||
[B<-r>]
|
||||
[B<-out filename>]
|
||||
[B<-sign filename>]
|
||||
[B<-keyform arg>]
|
||||
[B<-passin arg>]
|
||||
[B<-verify filename>]
|
||||
[B<-prverify filename>]
|
||||
[B<-signature filename>]
|
||||
[B<-sigopt nm:v>]
|
||||
[B<-hmac key>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-sign> I<filename>]
|
||||
[B<-keyform> I<arg>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-verify> I<filename>]
|
||||
[B<-prverify> I<filename>]
|
||||
[B<-signature> I<filename>]
|
||||
[B<-sigopt> I<nm>:I<v>]
|
||||
[B<-hmac> I<key>]
|
||||
[B<-fips-fingerprint>]
|
||||
[B<-rand file...>]
|
||||
[B<-engine id>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-engine_impl>]
|
||||
[B<file...>]
|
||||
|
||||
B<openssl> I<digest> [B<...>]
|
||||
[I<file> ...]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The digest functions output the message digest of a supplied file or files
|
||||
in hexadecimal. The digest functions also generate and verify digital
|
||||
This command output the message digest of a supplied file or files
|
||||
in hexadecimal, and also generates and verifies digital
|
||||
signatures using message digests.
|
||||
|
||||
The generic name, B<dgst>, may be used with an option specifying the
|
||||
The generic name, B<openssl dgst>, may be used with an option specifying the
|
||||
algorithm to be used.
|
||||
The default digest is I<sha256>.
|
||||
A supported I<digest> name may also be used as the command name.
|
||||
To see the list of supported algorithms, use the I<list --digest-commands>
|
||||
command.
|
||||
The default digest is B<sha256>.
|
||||
A supported I<digest> name may also be used as the sub-command name.
|
||||
To see the list of supported algorithms, use C<openssl list -digest-commands>
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -55,12 +53,12 @@ Print out a usage message.
|
||||
=item B<-I<digest>>
|
||||
|
||||
Specifies name of a supported digest to be used. To see the list of
|
||||
supported digests, use the command I<list --digest-commands>.
|
||||
supported digests, use the command C<list --digest-commands>.
|
||||
|
||||
=item B<-c>
|
||||
|
||||
Print out the digest in two digit groups separated by colons, only relevant if
|
||||
B<hex> format output is used.
|
||||
the B<-hex> option is given as well.
|
||||
|
||||
=item B<-d>
|
||||
|
||||
@@ -79,78 +77,78 @@ Output the digest or signature in binary form.
|
||||
=item B<-r>
|
||||
|
||||
Output the digest in the "coreutils" format, including newlines.
|
||||
Used by programs like B<sha1sum>.
|
||||
Used by programs like L<sha1sum(1)>.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Filename to output to, or standard output by default.
|
||||
|
||||
=item B<-sign filename>
|
||||
=item B<-sign> I<filename>
|
||||
|
||||
Digitally sign the digest using the private key in "filename". Note this option
|
||||
does not support Ed25519 or Ed448 private keys. Use the B<pkeyutl> command
|
||||
instead for this.
|
||||
does not support Ed25519 or Ed448 private keys. Use the L<openssl-pkeyutl(1)>
|
||||
command instead for this.
|
||||
|
||||
=item B<-keyform arg>
|
||||
=item B<-keyform> I<arg>
|
||||
|
||||
Specifies the key format to sign digest with. The DER, PEM, P12,
|
||||
and ENGINE formats are supported.
|
||||
|
||||
=item B<-sigopt nm:v>
|
||||
=item B<-sigopt> I<nm>:I<v>
|
||||
|
||||
Pass options to the signature algorithm during sign or verify operations.
|
||||
Names and values of these options are algorithm-specific.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The private key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The private key password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-verify filename>
|
||||
=item B<-verify> I<filename>
|
||||
|
||||
Verify the signature using the public key in "filename".
|
||||
The output is either "Verification OK" or "Verification Failure".
|
||||
|
||||
=item B<-prverify filename>
|
||||
=item B<-prverify> I<filename>
|
||||
|
||||
Verify the signature using the private key in "filename".
|
||||
|
||||
=item B<-signature filename>
|
||||
=item B<-signature> I<filename>
|
||||
|
||||
The actual signature to verify.
|
||||
|
||||
=item B<-hmac key>
|
||||
=item B<-hmac> I<key>
|
||||
|
||||
Create a hashed MAC using "key".
|
||||
|
||||
The L<openssl-mac(1)> command should be preferred to using this command line
|
||||
option.
|
||||
|
||||
=item B<-mac alg>
|
||||
=item B<-mac> I<alg>
|
||||
|
||||
Create MAC (keyed Message Authentication Code). The most popular MAC
|
||||
algorithm is HMAC (hash-based MAC), but there are other MAC algorithms
|
||||
which are not based on hash, for instance B<gost-mac> algorithm,
|
||||
supported by B<ccgost> engine. MAC keys and other options should be set
|
||||
supported by the B<gost> engine. MAC keys and other options should be set
|
||||
via B<-macopt> parameter.
|
||||
|
||||
The L<openssl-mac(1)> command should be preferred to using this command line
|
||||
option.
|
||||
|
||||
=item B<-macopt nm:v>
|
||||
=item B<-macopt> I<nm>:I<v>
|
||||
|
||||
Passes options to MAC algorithm, specified by B<-mac> key.
|
||||
Following options are supported by both by B<HMAC> and B<gost-mac>:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<key:string>
|
||||
=item B<key>:I<string>
|
||||
|
||||
Specifies MAC key as alphanumeric string (use if key contain printable
|
||||
characters only). String length must conform to any restrictions of
|
||||
the MAC algorithm for example exactly 32 chars for gost-mac.
|
||||
|
||||
=item B<hexkey:string>
|
||||
=item B<hexkey>:I<string>
|
||||
|
||||
Specifies MAC key in hexadecimal form (two hex digits per byte).
|
||||
Key length must conform to any restrictions of the MAC algorithm
|
||||
@@ -161,26 +159,17 @@ for example exactly 32 chars for gost-mac.
|
||||
The L<openssl-mac(1)> command should be preferred to using this command line
|
||||
option.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item B<-fips-fingerprint>
|
||||
|
||||
Compute HMAC using a specific key for certain OpenSSL-FIPS operations.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Use engine B<id> for operations (including private key storage).
|
||||
Use engine I<id> for operations (including private key storage).
|
||||
This engine is not used as source for digest algorithms, unless it is
|
||||
also specified in the configuration file or B<-engine_impl> is also
|
||||
specified.
|
||||
@@ -188,9 +177,9 @@ specified.
|
||||
=item B<-engine_impl>
|
||||
|
||||
When used with the B<-engine> option, it specifies to also use
|
||||
engine B<id> for digest operations.
|
||||
engine I<id> for digest operations.
|
||||
|
||||
=item B<file...>
|
||||
=item I<file> ...
|
||||
|
||||
File or files to digest. If no files are specified then standard input is
|
||||
used.
|
||||
@@ -216,13 +205,13 @@ To verify a signature:
|
||||
|
||||
The digest mechanisms that are available will depend on the options
|
||||
used when building OpenSSL.
|
||||
The B<list digest-commands> command can be used to list them.
|
||||
The C<openssl list -digest-commands> command can be used to list them.
|
||||
|
||||
New or agile applications should use probably use SHA-256. Other digests,
|
||||
particularly SHA-1 and MD5, are still widely used for interoperating
|
||||
with existing formats and protocols.
|
||||
|
||||
When signing a file, B<dgst> will automatically determine the algorithm
|
||||
When signing a file, this command will automatically determine the algorithm
|
||||
(RSA, ECC, etc) to use for signing based on the private key's ASN.1 info.
|
||||
When verifying signatures, it only handles the RSA, DSA, or ECDSA signature
|
||||
itself, not the related data to identify the signer and algorithm used in
|
||||
|
||||
@@ -8,8 +8,8 @@ openssl-dhparam - DH parameter manipulation and generation
|
||||
|
||||
B<openssl dhparam>
|
||||
[B<-help>]
|
||||
[B<-inform DER|PEM>]
|
||||
[B<-outform DER|PEM>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-dsaparam>]
|
||||
@@ -20,11 +20,13 @@ B<openssl dhparam>
|
||||
[B<-2>]
|
||||
[B<-3>]
|
||||
[B<-5>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-engine id>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-engine> I<id>]
|
||||
[I<numbits>]
|
||||
|
||||
=for openssl ifdef dsaparam engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This command is used to manipulate DH parameter files.
|
||||
@@ -37,14 +39,14 @@ This command is used to manipulate DH parameter files.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option uses an ASN1 DER encoded
|
||||
form compatible with the PKCS#3 DHparameter structure. The PEM form is the
|
||||
default format: it consists of the B<DER> format base64 encoded with
|
||||
additional header and footer lines.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
@@ -81,21 +83,12 @@ displays a warning if not.
|
||||
|
||||
The generator to use, either 2, 3 or 5. If present then the
|
||||
input file is ignored and parameters are generated instead. If not
|
||||
present but B<numbits> is present, parameters are generated with the
|
||||
present but I<numbits> is present, parameters are generated with the
|
||||
default generator 2.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item I<numbits>
|
||||
|
||||
@@ -119,9 +112,9 @@ This option prints out the DH parameters in human readable form.
|
||||
This option converts the parameters into C code. The parameters can then
|
||||
be loaded by calling the get_dhNNNN() function.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<dhparam>
|
||||
Specifying an engine (by its unique I<id> string) will cause B<dhparam>
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -130,10 +123,10 @@ for all available algorithms.
|
||||
|
||||
=head1 WARNINGS
|
||||
|
||||
The program B<dhparam> combines the functionality of the programs B<dh> and
|
||||
B<gendh> in previous versions of OpenSSL. The B<dh> and B<gendh>
|
||||
programs are retained for now but may have different purposes in future
|
||||
versions of OpenSSL.
|
||||
This command combines the functionality of the L<openssl-dh(1)> and the
|
||||
L<openssl-gendh(1)> commands in previous OpenSSL versions.
|
||||
The L<openssl-dh(1)> and L<openssl-gendh(1)> commands are retained for now but
|
||||
may have different purposes in future versions of OpenSSL.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
|
||||
+23
-25
@@ -8,12 +8,12 @@ openssl-dsa - DSA key processing
|
||||
|
||||
B<openssl> B<dsa>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-passin arg>]
|
||||
[B<-out filename>]
|
||||
[B<-passout arg>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-aes128>]
|
||||
[B<-aes192>]
|
||||
[B<-aes256>]
|
||||
@@ -31,11 +31,13 @@ B<openssl> B<dsa>
|
||||
[B<-modulus>]
|
||||
[B<-pubin>]
|
||||
[B<-pubout>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
=for openssl ifdef pvk-string pvk-weak pvk-none engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<dsa> command processes DSA keys. They can be converted between various
|
||||
This command processes DSA keys. They can be converted between various
|
||||
forms and their components printed out. B<Note> This command uses the
|
||||
traditional SSLeay compatible format for private key encryption: newer
|
||||
applications should use the more secure PKCS#8 format using the B<pkcs8>
|
||||
@@ -48,7 +50,7 @@ applications should use the more secure PKCS#8 format using the B<pkcs8>
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option with a private key uses
|
||||
an ASN1 DER encoded form of an ASN.1 SEQUENCE consisting of the values of
|
||||
@@ -60,42 +62,38 @@ The B<PEM> form is the default format: it consists of the B<DER> format base64
|
||||
encoded with additional header and footer lines. In the case of a private key
|
||||
PKCS#8 format is also accepted.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a key from or standard input if this
|
||||
option is not specified. If the key is encrypted a pass phrase will be
|
||||
prompted for.
|
||||
|
||||
=item B<-passin arg>
|
||||
|
||||
The input file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write a key to or standard output by
|
||||
is not specified. If any encryption options are set then a pass phrase will be
|
||||
prompted for. The output filename should B<not> be the same as the input
|
||||
filename.
|
||||
|
||||
=item B<-passout arg>
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The output file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The password source for the input and output file.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-aes128>, B<-aes192>, B<-aes256>, B<-aria128>, B<-aria192>, B<-aria256>, B<-camellia128>, B<-camellia192>, B<-camellia256>, B<-des>, B<-des3>, B<-idea>
|
||||
|
||||
These options encrypt the private key with the specified
|
||||
cipher before outputting it. A pass phrase is prompted for.
|
||||
If none of these options is specified the key is written in plain text. This
|
||||
means that using the B<dsa> utility to read in an encrypted key with no
|
||||
encryption option can be used to remove the pass phrase from a key, or by
|
||||
setting the encryption options it can be use to add or change the pass phrase.
|
||||
means that this command can be used to remove the pass phrase from a key
|
||||
by not giving any encryption option is given, or to add or change the pass
|
||||
phrase by setting them.
|
||||
These options can only be used with PEM format output files.
|
||||
|
||||
=item B<-text>
|
||||
@@ -121,9 +119,9 @@ By default, a private key is output. With this option a public
|
||||
key will be output instead. This option is automatically set if the input is
|
||||
a public key.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<dsa>
|
||||
Specifying an engine (by its unique I<id> string) will cause L<openssl-dsa(1)>
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
@@ -8,19 +8,19 @@ openssl-dsaparam - DSA parameter manipulation and generation
|
||||
|
||||
B<openssl dsaparam>
|
||||
[B<-help>]
|
||||
[B<-inform DER|PEM>]
|
||||
[B<-outform DER|PEM>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-noout>]
|
||||
[B<-text>]
|
||||
[B<-C>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-genkey>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-verbose>]
|
||||
[B<numbits>]
|
||||
[I<numbits>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -34,25 +34,25 @@ This command is used to manipulate or generate DSA parameter files.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option uses an ASN1 DER encoded
|
||||
form compatible with RFC2459 (PKIX) DSS-Parms that is a SEQUENCE consisting
|
||||
of p, q and g respectively. The PEM form is the default format: it consists
|
||||
of the B<DER> format base64 encoded with additional header and footer lines.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read parameters from or standard input if
|
||||
this option is not specified. If the B<numbits> parameter is included then
|
||||
this option is not specified. If the I<numbits> parameter is included then
|
||||
this option will be ignored.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename parameters to. Standard output is used
|
||||
if this option is not present. The output filename should B<not> be the same
|
||||
@@ -76,22 +76,13 @@ be loaded by calling the get_dsaXXX() function.
|
||||
This option will generate a DSA either using the specified or generated
|
||||
parameters.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-engine id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<dsaparam>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -100,10 +91,10 @@ for all available algorithms.
|
||||
|
||||
Print extra details about the operations being performed.
|
||||
|
||||
=item B<numbits>
|
||||
=item I<numbits>
|
||||
|
||||
This option specifies that a parameter set should be generated of size
|
||||
B<numbits>. It must be the last option. If this option is included then
|
||||
I<numbits>. It must be the last option. If this option is included then
|
||||
the input file (if any) is ignored.
|
||||
|
||||
=back
|
||||
|
||||
+28
-30
@@ -8,12 +8,12 @@ openssl-ec - EC key processing
|
||||
|
||||
B<openssl> B<ec>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-passin arg>]
|
||||
[B<-out filename>]
|
||||
[B<-passout arg>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-des>]
|
||||
[B<-des3>]
|
||||
[B<-idea>]
|
||||
@@ -22,19 +22,21 @@ B<openssl> B<ec>
|
||||
[B<-param_out>]
|
||||
[B<-pubin>]
|
||||
[B<-pubout>]
|
||||
[B<-conv_form arg>]
|
||||
[B<-param_enc arg>]
|
||||
[B<-conv_form> I<arg>]
|
||||
[B<-param_enc> I<arg>]
|
||||
[B<-no_public>]
|
||||
[B<-check>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<ec> command processes EC keys. They can be converted between various
|
||||
forms and their components printed out. B<Note> OpenSSL uses the
|
||||
The L<openssl-ec(1)> command processes EC keys. They can be converted between
|
||||
various forms and their components printed out. B<Note> OpenSSL uses the
|
||||
private key format specified in 'SEC 1: Elliptic Curve Cryptography'
|
||||
(http://www.secg.org/). To convert an OpenSSL EC private key into the
|
||||
PKCS#8 private key format use the B<pkcs8> command.
|
||||
PKCS#8 private key format use the L<openssl-pkcs8(1)> command.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -44,7 +46,7 @@ PKCS#8 private key format use the B<pkcs8> command.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option with a private key uses
|
||||
an ASN.1 DER encoded SEC1 private key. When used with a public key it
|
||||
@@ -53,41 +55,37 @@ The B<PEM> form is the default format: it consists of the B<DER> format base64
|
||||
encoded with additional header and footer lines. In the case of a private key
|
||||
PKCS#8 format is also accepted.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a key from or standard input if this
|
||||
option is not specified. If the key is encrypted a pass phrase will be
|
||||
prompted for.
|
||||
|
||||
=item B<-passin arg>
|
||||
|
||||
The input file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write a key to or standard output by
|
||||
is not specified. If any encryption options are set then a pass phrase will be
|
||||
prompted for. The output filename should B<not> be the same as the input
|
||||
filename.
|
||||
|
||||
=item B<-passout arg>
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The output file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The password source for the input and output file.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-des|-des3|-idea>
|
||||
=item B<-des>|B<-des3>|B<-idea>
|
||||
|
||||
These options encrypt the private key with the DES, triple DES, IDEA or
|
||||
any other cipher supported by OpenSSL before outputting it. A pass phrase is
|
||||
prompted for.
|
||||
If none of these options is specified the key is written in plain text. This
|
||||
means that using the B<ec> utility to read in an encrypted key with no
|
||||
means that using this command to read in an encrypted key with no
|
||||
encryption option can be used to remove the pass phrase from a key, or by
|
||||
setting the encryption options it can be use to add or change the pass phrase.
|
||||
These options can only be used with PEM format output files.
|
||||
@@ -111,7 +109,7 @@ By default a private key is output. With this option a public
|
||||
key will be output instead. This option is automatically set if the input is
|
||||
a public key.
|
||||
|
||||
=item B<-conv_form>
|
||||
=item B<-conv_form> I<arg>
|
||||
|
||||
This specifies how the points on the elliptic curve are converted
|
||||
into octet strings. Possible values are: B<compressed> (the default
|
||||
@@ -121,7 +119,7 @@ B<Note> Due to patent issues the B<compressed> option is disabled
|
||||
by default for binary curves and can be enabled by defining
|
||||
the preprocessor macro B<OPENSSL_EC_BIN_PT_COMP> at compile time.
|
||||
|
||||
=item B<-param_enc arg>
|
||||
=item B<-param_enc> I<arg>
|
||||
|
||||
This specifies how the elliptic curve parameters are encoded.
|
||||
Possible value are: B<named_curve>, i.e. the ec parameters are
|
||||
@@ -139,9 +137,9 @@ This option omits the public key components from the private key output.
|
||||
|
||||
This option checks the consistency of an EC private or public key.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<ec>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
@@ -8,24 +8,26 @@ openssl-ecparam - EC parameter manipulation and generation
|
||||
|
||||
B<openssl ecparam>
|
||||
[B<-help>]
|
||||
[B<-inform DER|PEM>]
|
||||
[B<-outform DER|PEM>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-noout>]
|
||||
[B<-text>]
|
||||
[B<-C>]
|
||||
[B<-check>]
|
||||
[B<-check_named>]
|
||||
[B<-name arg>]
|
||||
[B<-name> I<arg>]
|
||||
[B<-list_curves>]
|
||||
[B<-conv_form arg>]
|
||||
[B<-param_enc arg>]
|
||||
[B<-conv_form> I<arg>]
|
||||
[B<-param_enc> I<arg>]
|
||||
[B<-no_seed>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-genkey>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -39,24 +41,24 @@ This command is used to manipulate or generate EC parameter files.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option uses an ASN.1 DER encoded
|
||||
form compatible with RFC 3279 EcpkParameters. The PEM form is the default
|
||||
format: it consists of the B<DER> format base64 encoded with additional
|
||||
header and footer lines.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read parameters from or standard input if
|
||||
this option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename parameters to. Standard output is used
|
||||
if this option is not present. The output filename should B<not> be the same
|
||||
@@ -84,17 +86,16 @@ Validate the elliptic curve parameters.
|
||||
Validate the elliptic name curve parameters by checking if the curve parameters
|
||||
match any built-in curves.
|
||||
|
||||
=item B<-name arg>
|
||||
=item B<-name> I<arg>
|
||||
|
||||
Use the EC parameters with the specified 'short' name. Use B<-list_curves>
|
||||
to get a list of all currently implemented EC parameters.
|
||||
|
||||
=item B<-list_curves>
|
||||
|
||||
If this options is specified B<ecparam> will print out a list of all
|
||||
currently implemented EC parameters names and exit.
|
||||
Print out a list of all currently implemented EC parameters names and exit.
|
||||
|
||||
=item B<-conv_form>
|
||||
=item B<-conv_form> I<arg>
|
||||
|
||||
This specifies how the points on the elliptic curve are converted
|
||||
into octet strings. Possible values are: B<compressed>, B<uncompressed> (the
|
||||
@@ -104,7 +105,7 @@ B<Note> Due to patent issues the B<compressed> option is disabled
|
||||
by default for binary curves and can be enabled by defining
|
||||
the preprocessor macro B<OPENSSL_EC_BIN_PT_COMP> at compile time.
|
||||
|
||||
=item B<-param_enc arg>
|
||||
=item B<-param_enc> I<arg>
|
||||
|
||||
This specifies how the elliptic curve parameters are encoded.
|
||||
Possible value are: B<named_curve>, i.e. the ec parameters are
|
||||
@@ -123,22 +124,13 @@ is included in the ECParameters structure (see RFC 3279).
|
||||
|
||||
This option will generate an EC private key using the specified parameters.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-engine id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<ecparam>
|
||||
Specifying an engine (by its unique I<id> string) will cause B<ecparam>
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -153,7 +145,7 @@ PEM format EC parameters use the header and footer lines:
|
||||
-----END EC PARAMETERS-----
|
||||
|
||||
OpenSSL is currently not able to generate new groups and therefore
|
||||
B<ecparam> can only create EC parameters from known (named) curves.
|
||||
B<openssl ecparam> can only create EC parameters from known (named) curves.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
|
||||
+51
-58
@@ -6,39 +6,42 @@ openssl-enc - symmetric cipher routines
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl enc -I<cipher>>
|
||||
B<openssl> B<enc>|I<cipher>
|
||||
[B<-I<cipher>>]
|
||||
[B<-help>]
|
||||
[B<-ciphers>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-pass arg>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-pass> I<arg>]
|
||||
[B<-e>]
|
||||
[B<-d>]
|
||||
[B<-a>]
|
||||
[B<-base64>]
|
||||
[B<-A>]
|
||||
[B<-k password>]
|
||||
[B<-kfile filename>]
|
||||
[B<-K key>]
|
||||
[B<-iv IV>]
|
||||
[B<-S salt>]
|
||||
[B<-k> I<password>]
|
||||
[B<-kfile> I<filename>]
|
||||
[B<-K> I<key>]
|
||||
[B<-iv> I<IV>]
|
||||
[B<-S> I<salt>]
|
||||
[B<-salt>]
|
||||
[B<-nosalt>]
|
||||
[B<-z>]
|
||||
[B<-md digest>]
|
||||
[B<-iter count>]
|
||||
[B<-md> I<digest>]
|
||||
[B<-iter> I<count>]
|
||||
[B<-pbkdf2>]
|
||||
[B<-p>]
|
||||
[B<-P>]
|
||||
[B<-bufsize number>]
|
||||
[B<-bufsize> I<number>]
|
||||
[B<-nopad>]
|
||||
[B<-debug>]
|
||||
[B<-none>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-engine id>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
B<openssl> I<[cipher]> [B<...>]
|
||||
=for openssl ifdef z engine
|
||||
|
||||
B<openssl> I<cipher> [B<...>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -59,18 +62,18 @@ Print out a usage message.
|
||||
|
||||
List all supported ciphers.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
The input filename, standard input by default.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
The output filename, standard output by default.
|
||||
|
||||
=item B<-pass arg>
|
||||
=item B<-pass> I<arg>
|
||||
|
||||
The password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-e>
|
||||
|
||||
@@ -94,23 +97,23 @@ Same as B<-a>
|
||||
|
||||
If the B<-a> option is set then base64 process the data on one line.
|
||||
|
||||
=item B<-k password>
|
||||
=item B<-k> I<password>
|
||||
|
||||
The password to derive the key from. This is for compatibility with previous
|
||||
versions of OpenSSL. Superseded by the B<-pass> argument.
|
||||
|
||||
=item B<-kfile filename>
|
||||
=item B<-kfile> I<filename>
|
||||
|
||||
Read the password to derive the key from the first line of B<filename>.
|
||||
Read the password to derive the key from the first line of I<filename>.
|
||||
This is for compatibility with previous versions of OpenSSL. Superseded by
|
||||
the B<-pass> argument.
|
||||
|
||||
=item B<-md digest>
|
||||
=item B<-md> I<digest>
|
||||
|
||||
Use the specified digest to create the key from the passphrase.
|
||||
The default algorithm is sha-256.
|
||||
|
||||
=item B<-iter count>
|
||||
=item B<-iter> I<count>
|
||||
|
||||
Use a given number of iterations on the password in deriving the encryption key.
|
||||
High values increase the time required to brute-force the resulting file.
|
||||
@@ -131,11 +134,11 @@ OpenSSL.
|
||||
Use salt (randomly generated or provide with B<-S> option) when
|
||||
encrypting, this is the default.
|
||||
|
||||
=item B<-S salt>
|
||||
=item B<-S> I<salt>
|
||||
|
||||
The actual salt to use: this must be represented as a string of hex digits.
|
||||
|
||||
=item B<-K key>
|
||||
=item B<-K> I<key>
|
||||
|
||||
The actual key to use: this must be represented as a string comprised only
|
||||
of hex digits. If only the key is specified, the IV must additionally specified
|
||||
@@ -144,7 +147,7 @@ key given with the B<-K> option will be used and the IV generated from the
|
||||
password will be taken. It does not make much sense to specify both key
|
||||
and password.
|
||||
|
||||
=item B<-iv IV>
|
||||
=item B<-iv> I<IV>
|
||||
|
||||
The actual IV to use: this must be represented as a string comprised only
|
||||
of hex digits. When only the key is specified using the B<-K> option, the
|
||||
@@ -160,7 +163,7 @@ Print out the key and IV used.
|
||||
Print out the key and IV used then immediately exit: don't do any encryption
|
||||
or decryption.
|
||||
|
||||
=item B<-bufsize number>
|
||||
=item B<-bufsize> I<number>
|
||||
|
||||
Set the buffer size for I/O.
|
||||
|
||||
@@ -182,28 +185,19 @@ or zlib-dynamic option.
|
||||
|
||||
Use NULL cipher (no encryption or decryption of input).
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=back
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The program can be called either as B<openssl cipher> or
|
||||
B<openssl enc -cipher>. The first form doesn't work with
|
||||
The program can be called either as C<openssl I<cipher>> or
|
||||
C<openssl enc -I<cipher>>. The first form doesn't work with
|
||||
engine-provided ciphers, because this form is processed before the
|
||||
configuration file is read and any ENGINEs loaded.
|
||||
Use the B<list> command to get a list of supported ciphers.
|
||||
Use the L<openssl-list(1)> command to get a list of supported ciphers.
|
||||
|
||||
Engines which provide entirely new encryption algorithms (such as the ccgost
|
||||
engine which provides gost89 algorithm) should be configured in the
|
||||
@@ -248,27 +242,26 @@ Blowfish and RC5 algorithms use a 128 bit key.
|
||||
|
||||
Note that some of these ciphers can be disabled at compile time
|
||||
and some are available only if an appropriate engine is configured
|
||||
in the configuration file. The output of the B<enc> command run with
|
||||
the B<-ciphers> option (that is B<openssl enc -ciphers>) produces a
|
||||
list of ciphers, supported by your version of OpenSSL, including
|
||||
in the configuration file. The output when invoking this command
|
||||
with the B<-ciphers> option (that is C<openssl enc -ciphers>) is
|
||||
a list of ciphers, supported by your version of OpenSSL, including
|
||||
ones provided by configured engines.
|
||||
|
||||
The B<enc> program does not support authenticated encryption modes
|
||||
This command does not support authenticated encryption modes
|
||||
like CCM and GCM, and will not support such modes in the future.
|
||||
The B<enc> interface by necessity must begin streaming output (e.g.,
|
||||
to standard output when B<-out> is not used) before the authentication
|
||||
tag could be validated, leading to the usage of B<enc> in pipelines
|
||||
that begin processing untrusted data and are not capable of rolling
|
||||
back upon authentication failure. The AEAD modes currently in common
|
||||
use also suffer from catastrophic failure of confidentiality and/or
|
||||
integrity upon reuse of key/iv/nonce, and since B<enc> places the
|
||||
This is due to having to begin streaming output (e.g., to standard output
|
||||
when B<-out> is not used) before the authentication tag could be validated.
|
||||
When this command is used in a pipeline, the receiveing end will not be
|
||||
able to roll back upon authentication failure. The AEAD modes currently in
|
||||
common use also suffer from catastrophic failure of confidentiality and/or
|
||||
integrity upon reuse of key/iv/nonce, and since B<openssl enc> places the
|
||||
entire burden of key/iv/nonce management upon the user, the risk of
|
||||
exposing AEAD modes is too great to allow. These key/iv/nonce
|
||||
management issues also affect other modes currently exposed in B<enc>,
|
||||
management issues also affect other modes currently exposed in this command,
|
||||
but the failure modes are less extreme in these cases, and the
|
||||
functionality cannot be removed with a stable release branch.
|
||||
For bulk encryption of data, whether using authenticated encryption
|
||||
modes or other modes, L<cms(1)> is recommended, as it provides a
|
||||
modes or other modes, L<openssl-cms(1)> is recommended, as it provides a
|
||||
standard data format and performs the needed key/iv/nonce management.
|
||||
|
||||
|
||||
@@ -410,7 +403,7 @@ Base64 decode a file then decrypt it using a password supplied in a file:
|
||||
|
||||
The B<-A> option when used with large files doesn't work properly.
|
||||
|
||||
The B<enc> program only supports a fixed number of algorithms with
|
||||
The B<openssl enc> command only supports a fixed number of algorithms with
|
||||
certain parameters. So if, for example, you want to use RC2 with a
|
||||
76 bit key or RC4 with an 84 bit key you can't use this program.
|
||||
|
||||
|
||||
+11
-10
@@ -7,23 +7,21 @@ openssl-engine - load and query engines
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl engine>
|
||||
[ I<engine...> ]
|
||||
[B<-v>]
|
||||
[B<-vv>]
|
||||
[B<-vvv>]
|
||||
[B<-vvv>]
|
||||
[B<-vvv>]
|
||||
[B<-vvvv>]
|
||||
[B<-c>]
|
||||
[B<-t>]
|
||||
[B<-tt>]
|
||||
[B<-pre> I<command>]
|
||||
[B<-post> I<command>]
|
||||
[ I<engine...> ]
|
||||
[B<-pre> I<command>] ...
|
||||
[B<-post> I<command>] ...
|
||||
[I<engine> ...]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<engine> command is used to query the status and capabilities
|
||||
of the specified B<engine>'s.
|
||||
This command is used to query the status and capabilities
|
||||
of the specified I<engine>s.
|
||||
Engines may be specified before and after all other command-line flags.
|
||||
Only those specified are queried.
|
||||
|
||||
@@ -57,10 +55,13 @@ Displays an error trace for any unavailable engine.
|
||||
Command-line configuration of engines.
|
||||
The B<-pre> command is given to the engine before it is loaded and
|
||||
the B<-post> command is given after the engine is loaded.
|
||||
The I<command> is of the form I<cmd:val> where I<cmd> is the command,
|
||||
The I<command> is of the form I<cmd>:I<val> where I<cmd> is the command,
|
||||
and I<val> is the value for the command.
|
||||
See the example below.
|
||||
|
||||
These two options are cumulative, so they may be given more than once in the
|
||||
same command.
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
@@ -85,7 +86,7 @@ To list all the commands available to a dynamic engine:
|
||||
LOAD: Load up the ENGINE specified by other settings
|
||||
(input flags): NO_INPUT
|
||||
|
||||
To list the capabilities of the I<rsax> engine:
|
||||
To list the capabilities of the B<rsax> engine:
|
||||
|
||||
$ openssl engine -c
|
||||
(rsax) RSAX engine support
|
||||
|
||||
@@ -6,14 +6,14 @@ openssl-errstr - lookup error codes
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl errstr error_code>
|
||||
B<openssl errstr> I<error_code>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Sometimes an application will not load error message and only
|
||||
numerical forms will be available. The B<errstr> utility can be used to
|
||||
display the meaning of the hex code. The hex code is the hex digits after the
|
||||
second colon.
|
||||
numerical forms will be available. This command can be
|
||||
used to display the meaning of the hex code. The hex code is the hex digits
|
||||
after the second colon.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
|
||||
@@ -8,20 +8,18 @@ openssl-fipsinstall - perform FIPS configuration installation
|
||||
|
||||
B<openssl fipsinstall>
|
||||
[B<-help>]
|
||||
[B<-in configfilename>]
|
||||
[B<-out configfilename>]
|
||||
[B<-module modulefilename>]
|
||||
[B<-provider_name providername>]
|
||||
[B<-section_name sectionname>]
|
||||
[B<-in> I<configfilename>]
|
||||
[B<-out> I<configfilename>]
|
||||
[B<-module> I<modulefilename>]
|
||||
[B<-provider_name> I<providername>]
|
||||
[B<-section_name> I<sectionname>]
|
||||
[B<-verify>]
|
||||
[B<-mac_name macname>]
|
||||
[B<-macopt>]
|
||||
|
||||
B<openssl> I<fipsinstall> [B<...>]
|
||||
[B<-mac_name> I<macname>]
|
||||
[B<-macopt> I<nm>:I<v>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This utility is used to generate a FIPS module configuration file.
|
||||
This command is used to generate a FIPS module configuration file.
|
||||
The generated configuration file consists of:
|
||||
|
||||
=over 4
|
||||
@@ -45,15 +43,15 @@ verifies the modules MAC, but only needs to run the KATS once during install.
|
||||
|
||||
Print a usage message.
|
||||
|
||||
=item B<-module filename>
|
||||
=item B<-module> I<filename>
|
||||
|
||||
Filename of a fips module to perform an integrity check on.
|
||||
|
||||
=item B<-out configfilename>
|
||||
=item B<-out> I<configfilename>
|
||||
|
||||
Filename to output the configuration data to, or standard output by default.
|
||||
|
||||
=item B<-in configfilename>
|
||||
=item B<-in> I<configfilename>
|
||||
|
||||
Input filename to load configuration data from. Used with the '-verify' option.
|
||||
Standard input is used if the filename is '-'.
|
||||
@@ -62,21 +60,21 @@ Standard input is used if the filename is '-'.
|
||||
|
||||
Verify that the input configuration file contains the correct information
|
||||
|
||||
=item B<-provider_name providername>
|
||||
=item B<-provider_name> I<providername>
|
||||
|
||||
Name of the provider inside the configuration file.
|
||||
|
||||
=item B<-section_name sectionname>
|
||||
=item B<-section_name> I<sectionname>
|
||||
|
||||
Name of the section inside the configuration file.
|
||||
|
||||
=item B<-mac_name name>
|
||||
=item B<-mac_name> I<name>
|
||||
|
||||
Specifies the name of a supported MAC algorithm which will be used.
|
||||
To see the list of supported MAC's use the command I<list -mac-algorithms>.
|
||||
The default is "HMAC".
|
||||
To see the list of supported MAC's use the command
|
||||
C<openssl list -mac-algorithms>. The default is B<HMAC>.
|
||||
|
||||
=item B<-macopt nm:v>
|
||||
=item B<-macopt> I<nm>:I<v>
|
||||
|
||||
Passes options to the MAC algorithm.
|
||||
A comprehensive list of controls can be found in the EVP_MAC implementation
|
||||
@@ -85,25 +83,26 @@ Common control strings used for fipsinstall are:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<key:string>
|
||||
=item B<key>:I<string>
|
||||
|
||||
Specifies the MAC key as an alphanumeric string (use if the key contains
|
||||
printable characters only).
|
||||
The string length must conform to any restrictions of the MAC algorithm.
|
||||
A key must be specified for every MAC algorithm.
|
||||
|
||||
=item B<hexkey:string>
|
||||
=item B<hexkey>:I<string>
|
||||
|
||||
Specifies the MAC key in hexadecimal form (two hex digits per byte).
|
||||
The key length must conform to any restrictions of the MAC algorithm.
|
||||
A key must be specified for every MAC algorithm.
|
||||
|
||||
=item B<digest:string>
|
||||
=item B<digest>:I<string>
|
||||
|
||||
Used by HMAC as an alphanumeric string (use if the key contains printable
|
||||
characters only).
|
||||
The string length must conform to any restrictions of the MAC algorithm.
|
||||
To see the list of supported digests, use the command I<list -digest-commands>.
|
||||
To see the list of supported digests, use the command
|
||||
C<openssl list -digest-commands>.
|
||||
|
||||
=back
|
||||
|
||||
@@ -111,14 +110,14 @@ To see the list of supported digests, use the command I<list -digest-commands>.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Calculate the mac of a FIPS module 'fips.so' and run a FIPS self test
|
||||
for the module, and save the fips.conf configuration file:
|
||||
Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
|
||||
for the module, and save the F<fips.conf> configuration file:
|
||||
|
||||
openssl fipsinstall -module ./fips.so -out fips.conf -provider_name fips \
|
||||
-section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
|
||||
-macopt hexkey:000102030405060708090A0B0C0D0E0F10111213
|
||||
|
||||
Verify that the configuration file 'fips.conf' contains the correct info:
|
||||
Verify that the configuration file F<fips.conf> contains the correct info:
|
||||
|
||||
openssl fipsinstall -module ./fips.so -in fips.conf -provider_name fips \
|
||||
-section_name fips_install -mac_name HMAC -macopt digest:SHA256 \
|
||||
@@ -128,7 +127,7 @@ Verify that the configuration file 'fips.conf' contains the correct info:
|
||||
|
||||
The MAC mechanisms that are available will depend on the options
|
||||
used when building OpenSSL.
|
||||
The B<list -mac-algorithms> command can be used to list them.
|
||||
The command C<openssl list -mac-algorithms> command can be used to list them.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
+18
-25
@@ -8,7 +8,7 @@ openssl-gendsa - generate a DSA private key from a set of parameters
|
||||
|
||||
B<openssl> B<gendsa>
|
||||
[B<-help>]
|
||||
[B<-out filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-aes128>]
|
||||
[B<-aes192>]
|
||||
[B<-aes256>]
|
||||
@@ -21,16 +21,18 @@ B<openssl> B<gendsa>
|
||||
[B<-des>]
|
||||
[B<-des3>]
|
||||
[B<-idea>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-engine id>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-verbose>]
|
||||
[B<paramfile>]
|
||||
[I<paramfile>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<gendsa> command generates a DSA private key from a DSA parameter file
|
||||
(which will be typically generated by the B<openssl dsaparam> command).
|
||||
This command generates a DSA private key from a DSA parameter file
|
||||
(which will be typically generated by the L<openssl-dsaparam(1)> command).
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -40,7 +42,7 @@ The B<gendsa> command generates a DSA private key from a DSA parameter file
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Output the key to the specified file. If this argument is not specified then
|
||||
standard output is used.
|
||||
@@ -51,22 +53,13 @@ These options encrypt the private key with specified
|
||||
cipher before outputting it. A pass phrase is prompted for.
|
||||
If none of these options is specified no encryption is used.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-engine id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<gendsa>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -75,11 +68,11 @@ for all available algorithms.
|
||||
|
||||
Print extra details about the operations being performed.
|
||||
|
||||
=item B<paramfile>
|
||||
=item I<paramfile>
|
||||
|
||||
This option specifies the DSA parameter file to use. The parameters in this
|
||||
file determine the size of the private key. DSA parameters can be generated
|
||||
and examined using the B<openssl dsaparam> command.
|
||||
The DSA parameter file to use. The parameters in this file determine
|
||||
the size of the private key. DSA parameters can be generated and
|
||||
examined using the L<openssl-dsaparam(1)> command.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
@@ -8,20 +8,22 @@ openssl-genpkey - generate a private key
|
||||
|
||||
B<openssl> B<genpkey>
|
||||
[B<-help>]
|
||||
[B<-out filename>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-pass arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-pass> I<arg>]
|
||||
[B<-I<cipher>>]
|
||||
[B<-engine id>]
|
||||
[B<-paramfile file>]
|
||||
[B<-algorithm alg>]
|
||||
[B<-pkeyopt opt:value>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-paramfile> I<file>]
|
||||
[B<-algorithm> I<alg>]
|
||||
[B<-pkeyopt> I<opt>:I<value>]
|
||||
[B<-genparam>]
|
||||
[B<-text>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<genpkey> command generates a private key.
|
||||
This command generates a private key.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -31,34 +33,34 @@ The B<genpkey> command generates a private key.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Output the key to the specified file. If this argument is not specified then
|
||||
standard output is used.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format DER or PEM. The default format is PEM.
|
||||
|
||||
=item B<-pass arg>
|
||||
=item B<-pass> I<arg>
|
||||
|
||||
The output file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The output file password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-I<cipher>>
|
||||
|
||||
This option encrypts the private key with the supplied cipher. Any algorithm
|
||||
name accepted by EVP_get_cipherbyname() is acceptable such as B<des3>.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<genpkey>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms. If used this option should precede all other
|
||||
options.
|
||||
|
||||
=item B<-algorithm alg>
|
||||
=item B<-algorithm> I<alg>
|
||||
|
||||
Public key algorithm to use such as RSA, DSA or DH. If used this option must
|
||||
precede any B<-pkeyopt> options. The options B<-paramfile> and B<-algorithm>
|
||||
@@ -74,22 +76,22 @@ option) are DH, DSA and EC.
|
||||
Note that the algorithm name X9.42 DH may be used as a synonym for the DH
|
||||
algorithm. These are identical and do not indicate the type of parameters that
|
||||
will be generated. Use the B<dh_paramgen_type> option to indicate whether PKCS#3
|
||||
or X9.42 DH parameters are required. See L<DH Parameter Generation Options>
|
||||
or X9.42 DH parameters are required. See L</DH Parameter Generation Options>
|
||||
below for more details.
|
||||
|
||||
=item B<-pkeyopt opt:value>
|
||||
=item B<-pkeyopt> I<opt>:I<value>
|
||||
|
||||
Set the public key algorithm option B<opt> to B<value>. The precise set of
|
||||
Set the public key algorithm option I<opt> to I<value>. The precise set of
|
||||
options supported depends on the public key algorithm used and its
|
||||
implementation. See L<KEY GENERATION OPTIONS> and
|
||||
L<PARAMETER GENERATION OPTIONS> below for more details.
|
||||
implementation. See L</KEY GENERATION OPTIONS> and
|
||||
L</PARAMETER GENERATION OPTIONS> below for more details.
|
||||
|
||||
=item B<-genparam>
|
||||
|
||||
Generate a set of parameters instead of a private key. If used this option must
|
||||
precede any B<-algorithm>, B<-paramfile> or B<-pkeyopt> options.
|
||||
|
||||
=item B<-paramfile filename>
|
||||
=item B<-paramfile> I<filename>
|
||||
|
||||
Some public key algorithms generate a private key based on a set of parameters.
|
||||
They can be supplied using this option. If this option is used the public key
|
||||
@@ -126,7 +128,7 @@ The number of primes in the generated key. If not specified 2 is used.
|
||||
=item B<rsa_keygen_pubexp:value>
|
||||
|
||||
The RSA public exponent value. This can be a large decimal or
|
||||
hexadecimal value if preceded by B<0x>. Default value is 65537.
|
||||
hexadecimal value if preceded by C<0x>. Default value is 65537.
|
||||
|
||||
=back
|
||||
|
||||
@@ -136,22 +138,23 @@ Note: by default an B<RSA-PSS> key has no parameter restrictions.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<rsa_keygen_bits:numbits>, B<rsa_keygen_primes:numprimes>, B<rsa_keygen_pubexp:value>
|
||||
=item B<rsa_keygen_bits>:I<numbits>, B<rsa_keygen_primes>:I<numprimes>,
|
||||
B<rsa_keygen_pubexp>:I<value>
|
||||
|
||||
These options have the same meaning as the B<RSA> algorithm.
|
||||
|
||||
=item B<rsa_pss_keygen_md:digest>
|
||||
=item B<rsa_pss_keygen_md>:I<digest>
|
||||
|
||||
If set the key is restricted and can only use B<digest> for signing.
|
||||
If set the key is restricted and can only use I<digest> for signing.
|
||||
|
||||
=item B<rsa_pss_keygen_mgf1_md:digest>
|
||||
=item B<rsa_pss_keygen_mgf1_md>:I<digest>
|
||||
|
||||
If set the key is restricted and can only use B<digest> as it's MGF1
|
||||
If set the key is restricted and can only use I<digest> as it's MGF1
|
||||
parameter.
|
||||
|
||||
=item B<rsa_pss_keygen_saltlen:len>
|
||||
=item B<rsa_pss_keygen_saltlen>:I<len>
|
||||
|
||||
If set the key is restricted and B<len> specifies the minimum salt length.
|
||||
If set the key is restricted and I<len> specifies the minimum salt length.
|
||||
|
||||
=back
|
||||
|
||||
@@ -161,14 +164,14 @@ The EC key generation options can also be used for parameter generation.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<ec_paramgen_curve:curve>
|
||||
=item B<ec_paramgen_curve>:I<curve>
|
||||
|
||||
The EC curve to use. OpenSSL supports NIST curve names such as "P-256".
|
||||
|
||||
=item B<ec_param_enc:encoding>
|
||||
=item B<ec_param_enc>:I<encoding>
|
||||
|
||||
The encoding to use for parameters. The "encoding" parameter must be either
|
||||
"named_curve" or "explicit". The default value is "named_curve".
|
||||
The encoding to use for parameters. The I<encoding> parameter must be either
|
||||
B<named_curve> or B<explicit>. The default value is B<named_curve>.
|
||||
|
||||
=back
|
||||
|
||||
@@ -182,16 +185,16 @@ below.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<dsa_paramgen_bits:numbits>
|
||||
=item B<dsa_paramgen_bits>:I<numbits>
|
||||
|
||||
The number of bits in the generated prime. If not specified 2048 is used.
|
||||
|
||||
=item B<dsa_paramgen_q_bits:numbits>
|
||||
=item B<dsa_paramgen_q_bits>:I<numbits>
|
||||
|
||||
The number of bits in the q parameter. Must be one of 160, 224 or 256. If not
|
||||
specified 224 is used.
|
||||
|
||||
=item B<dsa_paramgen_md:digest>
|
||||
=item B<dsa_paramgen_md>:I<digest>
|
||||
|
||||
The digest to use during parameter generation. Must be one of B<sha1>, B<sha224>
|
||||
or B<sha256>. If set, then the number of bits in B<q> will match the output size
|
||||
@@ -206,30 +209,30 @@ or B<sha256> if it is 256.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<dh_paramgen_prime_len:numbits>
|
||||
=item B<dh_paramgen_prime_len>:I<numbits>
|
||||
|
||||
The number of bits in the prime parameter B<p>. The default is 2048.
|
||||
The number of bits in the prime parameter I<p>. The default is 2048.
|
||||
|
||||
=item B<dh_paramgen_subprime_len:numbits>
|
||||
=item B<dh_paramgen_subprime_len>:I<numbits>
|
||||
|
||||
The number of bits in the sub prime parameter B<q>. The default is 256 if the
|
||||
The number of bits in the sub prime parameter I<q>. The default is 256 if the
|
||||
prime is at least 2048 bits long or 160 otherwise. Only relevant if used in
|
||||
conjunction with the B<dh_paramgen_type> option to generate X9.42 DH parameters.
|
||||
|
||||
=item B<dh_paramgen_generator:value>
|
||||
=item B<dh_paramgen_generator>:I<value>
|
||||
|
||||
The value to use for the generator B<g>. The default is 2.
|
||||
The value to use for the generator I<g>. The default is 2.
|
||||
|
||||
=item B<dh_paramgen_type:value>
|
||||
=item B<dh_paramgen_type>:I<value>
|
||||
|
||||
The type of DH parameters to generate. Use 0 for PKCS#3 DH and 1 for X9.42 DH.
|
||||
The default is 0.
|
||||
|
||||
=item B<dh_rfc5114:num>
|
||||
=item B<dh_rfc5114>:I<num>
|
||||
|
||||
If this option is set, then the appropriate RFC5114 parameters are used
|
||||
instead of generating new parameters. The value B<num> can take the
|
||||
values 1, 2 or 3 corresponding to RFC5114 DH parameters consisting of
|
||||
instead of generating new parameters. The value I<num> can be one of
|
||||
1, 2 or 3 corresponding to RFC5114 DH parameters consisting of
|
||||
1024 bit group with 160 bit subgroup, 2048 bit group with 224 bit subgroup
|
||||
and 2048 bit group with 256 bit subgroup as mentioned in RFC5114 sections
|
||||
2.1, 2.2 and 2.3 respectively. If present this overrides all other DH parameter
|
||||
@@ -240,7 +243,7 @@ options.
|
||||
=head2 EC Parameter Generation Options
|
||||
|
||||
The EC parameter generation options are the same as for key generation. See
|
||||
L<EC Key Generation Options> above.
|
||||
L</EC Key Generation Options> above.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
|
||||
+21
-29
@@ -8,8 +8,8 @@ openssl-genrsa - generate an RSA private key
|
||||
|
||||
B<openssl> B<genrsa>
|
||||
[B<-help>]
|
||||
[B<-out filename>]
|
||||
[B<-passout arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-aes128>]
|
||||
[B<-aes192>]
|
||||
[B<-aes256>]
|
||||
@@ -22,18 +22,19 @@ B<openssl> B<genrsa>
|
||||
[B<-des>]
|
||||
[B<-des3>]
|
||||
[B<-idea>]
|
||||
[B<-f4>]
|
||||
[B<-3>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-engine id>]
|
||||
[B<-primes num>]
|
||||
[B<-f4>|B<-3>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-primes> I<num>]
|
||||
[B<-verbose>]
|
||||
[B<numbits>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<genrsa> command generates an RSA private key.
|
||||
This command generates an RSA private key.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -43,15 +44,15 @@ The B<genrsa> command generates an RSA private key.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Output the key to the specified file. If this argument is not specified then
|
||||
standard output is used.
|
||||
|
||||
=item B<-passout arg>
|
||||
=item B<-passout> I<arg>
|
||||
|
||||
The output file password source. For more information about the format
|
||||
of B<arg> see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-aes128>, B<-aes192>, B<-aes256>, B<-aria128>, B<-aria192>, B<-aria256>, B<-camellia128>, B<-camellia192>, B<-camellia256>, B<-des>, B<-des3>, B<-idea>
|
||||
|
||||
@@ -60,35 +61,26 @@ cipher before outputting it. If none of these options is
|
||||
specified no encryption is used. If encryption is used a pass phrase is prompted
|
||||
for if it is not supplied via the B<-passout> argument.
|
||||
|
||||
=item B<-F4|-3>
|
||||
=item B<-F4>|B<-3>
|
||||
|
||||
The public exponent to use, either 65537 or 3. The default is 65537.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-engine id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<genrsa>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
=item B<-primes num>
|
||||
=item B<-primes> I<num>
|
||||
|
||||
Specify the number of primes to use while generating the RSA key. The B<num>
|
||||
Specify the number of primes to use while generating the RSA key. The I<num>
|
||||
parameter must be a positive integer that is greater than 1 and less than 16.
|
||||
If B<num> is greater than 2, then the generated key is called a 'multi-prime'
|
||||
If I<num> is greater than 2, then the generated key is called a 'multi-prime'
|
||||
RSA key, which is defined in RFC 8017.
|
||||
|
||||
=item B<-verbose>
|
||||
|
||||
@@ -12,7 +12,7 @@ B<openssl info>
|
||||
[B<-enginesdir>]
|
||||
[B<-modulesdir> ]
|
||||
[B<-dsoext>]
|
||||
[B<-dirfilesep>]
|
||||
[B<-dirnamesep>]
|
||||
[B<-listsep>]
|
||||
[B<-seeds>]
|
||||
[B<-cpusettings>]
|
||||
@@ -54,7 +54,7 @@ Outputs the DSO extension OpenSSL uses.
|
||||
=item B<-dirnamesep>
|
||||
|
||||
Outputs the separator character between a directory specification and
|
||||
a file name.
|
||||
a filename.
|
||||
Note that on some operating systems, this is not the same as the
|
||||
separator between directory elements.
|
||||
|
||||
@@ -76,7 +76,7 @@ Outputs the OpenSSL CPU settings info.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The B<openssl info> command was added in OpenSSL 3.0.
|
||||
This command was added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ openssl-kdf - perform Key Derivation Function operations
|
||||
|
||||
B<openssl kdf>
|
||||
[B<-help>]
|
||||
[B<-kdfopt> I<nm:v>]
|
||||
[B<-kdfopt> I<nm>:I<v>]
|
||||
[B<-keylen> I<num>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-binary>]
|
||||
@@ -39,7 +39,7 @@ Filename to output to, or standard output by default.
|
||||
|
||||
Output the derived key in binary form. Uses hexadecimal text format if not specified.
|
||||
|
||||
=item B<-kdfopt> I<nm:v>
|
||||
=item B<-kdfopt> I<nm>:I<v>
|
||||
|
||||
Passes options to the KDF algorithm.
|
||||
A comprehensive list of parameters can be found in the EVP_KDF_CTX
|
||||
|
||||
+34
-27
@@ -52,39 +52,19 @@ Display a list of standard commands.
|
||||
=item B<-digest-commands>
|
||||
|
||||
Display a list of message digest commands, which are typically used
|
||||
as input to the L<dgst(1)> or L<speed(1)> commands.
|
||||
|
||||
=item B<-digest-algorithms>
|
||||
|
||||
Display a list of message digest algorithms.
|
||||
If a line is of the form C<foo =E<gt> bar> then B<foo> is an alias for the
|
||||
official algorithm name, B<bar>.
|
||||
If a line is of the form C<foo @ bar>, then B<foo> is provided by the provider
|
||||
B<bar>.
|
||||
|
||||
In verbose mode, the algorithms provided by a provider will get additional
|
||||
information on what parameters each implementation supports.
|
||||
|
||||
=item B<-kdf-algorithms>
|
||||
|
||||
Display a list of key derivation function algorithms.
|
||||
|
||||
=item B<-mac-algorithms>
|
||||
|
||||
Display a list of message authentication code algorithms.
|
||||
as input to the L<openssl-dgst(1)> or L<openssl-speed(1)> commands.
|
||||
|
||||
=item B<-cipher-commands>
|
||||
|
||||
Display a list of cipher commands, which are typically used as input
|
||||
to the L<dgst(1)> or L<speed(1)> commands.
|
||||
to the L<openssl-dgst(1)> or L<openssl-speed(1)> commands.
|
||||
|
||||
=item B<-cipher-algorithms>
|
||||
=item B<-digest-algorithms>, B<-kdf-algorithms>, B<-mac-algorithms>,
|
||||
B<-cipher-algorithms>
|
||||
|
||||
Display a list of cipher algorithms.
|
||||
If a line is of the form C<foo =E<gt> bar> then B<foo> is an alias for the
|
||||
official algorithm name, B<bar>.
|
||||
If a line is of the form C<foo @ bar>, then B<foo> is provided by the provider
|
||||
B<bar>.
|
||||
Display a list of cipher, digest, kdf and mac algorithms.
|
||||
See L</Display of algorithm names> for a description of how names are
|
||||
displayed.
|
||||
|
||||
In verbose mode, the algorithms provided by a provider will get additional
|
||||
information on what parameters each implementation supports.
|
||||
@@ -114,6 +94,33 @@ format described in L<config(5)/ASN1 Object Configuration Module>.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Display of algorithm names
|
||||
|
||||
Algorithm names may be displayed in one of two manners:
|
||||
|
||||
=over 4
|
||||
|
||||
=item Legacy implementations
|
||||
|
||||
Legacy implementations will simply display the main name of the
|
||||
algorithm on a line of its own, or in the form C<<foo > bar>> to show
|
||||
that C<foo> is an alias for the main name, C<bar>
|
||||
|
||||
=item Provided implementations
|
||||
|
||||
Implementations from a provider are displayed like this if the
|
||||
implementation is labeled with a single name:
|
||||
|
||||
foo @ bar
|
||||
|
||||
or like this if it's labeled with multiple names:
|
||||
|
||||
{ foo1, foo2 } @bar
|
||||
|
||||
In both cases, C<bar> is the name of the provider.
|
||||
|
||||
=back
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
+19
-20
@@ -9,12 +9,10 @@ openssl-mac - perform Message Authentication Code operations
|
||||
B<openssl mac>
|
||||
[B<-help>]
|
||||
[B<-macopt>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-binary>]
|
||||
B<mac_name>
|
||||
|
||||
B<openssl> I<mac> [B<...>] B<mac_name>
|
||||
I<mac_name>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -29,14 +27,14 @@ file.
|
||||
|
||||
Print a usage message.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
Input filename to calculate a MAC for, or standard input by default.
|
||||
Standard input is used if the filename is '-'.
|
||||
Files are expected to be in binary format, standard input uses hexadecimal text
|
||||
format.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Filename to output to, or standard output by default.
|
||||
|
||||
@@ -44,7 +42,7 @@ Filename to output to, or standard output by default.
|
||||
|
||||
Output the MAC in binary form. Uses hexadecimal text format if not specified.
|
||||
|
||||
=item B<-macopt nm:v>
|
||||
=item B<-macopt> I<nm>:I<v>
|
||||
|
||||
Passes options to the MAC algorithm.
|
||||
A comprehensive list of controls can be found in the EVP_MAC implementation
|
||||
@@ -53,58 +51,59 @@ Common parameter names used by EVP_MAC_CTX_get_params() are:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<key:string>
|
||||
=item B<key:>I<string>
|
||||
|
||||
Specifies the MAC key as an alphanumeric string (use if the key contains
|
||||
printable characters only).
|
||||
The string length must conform to any restrictions of the MAC algorithm.
|
||||
A key must be specified for every MAC algorithm.
|
||||
|
||||
=item B<hexkey:string>
|
||||
=item B<hexkey:>I<string>
|
||||
|
||||
Specifies the MAC key in hexadecimal form (two hex digits per byte).
|
||||
The key length must conform to any restrictions of the MAC algorithm.
|
||||
A key must be specified for every MAC algorithm.
|
||||
|
||||
=item B<digest:string>
|
||||
=item B<digest:>I<string>
|
||||
|
||||
Used by HMAC as an alphanumeric string (use if the key contains printable
|
||||
characters only).
|
||||
The string length must conform to any restrictions of the MAC algorithm.
|
||||
To see the list of supported digests, use the command I<list -digest-commands>.
|
||||
To see the list of supported digests, use C<openssl list -digest-commands>.
|
||||
|
||||
=item B<cipher:string>
|
||||
=item B<cipher:>I<string>
|
||||
|
||||
Used by CMAC and GMAC to specify the cipher algorithm.
|
||||
For CMAC it must be one of AES-128-CBC, AES-192-CBC, AES-256-CBC or
|
||||
DES-EDE3-CBC.
|
||||
For GMAC it should be a GCM mode cipher e.g. AES-128-GCM.
|
||||
|
||||
=item B<iv:string>
|
||||
=item B<iv:>I<string>
|
||||
|
||||
Used by GMAC to specify an IV as an alphanumeric string (use if the IV contains
|
||||
printable characters only).
|
||||
|
||||
=item B<hexiv:string>
|
||||
=item B<hexiv:>I<string>
|
||||
|
||||
Used by GMAC to specify an IV in hexadecimal form (two hex digits per byte).
|
||||
|
||||
=item B<outlen:int>
|
||||
=item B<outlen:>I<int>
|
||||
|
||||
Used by KMAC128 or KMAC256 to specify an output length.
|
||||
The default sizes are 32 or 64 bytes respectively.
|
||||
|
||||
=item B<custom:string>
|
||||
=item B<custom:>I<string>
|
||||
|
||||
Used by KMAC128 or KMAC256 to specify a customization string.
|
||||
The default is the empty string "".
|
||||
|
||||
=back
|
||||
|
||||
=item B<mac_name>
|
||||
=item I<mac_name>
|
||||
|
||||
Specifies the name of a supported MAC algorithm which will be used.
|
||||
To see the list of supported MAC's use the command I<list -mac-algorithms>.
|
||||
To see the list of supported MAC's use the command C<opensssl list
|
||||
-mac-algorithms>.
|
||||
|
||||
=back
|
||||
|
||||
@@ -138,7 +137,7 @@ To create a hex-encoded GMAC-AES-128-GCM with a IV from a file: \
|
||||
|
||||
The MAC mechanisms that are available will depend on the options
|
||||
used when building OpenSSL.
|
||||
The B<list -mac-algorithms> command can be used to list them.
|
||||
Use C<openssl list -mac-algorithms> to list them.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ openssl-nseq - create or examine a Netscape certificate sequence
|
||||
|
||||
B<openssl> B<nseq>
|
||||
[B<-help>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-toseq>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<nseq> command takes a file containing a Netscape certificate
|
||||
This command takes a file containing a Netscape certificate
|
||||
sequence and prints out the certificates contained in it or takes a
|
||||
file of certificates and converts it into a Netscape certificate
|
||||
sequence.
|
||||
@@ -27,12 +27,12 @@ sequence.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read or standard input if this
|
||||
option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename or standard output by default.
|
||||
|
||||
|
||||
+109
-115
@@ -8,33 +8,33 @@ openssl-ocsp - Online Certificate Status Protocol utility
|
||||
|
||||
B<openssl> B<ocsp>
|
||||
[B<-help>]
|
||||
[B<-out file>]
|
||||
[B<-issuer file>]
|
||||
[B<-cert file>]
|
||||
[B<-serial n>]
|
||||
[B<-signer file>]
|
||||
[B<-signkey file>]
|
||||
[B<-sign_other file>]
|
||||
[B<-out> I<file>]
|
||||
[B<-issuer> I<file>]
|
||||
[B<-cert> I<file>]
|
||||
[B<-serial> I<n>]
|
||||
[B<-signer> I<file>]
|
||||
[B<-signkey> I<file>]
|
||||
[B<-sign_other> I<file>]
|
||||
[B<-no_certs>]
|
||||
[B<-req_text>]
|
||||
[B<-resp_text>]
|
||||
[B<-text>]
|
||||
[B<-reqout file>]
|
||||
[B<-respout file>]
|
||||
[B<-reqin file>]
|
||||
[B<-respin file>]
|
||||
[B<-reqout> I<file>]
|
||||
[B<-respout> I<file>]
|
||||
[B<-reqin> I<file>]
|
||||
[B<-respin> I<file>]
|
||||
[B<-nonce>]
|
||||
[B<-no_nonce>]
|
||||
[B<-url URL>]
|
||||
[B<-host host:port>]
|
||||
[B<-multi process-count>]
|
||||
[B<-url> I<URL>]
|
||||
[B<-host> I<host>:I<port>]
|
||||
[B<-multi> I<process-count>]
|
||||
[B<-header>]
|
||||
[B<-path>]
|
||||
[B<-CApath dir>]
|
||||
[B<-CAfile file>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-attime timestamp>]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
@@ -45,28 +45,28 @@ B<openssl> B<ocsp>
|
||||
[B<-inhibit_map>]
|
||||
[B<-no_check_time>]
|
||||
[B<-partial_chain>]
|
||||
[B<-policy arg>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-policy_check>]
|
||||
[B<-policy_print>]
|
||||
[B<-purpose purpose>]
|
||||
[B<-purpose> I<purpose>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-trusted_first>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-use_deltas>]
|
||||
[B<-auth_level num>]
|
||||
[B<-verify_depth num>]
|
||||
[B<-verify_email email>]
|
||||
[B<-verify_hostname hostname>]
|
||||
[B<-verify_ip ip>]
|
||||
[B<-verify_name name>]
|
||||
[B<-auth_level> I<num>]
|
||||
[B<-verify_depth> I<num>]
|
||||
[B<-verify_email> I<email>]
|
||||
[B<-verify_hostname> I<hostname>]
|
||||
[B<-verify_ip> I<ip>]
|
||||
[B<-verify_name> I<name>]
|
||||
[B<-x509_strict>]
|
||||
[B<-VAfile file>]
|
||||
[B<-validity_period n>]
|
||||
[B<-status_age n>]
|
||||
[B<-VAfile> I<file>]
|
||||
[B<-validity_period> I<n>]
|
||||
[B<-status_age> I<n>]
|
||||
[B<-noverify>]
|
||||
[B<-verify_other file>]
|
||||
[B<-verify_other> I<file>]
|
||||
[B<-trust_other>]
|
||||
[B<-no_intern>]
|
||||
[B<-no_signature_verify>]
|
||||
@@ -74,28 +74,30 @@ B<openssl> B<ocsp>
|
||||
[B<-no_chain>]
|
||||
[B<-no_cert_checks>]
|
||||
[B<-no_explicit>]
|
||||
[B<-port num>]
|
||||
[B<-port> I<num>]
|
||||
[B<-ignore_err>]
|
||||
[B<-index file>]
|
||||
[B<-CA file>]
|
||||
[B<-rsigner file>]
|
||||
[B<-rkey file>]
|
||||
[B<-rother file>]
|
||||
[B<-rsigopt nm:v>]
|
||||
[B<-index> I<file>]
|
||||
[B<-CA> I<file>]
|
||||
[B<-rsigner> I<file>]
|
||||
[B<-rkey> I<file>]
|
||||
[B<-rother> I<file>]
|
||||
[B<-rsigopt> I<nm>:I<v>]
|
||||
[B<-resp_no_certs>]
|
||||
[B<-nmin n>]
|
||||
[B<-ndays n>]
|
||||
[B<-nmin> I<n>]
|
||||
[B<-ndays> I<n>]
|
||||
[B<-resp_key_id>]
|
||||
[B<-nrequest n>]
|
||||
[B<-rcid I<digest>>]
|
||||
[B<-nrequest> I<n>]
|
||||
[B<-rcid> I<digest>]
|
||||
[B<-I<digest>>]
|
||||
|
||||
=for openssl ifdef multi
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The Online Certificate Status Protocol (OCSP) enables applications to
|
||||
determine the (revocation) state of an identified certificate (RFC 2560).
|
||||
|
||||
The B<ocsp> command performs many common OCSP tasks. It can be used
|
||||
This command performs many common OCSP tasks. It can be used
|
||||
to print out requests and responses, create requests and send queries
|
||||
to an OCSP responder and behave like a mini OCSP server itself.
|
||||
|
||||
@@ -112,81 +114,81 @@ The options are described below, divided into those two modes.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
specify output filename, default is standard output.
|
||||
|
||||
=item B<-issuer filename>
|
||||
=item B<-issuer> I<filename>
|
||||
|
||||
This specifies the current issuer certificate. This option can be used
|
||||
multiple times. The certificate specified in B<filename> must be in
|
||||
multiple times. The certificate specified in I<filename> must be in
|
||||
PEM format. This option B<MUST> come before any B<-cert> options.
|
||||
|
||||
=item B<-cert filename>
|
||||
=item B<-cert> I<filename>
|
||||
|
||||
Add the certificate B<filename> to the request. The issuer certificate
|
||||
is taken from the previous B<issuer> option, or an error occurs if no
|
||||
Add the certificate I<filename> to the request. The issuer certificate
|
||||
is taken from the previous B<-issuer> option, or an error occurs if no
|
||||
issuer certificate is specified.
|
||||
|
||||
=item B<-serial num>
|
||||
=item B<-serial> I<num>
|
||||
|
||||
Same as the B<cert> option except the certificate with serial number
|
||||
Same as the B<-cert> option except the certificate with serial number
|
||||
B<num> is added to the request. The serial number is interpreted as a
|
||||
decimal integer unless preceded by B<0x>. Negative integers can also
|
||||
be specified by preceding the value by a B<-> sign.
|
||||
decimal integer unless preceded by C<0x>. Negative integers can also
|
||||
be specified by preceding the value by a C<-> sign.
|
||||
|
||||
=item B<-signer filename>, B<-signkey filename>
|
||||
=item B<-signer> I<filename>, B<-signkey> I<filename>
|
||||
|
||||
Sign the OCSP request using the certificate specified in the B<signer>
|
||||
option and the private key specified by the B<signkey> option. If
|
||||
the B<signkey> option is not present then the private key is read
|
||||
Sign the OCSP request using the certificate specified in the B<-signer>
|
||||
option and the private key specified by the B<-signkey> option. If
|
||||
the B<-signkey> option is not present then the private key is read
|
||||
from the same file as the certificate. If neither option is specified then
|
||||
the OCSP request is not signed.
|
||||
|
||||
=item B<-sign_other filename>
|
||||
=item B<-sign_other> I<filename>
|
||||
|
||||
Additional certificates to include in the signed request.
|
||||
|
||||
=item B<-nonce>, B<-no_nonce>
|
||||
|
||||
Add an OCSP nonce extension to a request or disable OCSP nonce addition.
|
||||
Normally if an OCSP request is input using the B<reqin> option no
|
||||
nonce is added: using the B<nonce> option will force addition of a nonce.
|
||||
If an OCSP request is being created (using B<cert> and B<serial> options)
|
||||
a nonce is automatically added specifying B<no_nonce> overrides this.
|
||||
Normally if an OCSP request is input using the B<-reqin> option no
|
||||
nonce is added: using the B<-nonce> option will force addition of a nonce.
|
||||
If an OCSP request is being created (using B<-cert> and B<-serial> options)
|
||||
a nonce is automatically added specifying B<-no_nonce> overrides this.
|
||||
|
||||
=item B<-req_text>, B<-resp_text>, B<-text>
|
||||
|
||||
Print out the text form of the OCSP request, response or both respectively.
|
||||
|
||||
=item B<-reqout file>, B<-respout file>
|
||||
=item B<-reqout> I<file>, B<-respout> I<file>
|
||||
|
||||
Write out the DER encoded certificate request or response to B<file>.
|
||||
Write out the DER encoded certificate request or response to I<file>.
|
||||
|
||||
=item B<-reqin file>, B<-respin file>
|
||||
=item B<-reqin> I<file>, B<-respin> I<file>
|
||||
|
||||
Read OCSP request or response file from B<file>. These option are ignored
|
||||
Read OCSP request or response file from I<file>. These option are ignored
|
||||
if OCSP request or response creation is implied by other options (for example
|
||||
with B<serial>, B<cert> and B<host> options).
|
||||
with B<-serial>, B<-cert> and B<-host> options).
|
||||
|
||||
=item B<-url responder_url>
|
||||
=item B<-url> I<responder_url>
|
||||
|
||||
Specify the responder URL. Both HTTP and HTTPS (SSL/TLS) URLs can be specified.
|
||||
|
||||
=item B<-host hostname:port>, B<-path pathname>
|
||||
=item B<-host> I<hostname>:I<port>, B<-path> I<pathname>
|
||||
|
||||
If the B<host> option is present then the OCSP request is sent to the host
|
||||
B<hostname> on port B<port>. B<path> specifies the HTTP path name to use
|
||||
or "/" by default. This is equivalent to specifying B<-url> with scheme
|
||||
If the B<-host> option is present then the OCSP request is sent to the host
|
||||
I<hostname> on port I<port>. The B<-path> option specifies the HTTP pathname
|
||||
to use or "/" by default. This is equivalent to specifying B<-url> with scheme
|
||||
http:// and the given hostname, port, and pathname.
|
||||
|
||||
=item B<-header name=value>
|
||||
=item B<-header> I<name>=I<value>
|
||||
|
||||
Adds the header B<name> with the specified B<value> to the OCSP request
|
||||
Adds the header I<name> with the specified I<value> to the OCSP request
|
||||
that is sent to the responder.
|
||||
This may be repeated.
|
||||
|
||||
=item B<-timeout seconds>
|
||||
=item B<-timeout> I<seconds>
|
||||
|
||||
Connection timeout to the OCSP responder in seconds.
|
||||
On POSIX systems, when running as an OCSP responder, this option also limits
|
||||
@@ -194,7 +196,7 @@ the time that the responder is willing to wait for the client request.
|
||||
This time is measured from the time the responder accepts the connection until
|
||||
the complete request is received.
|
||||
|
||||
=item B<-multi process-count>
|
||||
=item B<-multi> I<process-count>
|
||||
|
||||
Run the specified number of OCSP responder child processes, with the parent
|
||||
process respawning child processes as needed.
|
||||
@@ -205,18 +207,9 @@ each child is willing to wait for the client's OCSP response.
|
||||
This option is available on POSIX systems (that support the fork() and other
|
||||
required unix system-calls).
|
||||
|
||||
=item B<-CAfile file>, B<-CApath pathname>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
File or pathname containing trusted CA certificates. These are used to verify
|
||||
the signature on the OCSP response.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-attime>, B<-check_ss_sig>, B<-crl_check>, B<-crl_check_all>,
|
||||
B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>, B<-inhibit_any>,
|
||||
@@ -227,9 +220,9 @@ B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,
|
||||
B<-verify_ip>, B<-verify_name>, B<-x509_strict>
|
||||
|
||||
Set different certificate verification options.
|
||||
See L<verify(1)> manual page for details.
|
||||
See L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=item B<-verify_other file>
|
||||
=item B<-verify_other> I<file>
|
||||
|
||||
File containing additional certificates to search when attempting to locate
|
||||
the OCSP response signing certificate. Some responders omit the actual signer's
|
||||
@@ -243,7 +236,7 @@ trusted and no additional checks will be performed on them. This is useful
|
||||
when the complete responder certificate chain is not available or trusting a
|
||||
root CA is not appropriate.
|
||||
|
||||
=item B<-VAfile file>
|
||||
=item B<-VAfile> I<file>
|
||||
|
||||
File containing explicitly trusted responder certificates. Equivalent to the
|
||||
B<-verify_other> and B<-trust_other> options.
|
||||
@@ -288,7 +281,7 @@ That is do not make any checks to see if the signers certificate is authorised
|
||||
to provide the necessary status information: as a result this option should
|
||||
only be used for testing purposes.
|
||||
|
||||
=item B<-validity_period nsec>, B<-status_age age>
|
||||
=item B<-validity_period> I<nsec>, B<-status_age> I<age>
|
||||
|
||||
These options specify the range of times, in seconds, which will be tolerated
|
||||
in an OCSP response. Each certificate status response includes a B<notBefore>
|
||||
@@ -301,13 +294,13 @@ seconds, the default value is 5 minutes.
|
||||
|
||||
If the B<notAfter> time is omitted from a response then this means that new
|
||||
status information is immediately available. In this case the age of the
|
||||
B<notBefore> field is checked to see it is not older than B<age> seconds old.
|
||||
B<notBefore> field is checked to see it is not older than I<age> seconds old.
|
||||
By default this additional check is not performed.
|
||||
|
||||
=item B<-rcid I<digest>>
|
||||
=item B<-rcid> I<digest>
|
||||
|
||||
This option sets the digest algorithm to use for certificate identification
|
||||
in the OCSP response. Any digest supported by the OpenSSL B<dgst> command can
|
||||
in the OCSP response. Any digest supported by the L<openssl-dgst(1)> command can
|
||||
be used. The default is the same digest algorithm used in the request.
|
||||
|
||||
=item B<-I<digest>>
|
||||
@@ -323,29 +316,30 @@ digest used by subsequent certificate identifiers.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-index indexfile>
|
||||
=item B<-index> I<indexfile>
|
||||
|
||||
The B<indexfile> parameter is the name of a text index file in B<ca>
|
||||
The I<indexfile> parameter is the name of a text index file in B<ca>
|
||||
format containing certificate revocation information.
|
||||
|
||||
If the B<index> option is specified the B<ocsp> utility is in responder
|
||||
mode, otherwise it is in client mode. The request(s) the responder
|
||||
processes can be either specified on the command line (using B<issuer>
|
||||
and B<serial> options), supplied in a file (using the B<reqin> option)
|
||||
or via external OCSP clients (if B<port> or B<url> is specified).
|
||||
If the B<-index> option is specified then this command switches to
|
||||
responder mode, otherwise it is in client mode. The request(s) the responder
|
||||
processes can be either specified on the command line (using B<-issuer>
|
||||
and B<-serial> options), supplied in a file (using the B<-reqin> option)
|
||||
or via external OCSP clients (if B<-port> or B<-url> is specified).
|
||||
|
||||
If the B<index> option is present then the B<CA> and B<rsigner> options
|
||||
If the B<-index> option is present then the B<-CA> and B<-rsigner> options
|
||||
must also be present.
|
||||
|
||||
=item B<-CA file>
|
||||
=item B<-CA> I<file>
|
||||
|
||||
CA certificate corresponding to the revocation information in B<indexfile>.
|
||||
CA certificate corresponding to the revocation information in the index
|
||||
file given with B<-index>.
|
||||
|
||||
=item B<-rsigner file>
|
||||
=item B<-rsigner> I<file>
|
||||
|
||||
The certificate to sign OCSP responses with.
|
||||
|
||||
=item B<-rother file>
|
||||
=item B<-rother> I<file>
|
||||
|
||||
Additional certificates to include in the OCSP response.
|
||||
|
||||
@@ -358,17 +352,17 @@ Don't include any certificates in the OCSP response.
|
||||
Identify the signer certificate using the key ID, default is to use the
|
||||
subject name.
|
||||
|
||||
=item B<-rkey file>
|
||||
=item B<-rkey> I<file>
|
||||
|
||||
The private key to sign OCSP responses with: if not present the file
|
||||
specified in the B<rsigner> option is used.
|
||||
specified in the B<-rsigner> option is used.
|
||||
|
||||
=item B<-rsigopt nm:v>
|
||||
=item B<-rsigopt> I<nm>:I<v>
|
||||
|
||||
Pass options to the signature algorithm when signing OCSP responses.
|
||||
Names and values of these options are algorithm-specific.
|
||||
|
||||
=item B<-port portnum>
|
||||
=item B<-port> I<portnum>
|
||||
|
||||
Port to listen for OCSP requests on. The port may also be specified
|
||||
using the B<url> option.
|
||||
@@ -379,11 +373,11 @@ Ignore malformed requests or responses: When acting as an OCSP client, retry if
|
||||
a malformed response is received. When acting as an OCSP responder, continue
|
||||
running instead of terminating upon receiving a malformed request.
|
||||
|
||||
=item B<-nrequest number>
|
||||
=item B<-nrequest> I<number>
|
||||
|
||||
The OCSP server will exit after receiving B<number> requests, default unlimited.
|
||||
The OCSP server will exit after receiving I<number> requests, default unlimited.
|
||||
|
||||
=item B<-nmin minutes>, B<-ndays days>
|
||||
=item B<-nmin> I<minutes>, B<-ndays> I<days>
|
||||
|
||||
Number of minutes or days when fresh revocation information is available:
|
||||
used in the B<nextUpdate> field. If neither option is present then the
|
||||
@@ -401,8 +395,8 @@ the OCSP request checked using the responder certificate's public key.
|
||||
|
||||
Then a normal certificate verify is performed on the OCSP responder certificate
|
||||
building up a certificate chain in the process. The locations of the trusted
|
||||
certificates used to build the chain can be specified by the B<CAfile>
|
||||
and B<CApath> options or they will be looked for in the standard OpenSSL
|
||||
certificates used to build the chain can be specified by the B<-CAfile>
|
||||
and B<-CApath> options or they will be looked for in the standard OpenSSL
|
||||
certificates directory.
|
||||
|
||||
If the initial verify fails then the OCSP verify process halts with an
|
||||
@@ -449,8 +443,8 @@ new requests until it has processed the current one. The text index file
|
||||
format of revocation is also inefficient for large quantities of revocation
|
||||
data.
|
||||
|
||||
It is possible to run the B<ocsp> application in responder mode via a CGI
|
||||
script using the B<reqin> and B<respout> options.
|
||||
It is possible to run this command in responder mode via a CGI
|
||||
script using the B<-reqin> and B<-respout> options.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
|
||||
+11
-17
@@ -20,18 +20,21 @@ B<openssl passwd>
|
||||
[B<-noverify>]
|
||||
[B<-quiet>]
|
||||
[B<-table>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
{I<password>}
|
||||
|
||||
=for openssl ifdef crypt
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<passwd> command computes the hash of a password typed at
|
||||
This command computes the hash of a password typed at
|
||||
run-time or the hash of each password in a list. The password list is
|
||||
taken from the named file for option B<-in file>, from stdin for
|
||||
taken from the named file for option B<-in>, from stdin for
|
||||
option B<-stdin>, or from the command line, or from the terminal otherwise.
|
||||
The Unix standard algorithm B<crypt> and the MD5-based BSD password
|
||||
algorithm B<1>, its Apache variant B<apr1>, and its AIX variant are available.
|
||||
The Unix standard algorithm B<-crypt> and the MD5-based BSD password
|
||||
algorithm B<-1>, its Apache variant B<-apr1>, and its AIX variant are
|
||||
available.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -90,18 +93,9 @@ Don't output warnings when passwords given at the command line are truncated.
|
||||
In the output list, prepend the cleartext password and a TAB character
|
||||
to each password hash.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
+54
-92
@@ -10,12 +10,12 @@ B<openssl> B<pkcs12>
|
||||
[B<-help>]
|
||||
[B<-export>]
|
||||
[B<-chain>]
|
||||
[B<-inkey file_or_id>]
|
||||
[B<-certfile filename>]
|
||||
[B<-name name>]
|
||||
[B<-caname name>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-inkey> I<file_or_id>]
|
||||
[B<-certfile> I<filename>]
|
||||
[B<-name> I<name>]
|
||||
[B<-caname> I<name>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-noout>]
|
||||
[B<-nomacver>]
|
||||
[B<-nocerts>]
|
||||
@@ -23,30 +23,32 @@ B<openssl> B<pkcs12>
|
||||
[B<-cacerts>]
|
||||
[B<-nokeys>]
|
||||
[B<-info>]
|
||||
[B<-des | -des3 | -idea | -aes128 | -aes192 | -aes256 | -aria128 | -aria192 | -aria256 | -camellia128 | -camellia192 | -camellia256 | -nodes>]
|
||||
[B<-des> B<-des3> B<-idea> B<-aes128> B<-aes192> B<-aes256> B<-aria128> B<-aria192> B<-aria256> B<-camellia128> B<-camellia192> B<-camellia256> B<-nodes>]
|
||||
[B<-noiter>]
|
||||
[B<-maciter | -nomaciter | -nomac>]
|
||||
[B<-maciter> | B<-nomaciter> | B<-nomac>]
|
||||
[B<-twopass>]
|
||||
[B<-descert>]
|
||||
[B<-certpbe cipher>]
|
||||
[B<-keypbe cipher>]
|
||||
[B<-macalg digest>]
|
||||
[B<-certpbe> I<cipher>]
|
||||
[B<-keypbe> I<cipher>]
|
||||
[B<-macalg> I<digest>]
|
||||
[B<-keyex>]
|
||||
[B<-keysig>]
|
||||
[B<-password arg>]
|
||||
[B<-passin arg>]
|
||||
[B<-passout arg>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-CAfile file>]
|
||||
[B<-CApath dir>]
|
||||
[B<-password> I<arg>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-CSP name>]
|
||||
[B<-CSP> I<name>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<pkcs12> command allows PKCS#12 files (sometimes referred to as
|
||||
This command allows PKCS#12 files (sometimes referred to as
|
||||
PFX files) to be created and parsed. PKCS#12 files are used by several
|
||||
programs including Netscape, MSIE and MS Outlook.
|
||||
|
||||
@@ -64,32 +66,20 @@ file can be created by using the B<-export> option (see below).
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies filename of the PKCS#12 file to be parsed. Standard input is used
|
||||
by default.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
The filename to write certificates and private keys to, standard output by
|
||||
default. They are all written in PEM format.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-password> I<arg>
|
||||
|
||||
The PKCS#12 file (i.e. input file) password source. For more information about
|
||||
the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section in
|
||||
L<openssl(1)>.
|
||||
|
||||
=item B<-passout arg>
|
||||
|
||||
Pass phrase source to encrypt any outputted private keys with. For more
|
||||
information about the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section
|
||||
in L<openssl(1)>.
|
||||
|
||||
=item B<-password arg>
|
||||
|
||||
With -export, -password is equivalent to -passout.
|
||||
Otherwise, -password is equivalent to -passin.
|
||||
With B<-export>, B<-password> is equivalent to B<-passout>,
|
||||
otherwise it is equivalent to B<-passin>.
|
||||
|
||||
=item B<-noout>
|
||||
|
||||
@@ -154,7 +144,7 @@ Don't attempt to verify the integrity MAC before reading the file.
|
||||
Prompt for separate integrity and encryption passwords: most software
|
||||
always assumes these are the same so this option will render such
|
||||
PKCS#12 files unreadable. Cannot be used in combination with the options
|
||||
-password, -passin (if importing) or -passout (if exporting).
|
||||
B<-password>, B<-passin> if importing, or B<-passout> if exporting.
|
||||
|
||||
=back
|
||||
|
||||
@@ -167,52 +157,47 @@ PKCS#12 files unreadable. Cannot be used in combination with the options
|
||||
This option specifies that a PKCS#12 file will be created rather than
|
||||
parsed.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies filename to write the PKCS#12 file to. Standard output is used
|
||||
by default.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
The filename to read certificates and private keys from, standard input by
|
||||
default. They must all be in PEM format. The order doesn't matter but one
|
||||
private key and its corresponding certificate should be present. If additional
|
||||
certificates are present they will also be included in the PKCS#12 file.
|
||||
|
||||
=item B<-inkey file_or_id>
|
||||
=item B<-inkey> I<file_or_id>
|
||||
|
||||
File to read private key from. If not present then a private key must be present
|
||||
in the input file.
|
||||
If no engine is used, the argument is taken as a file; if an engine is
|
||||
specified, the argument is given to the engine as a key identifier.
|
||||
|
||||
=item B<-name friendlyname>
|
||||
=item B<-name> I<friendlyname>
|
||||
|
||||
This specifies the "friendly name" for the certificate and private key. This
|
||||
name is typically displayed in list boxes by software importing the file.
|
||||
|
||||
=item B<-certfile filename>
|
||||
=item B<-certfile> I<filename>
|
||||
|
||||
A filename to read additional certificates from.
|
||||
|
||||
=item B<-caname friendlyname>
|
||||
=item B<-caname> I<friendlyname>
|
||||
|
||||
This specifies the "friendly name" for other certificates. This option may be
|
||||
used multiple times to specify names for all certificates in the order they
|
||||
appear. Netscape ignores friendly names on other certificates whereas MSIE
|
||||
displays them.
|
||||
|
||||
=item B<-pass arg>, B<-passout arg>
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The PKCS#12 file (i.e. output file) password source. For more information about
|
||||
the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section in
|
||||
L<openssl(1)>.
|
||||
|
||||
=item B<-passin password>
|
||||
|
||||
Pass phrase source to decrypt any input private keys with. For more information
|
||||
about the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section in
|
||||
L<openssl(1)>.
|
||||
The password source for the input, and for encrypting any private keys that
|
||||
are output.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-chain>
|
||||
|
||||
@@ -227,16 +212,16 @@ file unreadable by some "export grade" software. By default the private
|
||||
key is encrypted using triple DES and the certificate using 40 bit RC2
|
||||
unless RC2 is disabled in which case triple DES is used.
|
||||
|
||||
=item B<-keypbe alg>, B<-certpbe alg>
|
||||
=item B<-keypbe> I<alg>, B<-certpbe> I<alg>
|
||||
|
||||
These options allow the algorithm used to encrypt the private key and
|
||||
certificates to be selected. Any PKCS#5 v1.5 or PKCS#12 PBE algorithm name
|
||||
can be used (see B<NOTES> section for more information). If a cipher name
|
||||
(as output by the B<list-cipher-algorithms> command is specified then it
|
||||
can be used (see L</NOTES> section for more information). If a cipher name
|
||||
(as output by C<openssl list -cipher-algorithms>) is specified then it
|
||||
is used with PKCS#5 v2.0. For interoperability reasons it is advisable to only
|
||||
use PKCS#12 algorithms.
|
||||
|
||||
=item B<-keyex|-keysig>
|
||||
=item B<-keyex>|B<-keysig>
|
||||
|
||||
Specifies that the private key is to be used for key exchange or just signing.
|
||||
This option is only interpreted by MSIE and similar MS software. Normally
|
||||
@@ -247,7 +232,7 @@ S/MIME signing, authenticode (ActiveX control signing) and SSL client
|
||||
authentication, however due to a bug only MSIE 5.0 and later support
|
||||
the use of signing only keys for SSL client authentication.
|
||||
|
||||
=item B<-macalg digest>
|
||||
=item B<-macalg> I<digest>
|
||||
|
||||
Specify the MAC digest algorithm. If not included them SHA1 will be used.
|
||||
|
||||
@@ -278,40 +263,17 @@ to be needed to use MAC iterations counts but they are now used by default.
|
||||
|
||||
Don't attempt to provide the MAC integrity.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-CAfile file>
|
||||
=item B<-CSP> I<name>
|
||||
|
||||
CA storage as a file.
|
||||
|
||||
=item B<-CApath dir>
|
||||
|
||||
CA storage as a directory. This directory must be a standard certificate
|
||||
directory: that is a hash of each subject name (using B<x509 -hash>) should be
|
||||
linked to each certificate.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location.
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location.
|
||||
|
||||
=item B<-CSP name>
|
||||
|
||||
Write B<name> as a Microsoft CSP name.
|
||||
Write I<name> as a Microsoft CSP name.
|
||||
|
||||
=back
|
||||
|
||||
@@ -330,14 +292,14 @@ file is the one corresponding to the private key: this may not always
|
||||
be the case. Using the B<-clcerts> option will solve this problem by only
|
||||
outputting the certificate corresponding to the private key. If the CA
|
||||
certificates are required then they can be output to a separate file using
|
||||
the B<-nokeys -cacerts> options to just output CA certificates.
|
||||
the B<-nokeys> B<-cacerts> options to just output CA certificates.
|
||||
|
||||
The B<-keypbe> and B<-certpbe> algorithms allow the precise encryption
|
||||
algorithms for private keys and certificates to be specified. Normally
|
||||
the defaults are fine but occasionally software can't handle triple DES
|
||||
encrypted private keys, then the option B<-keypbe PBE-SHA1-RC2-40> can
|
||||
encrypted private keys, then the option B<-keypbe> I<PBE-SHA1-RC2-40> can
|
||||
be used to reduce the private key encryption to 40 bit RC2. A complete
|
||||
description of all algorithms is contained in the B<pkcs8> manual page.
|
||||
description of all algorithms is contained in L<openssl-pkcs8(1)>.
|
||||
|
||||
Prior 1.1 release passwords containing non-ASCII characters were encoded
|
||||
in non-compliant manner, which limited interoperability, in first hand
|
||||
@@ -347,7 +309,7 @@ this reason even legacy encodings is attempted when reading the
|
||||
data. If you use PKCS#12 files in production application you are advised
|
||||
to convert the data, because implemented heuristic approach is not
|
||||
MT-safe, its sole goal is to facilitate the data upgrade with this
|
||||
utility.
|
||||
command.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
|
||||
+14
-12
@@ -8,18 +8,20 @@ openssl-pkcs7 - PKCS#7 utility
|
||||
|
||||
B<openssl> B<pkcs7>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-print_certs>]
|
||||
[B<-text>]
|
||||
[B<-noout>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<pkcs7> command processes PKCS#7 files in DER or PEM format.
|
||||
This command processes PKCS#7 files in DER or PEM format.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -29,23 +31,23 @@ The B<pkcs7> command processes PKCS#7 files in DER or PEM format.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. B<DER> format is DER encoded PKCS#7
|
||||
v1.5 structure.B<PEM> (the default) is a base64 encoded version of
|
||||
the DER form with header and footer lines.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read from or standard input if this
|
||||
option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename to write to or standard output by
|
||||
default.
|
||||
@@ -65,9 +67,9 @@ issuer names.
|
||||
Don't output the encoded version of the PKCS#7 structure (or certificates
|
||||
is B<-print_certs> is set).
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<pkcs7>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
+39
-50
@@ -9,30 +9,32 @@ openssl-pkcs8 - PKCS#8 format private key conversion tool
|
||||
B<openssl> B<pkcs8>
|
||||
[B<-help>]
|
||||
[B<-topk8>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-passin arg>]
|
||||
[B<-out filename>]
|
||||
[B<-passout arg>]
|
||||
[B<-iter count>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-iter> I<count>]
|
||||
[B<-noiter>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-nocrypt>]
|
||||
[B<-traditional>]
|
||||
[B<-v2 alg>]
|
||||
[B<-v2prf alg>]
|
||||
[B<-v1 alg>]
|
||||
[B<-engine id>]
|
||||
[B<-v2> I<alg>]
|
||||
[B<-v2prf> I<alg>]
|
||||
[B<-v1> I<alg>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-scrypt>]
|
||||
[B<-scrypt_N N>]
|
||||
[B<-scrypt_r r>]
|
||||
[B<-scrypt_p p>]
|
||||
[B<-scrypt_N> I<N>]
|
||||
[B<-scrypt_r> I<r>]
|
||||
[B<-scrypt_p> I<p>]
|
||||
|
||||
=for openssl ifdef engine scrypt scrypt_N scrypt_r scrypt_p
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<pkcs8> command processes private keys in PKCS#8 format. It can handle
|
||||
This command processes private keys in PKCS#8 format. It can handle
|
||||
both unencrypted PKCS#8 PrivateKeyInfo format and EncryptedPrivateKeyInfo
|
||||
format with a variety of PKCS#5 (v1.5 and v2.0) and PKCS#12 algorithms.
|
||||
|
||||
@@ -50,12 +52,12 @@ Normally a PKCS#8 private key is expected on input and a private key will be
|
||||
written to the output file. With the B<-topk8> option the situation is
|
||||
reversed: it reads a private key and writes a PKCS#8 format key.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format: see L<KEY FORMATS> for more details. The default
|
||||
format is PEM.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format: see L<KEY FORMATS> for more details. The default
|
||||
format is PEM.
|
||||
@@ -65,30 +67,26 @@ format is PEM.
|
||||
When this option is present and B<-topk8> is not a traditional format private
|
||||
key is written.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a key from or standard input if this
|
||||
option is not specified. If the key is encrypted a pass phrase will be
|
||||
prompted for.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The input file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The password source for the input and output file.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write a key to or standard output by
|
||||
default. If any encryption options are set then a pass phrase will be
|
||||
prompted for. The output filename should B<not> be the same as the input
|
||||
filename.
|
||||
|
||||
=item B<-passout arg>
|
||||
|
||||
The output file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
|
||||
=item B<-iter count>
|
||||
=item B<-iter> I<count>
|
||||
|
||||
When creating new PKCS#8 containers, use a given number of iterations on
|
||||
the password in deriving the encryption key for the PKCS#8 output.
|
||||
@@ -103,28 +101,19 @@ This option does not encrypt private keys at all and should only be used
|
||||
when absolutely necessary. Certain software such as some versions of Java
|
||||
code signing software used unencrypted private keys.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-v2 alg>
|
||||
=item B<-v2> I<alg>
|
||||
|
||||
This option sets the PKCS#5 v2.0 algorithm.
|
||||
|
||||
The B<alg> argument is the encryption algorithm to use, valid values include
|
||||
The I<alg> argument is the encryption algorithm to use, valid values include
|
||||
B<aes128>, B<aes256> and B<des3>. If this option isn't specified then B<aes256>
|
||||
is used.
|
||||
|
||||
=item B<-v2prf alg>
|
||||
=item B<-v2prf> I<alg>
|
||||
|
||||
This option sets the PRF algorithm to use with PKCS#5 v2.0. A typical value
|
||||
value would be B<hmacWithSHA256>. If this option isn't set then the default
|
||||
@@ -133,15 +122,15 @@ for the cipher is used or B<hmacWithSHA256> if there is no default.
|
||||
Some implementations may not support custom PRF algorithms and may require
|
||||
the B<hmacWithSHA1> option to work.
|
||||
|
||||
=item B<-v1 alg>
|
||||
=item B<-v1> I<alg>
|
||||
|
||||
This option indicates a PKCS#5 v1.5 or PKCS#12 algorithm should be used. Some
|
||||
older implementations may not support PKCS#5 v2.0 and may require this option.
|
||||
If not specified PKCS#5 v2.0 form is used.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<pkcs8>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -153,15 +142,15 @@ parameters: currently N=16384, r=8 and p=1 and AES in CBC mode with a 256 bit
|
||||
key. These parameters can be modified using the B<-scrypt_N>, B<-scrypt_r>,
|
||||
B<-scrypt_p> and B<-v2> options.
|
||||
|
||||
=item B<-scrypt_N N> B<-scrypt_r r> B<-scrypt_p p>
|
||||
=item B<-scrypt_N> I<N>, B<-scrypt_r> I<r>, B<-scrypt_p> I<p>
|
||||
|
||||
Sets the scrypt B<N>, B<r> or B<p> parameters.
|
||||
Sets the scrypt I<N>, I<r> or I<p> parameters.
|
||||
|
||||
=back
|
||||
|
||||
=head1 KEY FORMATS
|
||||
|
||||
Various different formats are used by the pkcs8 utility. These are detailed
|
||||
Various different formats are used by this command. These are detailed
|
||||
below.
|
||||
|
||||
If a key is being converted from PKCS#8 form (i.e. the B<-topk8> option is
|
||||
|
||||
+21
-23
@@ -8,12 +8,12 @@ openssl-pkey - public or private key processing tool
|
||||
|
||||
B<openssl> B<pkey>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-passin arg>]
|
||||
[B<-out filename>]
|
||||
[B<-passout arg>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-traditional>]
|
||||
[B<-I<cipher>>]
|
||||
[B<-text>]
|
||||
@@ -21,14 +21,16 @@ B<openssl> B<pkey>
|
||||
[B<-noout>]
|
||||
[B<-pubin>]
|
||||
[B<-pubout>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-check>]
|
||||
[B<-pubcheck>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<pkey> command processes public or private keys. They can be converted
|
||||
between various forms and their components printed out.
|
||||
This command processes public or private keys. They can be
|
||||
converted between various forms and their components printed out.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -38,38 +40,34 @@ between various forms and their components printed out.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format DER or PEM. The default format is PEM.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a key from or standard input if this
|
||||
option is not specified. If the key is encrypted a pass phrase will be
|
||||
prompted for.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The input file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The password source for the input and output file.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write a key to or standard output if this
|
||||
option is not specified. If any encryption options are set then a pass phrase
|
||||
will be prompted for. The output filename should B<not> be the same as the input
|
||||
filename.
|
||||
|
||||
=item B<-passout password>
|
||||
|
||||
The output file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
|
||||
=item B<-traditional>
|
||||
|
||||
Normally a private key is written using standard format: this is PKCS#8 form
|
||||
@@ -105,9 +103,9 @@ By default a private key is output: with this option a public
|
||||
key will be output instead. This option is automatically set if
|
||||
the input is a public key.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<pkey>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
@@ -8,16 +8,18 @@ openssl-pkeyparam - public key algorithm parameter processing tool
|
||||
|
||||
B<openssl> B<pkeyparam>
|
||||
[B<-help>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-text>]
|
||||
[B<-noout>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-check>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<pkeyparam> command processes public key algorithm parameters.
|
||||
This command processes public key algorithm parameters.
|
||||
They can be checked for correctness and their components printed out.
|
||||
|
||||
=head1 OPTIONS
|
||||
@@ -28,12 +30,12 @@ They can be checked for correctness and their components printed out.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read parameters from or standard input if
|
||||
this option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write parameters to or standard output if
|
||||
this option is not specified.
|
||||
@@ -46,9 +48,9 @@ Prints out the parameters in plain text in addition to the encoded version.
|
||||
|
||||
Do not output the encoded version of the parameters.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<pkeyparam>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
@@ -8,16 +8,16 @@ openssl-pkeyutl - public key algorithm utility
|
||||
|
||||
B<openssl> B<pkeyutl>
|
||||
[B<-help>]
|
||||
[B<-in file>]
|
||||
[B<-in> I<file>]
|
||||
[B<-rawin>]
|
||||
[B<-digest algorithm>]
|
||||
[B<-out file>]
|
||||
[B<-sigfile file>]
|
||||
[B<-inkey file>]
|
||||
[B<-keyform PEM|DER|ENGINE>]
|
||||
[B<-passin arg>]
|
||||
[B<-peerkey file>]
|
||||
[B<-peerform PEM|DER|ENGINE>]
|
||||
[B<-digest> I<algorithm>]
|
||||
[B<-out> I<file>]
|
||||
[B<-sigfile> I<file>]
|
||||
[B<-inkey> I<file>]
|
||||
[B<-keyform> B<DER>|B<PEM>|B<ENGINE>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-peerkey> I<file>]
|
||||
[B<-peerform> B<DER>|B<PEM>|B<ENGINE>]
|
||||
[B<-pubin>]
|
||||
[B<-certin>]
|
||||
[B<-rev>]
|
||||
@@ -27,21 +27,23 @@ B<openssl> B<pkeyutl>
|
||||
[B<-encrypt>]
|
||||
[B<-decrypt>]
|
||||
[B<-derive>]
|
||||
[B<-kdf algorithm>]
|
||||
[B<-kdflen length>]
|
||||
[B<-pkeyopt opt:value>]
|
||||
[B<-pkeyopt_passin opt:passarg>]
|
||||
[B<-kdf> I<algorithm>]
|
||||
[B<-kdflen> I<length>]
|
||||
[B<-pkeyopt> I<opt>:I<value>]
|
||||
[B<-pkeyopt_passin> I<opt>[:I<passarg>]]
|
||||
[B<-hexdump>]
|
||||
[B<-asn1parse>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-engine id>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-engine_impl>]
|
||||
|
||||
=for openssl ifdef engine engine_impl
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<pkeyutl> command can be used to perform low level public key operations
|
||||
using any supported algorithm.
|
||||
This command can be used to perform low level public key
|
||||
operations using any supported algorithm.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -51,7 +53,7 @@ using any supported algorithm.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read data from or standard input
|
||||
if this option is not specified.
|
||||
@@ -63,7 +65,7 @@ message digest algorithm. The user can specify a digest algorithm by using
|
||||
the B<-digest> option. This option can only be used with B<-sign> and
|
||||
B<-verify> and must be used with the Ed25519 and Ed448 algorithms.
|
||||
|
||||
=item B<-digest algorithm>
|
||||
=item B<-digest> I<algorithm>
|
||||
|
||||
This specifies the digest algorithm which is used to hash the input data before
|
||||
signing or verifying it with the input key. This option could be omitted if the
|
||||
@@ -71,37 +73,37 @@ signature algorithm does not require one (for instance, EdDSA). If this option
|
||||
is omitted but the signature algorithm requires one, a default value will be
|
||||
used. For signature algorithms like RSA, DSA and ECDSA, SHA-256 will be the
|
||||
default digest algorithm. For SM2, it will be SM3. If this option is present,
|
||||
then the B<-rawin> option must be also specified to B<pkeyutl>.
|
||||
then the B<-rawin> option must be also specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename to write to or standard output by
|
||||
default.
|
||||
|
||||
=item B<-sigfile file>
|
||||
=item B<-sigfile> I<file>
|
||||
|
||||
Signature file, required for B<verify> operations only
|
||||
Signature file, required for B<-verify> operations only
|
||||
|
||||
=item B<-inkey file>
|
||||
=item B<-inkey> I<file>
|
||||
|
||||
The input key file, by default it should be a private key.
|
||||
|
||||
=item B<-keyform PEM|DER|ENGINE>
|
||||
=item B<-keyform> B<DER>|B<PEM>|B<ENGINE>
|
||||
|
||||
The key format PEM, DER or ENGINE. Default is PEM.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The input key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The input key password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-peerkey file>
|
||||
=item B<-peerkey> I<file>
|
||||
|
||||
The peer key file, used by key derivation (agreement) operations.
|
||||
|
||||
=item B<-peerform PEM|DER|ENGINE>
|
||||
=item B<-peerform> B<DER>|B<PEM>|B<ENGINE>
|
||||
|
||||
The peer key format PEM, DER or ENGINE. Default is PEM.
|
||||
The peer key format B<PEM>, B<DER> or B<ENGINE>. Default is B<PEM>.
|
||||
|
||||
=item B<-pubin>
|
||||
|
||||
@@ -142,29 +144,29 @@ Decrypt the input data using a private key.
|
||||
|
||||
Derive a shared secret using the peer key.
|
||||
|
||||
=item B<-kdf algorithm>
|
||||
=item B<-kdf> I<algorithm>
|
||||
|
||||
Use key derivation function B<algorithm>. The supported algorithms are
|
||||
Use key derivation function I<algorithm>. The supported algorithms are
|
||||
at present B<TLS1-PRF> and B<HKDF>.
|
||||
Note: additional parameters and the KDF output length will normally have to be
|
||||
set for this to work.
|
||||
See L<EVP_PKEY_CTX_set_hkdf_md(3)> and L<EVP_PKEY_CTX_set_tls1_prf_md(3)>
|
||||
for the supported string parameters of each algorithm.
|
||||
|
||||
=item B<-kdflen length>
|
||||
=item B<-kdflen> I<length>
|
||||
|
||||
Set the output length for KDF.
|
||||
|
||||
=item B<-pkeyopt opt:value>
|
||||
=item B<-pkeyopt> I<opt>:I<value>
|
||||
|
||||
Public key options specified as opt:value. See NOTES below for more details.
|
||||
|
||||
=item B<-pkeyopt_passin opt:passarg>
|
||||
=item B<-pkeyopt_passin> I<opt>[:I<passarg>]
|
||||
|
||||
Allows reading a public key option B<opt> from stdin or a password source. If
|
||||
only opt is specified, the user will be prompted to enter the value on stdin.
|
||||
Alternatively, passarg can be specified which can be any value supported by
|
||||
B<PASS PHRASE ARGUMENTS> in L<openssl(1)>.
|
||||
Allows reading a public key option I<opt> from stdin or a password source.
|
||||
If only I<opt> is specified, the user will be prompted to enter a password on
|
||||
stdin. Alternatively, I<passarg> can be specified which can be any value
|
||||
supported by L<openssl(1)/Pass phrase options>.
|
||||
|
||||
=item B<-hexdump>
|
||||
|
||||
@@ -175,22 +177,13 @@ hex dump the output data.
|
||||
Parse the ASN.1 output data, this is useful when combined with the
|
||||
B<-verifyrecover> option when an ASN1 structure is signed.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-engine id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<pkeyutl>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -198,7 +191,7 @@ for all available algorithms.
|
||||
=item B<-engine_impl>
|
||||
|
||||
When used with the B<-engine> option, it specifies to also use
|
||||
engine B<id> for crypto operations.
|
||||
engine I<id> for crypto operations.
|
||||
|
||||
=back
|
||||
|
||||
@@ -207,15 +200,15 @@ engine B<id> for crypto operations.
|
||||
The operations and options supported vary according to the key algorithm
|
||||
and its implementation. The OpenSSL operations and options are indicated below.
|
||||
|
||||
Unless otherwise mentioned all algorithms support the B<digest:alg> option
|
||||
Unless otherwise mentioned all algorithms support the B<digest:>I<alg> option
|
||||
which specifies the digest in use for sign, verify and verifyrecover operations.
|
||||
The value B<alg> should represent a digest name as used in the
|
||||
The value I<alg> should represent a digest name as used in the
|
||||
EVP_get_digestbyname() function for example B<sha1>. This value is not used to
|
||||
hash the input data. It is used (by some algorithms) for sanity-checking the
|
||||
lengths of data passed in to the B<pkeyutl> and for creating the structures that
|
||||
make up the signature (e.g. B<DigestInfo> in RSASSA PKCS#1 v1.5 signatures).
|
||||
lengths of data passed in and for creating the structures that make up the
|
||||
signature (e.g. B<DigestInfo> in RSASSA PKCS#1 v1.5 signatures).
|
||||
|
||||
This utility does not hash the input data (except where -rawin is used) but
|
||||
This command does not hash the input data (except where -rawin is used) but
|
||||
rather it will use the data directly as input to the signature algorithm.
|
||||
Depending on the key type, signature type, and mode of padding, the maximum
|
||||
acceptable lengths of input data differ. The signed data can't be longer than
|
||||
@@ -236,9 +229,9 @@ B<pkeyopt> values are supported:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<rsa_padding_mode:mode>
|
||||
=item B<rsa_padding_mode:>I<mode>
|
||||
|
||||
This sets the RSA padding mode. Acceptable values for B<mode> are B<pkcs1> for
|
||||
This sets the RSA padding mode. Acceptable values for I<mode> are B<pkcs1> for
|
||||
PKCS#1 padding, B<sslv23> for SSLv23 padding, B<none> for no padding, B<oaep>
|
||||
for B<OAEP> mode, B<x931> for X9.31 mode and B<pss> for PSS.
|
||||
|
||||
@@ -256,15 +249,15 @@ verify and verifyrecover are can be performed in this mode.
|
||||
For B<pss> mode only sign and verify are supported and the digest type must be
|
||||
specified.
|
||||
|
||||
=item B<rsa_pss_saltlen:len>
|
||||
=item B<rsa_pss_saltlen:>I<len>
|
||||
|
||||
For B<pss> mode only this option specifies the salt length. Three special
|
||||
values are supported: "digest" sets the salt length to the digest length,
|
||||
"max" sets the salt length to the maximum permissible value. When verifying
|
||||
"auto" causes the salt length to be automatically determined based on the
|
||||
values are supported: B<digest> sets the salt length to the digest length,
|
||||
B<max> sets the salt length to the maximum permissible value. When verifying
|
||||
B<auto> causes the salt length to be automatically determined based on the
|
||||
B<PSS> block structure.
|
||||
|
||||
=item B<rsa_mgf1_md:digest>
|
||||
=item B<rsa_mgf1_md:>I<digest>
|
||||
|
||||
For PSS and OAEP padding sets the MGF1 digest. If the MGF1 digest is not
|
||||
explicitly set in PSS mode then the signing digest is used.
|
||||
@@ -275,11 +268,12 @@ explicitly set in PSS mode then the signing digest is used.
|
||||
|
||||
The RSA-PSS algorithm is a restricted version of the RSA algorithm which only
|
||||
supports the sign and verify operations with PSS padding. The following
|
||||
additional B<pkeyopt> values are supported:
|
||||
additional B<-pkeyopt> values are supported:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<rsa_padding_mode:mode>, B<rsa_pss_saltlen:len>, B<rsa_mgf1_md:digest>
|
||||
=item B<rsa_padding_mode:>I<mode>, B<rsa_pss_saltlen:>I<len>,
|
||||
B<rsa_mgf1_md:>I<digest>
|
||||
|
||||
These have the same meaning as the B<RSA> algorithm with some additional
|
||||
restrictions. The padding mode can only be set to B<pss> which is the
|
||||
@@ -318,8 +312,8 @@ no additional options.
|
||||
|
||||
These algorithms only support signing and verifying. OpenSSL only implements the
|
||||
"pure" variants of these algorithms so raw data can be passed directly to them
|
||||
without hashing them first. The option "-rawin" must be used with these
|
||||
algorithms with no "-digest" specified. Additionally OpenSSL only supports
|
||||
without hashing them first. The option B<-rawin> must be used with these
|
||||
algorithms with no B<-digest> specified. Additionally OpenSSL only supports
|
||||
"oneshot" operation with these algorithms. This means that the entire file to
|
||||
be signed/verified must be read into memory before processing it. Signing or
|
||||
Verifying very large files should be avoided. Additionally the size of the file
|
||||
@@ -330,17 +324,17 @@ must be known for this to work. If the size of the file cannot be determined
|
||||
|
||||
The SM2 algorithm supports sign, verify, encrypt and decrypt operations. For
|
||||
the sign and verify operations, SM2 requires an ID string to be passed in. The
|
||||
following B<pkeyopt> value is supported:
|
||||
following B<-pkeyopt> value is supported:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<sm2_id:string>
|
||||
=item B<sm2_id:>I<string>
|
||||
|
||||
This sets the ID string used in SM2 sign or verify operations. While verifying
|
||||
an SM2 signature, the ID string must be the same one used when signing the data.
|
||||
Otherwise the verification will fail.
|
||||
|
||||
=item B<sm2_hex_id:hex_string>
|
||||
=item B<sm2_hex_id:>I<hex_string>
|
||||
|
||||
This sets the ID string used in SM2 sign or verify operations. While verifying
|
||||
an SM2 signature, the ID string must be the same one used when signing the data.
|
||||
|
||||
+13
-14
@@ -10,14 +10,14 @@ B<openssl prime>
|
||||
[B<-help>]
|
||||
[B<-hex>]
|
||||
[B<-generate>]
|
||||
[B<-bits>]
|
||||
[B<-bits> I<num>]
|
||||
[B<-safe>]
|
||||
[B<-checks>]
|
||||
[I<number...>]
|
||||
[B<-checks> I<num>]
|
||||
[I<number> ...]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<prime> command checks if the specified numbers are prime.
|
||||
This command checks if the specified numbers are prime.
|
||||
|
||||
If no numbers are given on the command line, the B<-generate> flag should
|
||||
be used to generate primes according to the requirements specified by the
|
||||
@@ -27,31 +27,30 @@ rest of the flags.
|
||||
|
||||
=over 4
|
||||
|
||||
=item [B<-help>]
|
||||
=item B<-help>
|
||||
|
||||
Display an option summary.
|
||||
|
||||
=item [B<-hex>]
|
||||
=item B<-hex>
|
||||
|
||||
Generate hex output.
|
||||
|
||||
=item [B<-generate>]
|
||||
=item B<-generate>
|
||||
|
||||
Generate a prime number.
|
||||
|
||||
=item [B<-bits num>]
|
||||
=item B<-bits> I<num>
|
||||
|
||||
Generate a prime with B<num> bits.
|
||||
Generate a prime with I<num> bits.
|
||||
|
||||
=item [B<-safe>]
|
||||
=item B<-safe>
|
||||
|
||||
When used with B<-generate>, generates a "safe" prime. If the number
|
||||
generated is B<n>, then check that B<(n-1)/2> is also prime.
|
||||
generated is I<n>, then check that C<(I<n>-1)/2> is also prime.
|
||||
|
||||
=item [B<-checks num>]
|
||||
=item B<-checks> I<num>
|
||||
|
||||
Perform the checks B<num> times to see that the generated number
|
||||
is prime. The default is 20.
|
||||
This parameter is ignored.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
@@ -7,20 +7,25 @@ openssl-provider - load and query providers
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl provider>
|
||||
[B<-help>]
|
||||
[B<-v>]
|
||||
[B<-vv>]
|
||||
[B<-vvv>]
|
||||
[ I<provider...> ]
|
||||
[I<provider> ...]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<provider> command is used to query the capabilities of the specified
|
||||
I<provider>'s.
|
||||
This command is used to query the capabilities of the
|
||||
specified I<provider>'s.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-help>
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-v> B<-vv> B<-vvv>
|
||||
|
||||
Provides information about each specified provider.
|
||||
@@ -9,20 +9,18 @@ openssl-rand - generate pseudo-random bytes
|
||||
B<openssl rand>
|
||||
[B<-help>]
|
||||
[B<-out> I<file>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-base64>]
|
||||
[B<-hex>]
|
||||
I<num>
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<rand> command outputs I<num> pseudo-random bytes after seeding
|
||||
the random number generator once. As in other B<openssl> command
|
||||
line tools, PRNG seeding uses the file I<$HOME/>B<.rnd> or B<.rnd>
|
||||
in addition to the files given in the B<-rand> option. A new
|
||||
I<$HOME>/B<.rnd> or B<.rnd> file will be written back if enough
|
||||
seeding was obtained from these sources.
|
||||
This command outputs I<num> pseudo-random bytes after seeding
|
||||
the random number generator once.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -32,22 +30,13 @@ seeding was obtained from these sources.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-out file>
|
||||
=item B<-out> I<file>
|
||||
|
||||
Write to I<file> instead of standard output.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item B<-base64>
|
||||
|
||||
|
||||
+30
-24
@@ -5,34 +5,40 @@ Original text by James Westby, contributed under the OpenSSL license.
|
||||
|
||||
=head1 NAME
|
||||
|
||||
openssl-c_rehash - Create symbolic links to files named by the hash values
|
||||
openssl-rehash, c_rehash - Create symbolic links to files named by the hash
|
||||
values
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl>
|
||||
B<rehash>
|
||||
B<[-h]>
|
||||
B<[-help]>
|
||||
B<[-old]>
|
||||
B<[-n]>
|
||||
B<[-v]>
|
||||
[ I<directory>...]
|
||||
[B<-h>]
|
||||
[B<-help>]
|
||||
[B<-old>]
|
||||
[B<-n>]
|
||||
[B<-v>]
|
||||
[I<directory>] ...
|
||||
|
||||
B<c_rehash>
|
||||
I<flags...>
|
||||
[B<-h>]
|
||||
[B<-help>]
|
||||
[B<-old>]
|
||||
[B<-n>]
|
||||
[B<-v>]
|
||||
[I<directory>] ...
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
On some platforms, the OpenSSL B<rehash> command is available as
|
||||
an external script called B<c_rehash>. They are functionally equivalent,
|
||||
except for minor differences noted below.
|
||||
On some platforms, this command isn't available, and the external
|
||||
script B<c_rehash> has to be used instead. They are functionally
|
||||
equivalent, except for minor differences noted below.
|
||||
|
||||
B<rehash> scans directories and calculates a hash value of each
|
||||
C<.pem>, C<.crt>, C<.cer>, or C<.crl>
|
||||
B<openssl rehash> scans directories and calculates a hash value of
|
||||
each F<.pem>, F<.crt>, F<.cer>, or F<.crl>
|
||||
file in the specified directory list and creates symbolic links
|
||||
for each file, where the name of the link is the hash value.
|
||||
(If the platform does not support symbolic links, a copy is made.)
|
||||
This utility is useful as many programs that use OpenSSL require
|
||||
This command is useful as many programs that use OpenSSL require
|
||||
directories to be set up like this in order to find certificates.
|
||||
|
||||
If any directories are named on the command line, then those are
|
||||
@@ -40,22 +46,22 @@ processed in turn. If not, then the B<SSL_CERT_DIR> environment variable
|
||||
is consulted; this should be a colon-separated list of directories,
|
||||
like the Unix B<PATH> variable.
|
||||
If that is not set then the default directory (installation-specific
|
||||
but often B</usr/local/ssl/certs>) is processed.
|
||||
but often F</usr/local/ssl/certs>) is processed.
|
||||
|
||||
In order for a directory to be processed, the user must have write
|
||||
permissions on that directory, otherwise an error will be generated.
|
||||
|
||||
The links created are of the form C<HHHHHHHH.D>, where each B<H>
|
||||
is a hexadecimal character and B<D> is a single decimal digit.
|
||||
When processing a directory, B<rehash> will first remove all links
|
||||
that have a name in that syntax, even if they are being used for some
|
||||
other purpose.
|
||||
The links created are of the form I<HHHHHHHH.D>, where each I<H>
|
||||
is a hexadecimal character and I<D> is a single decimal digit.
|
||||
When a directory is processed, all links in it that have a name
|
||||
in that syntax are first removed, even if they are being used for
|
||||
some other purpose.
|
||||
To skip the removal step, use the B<-n> flag.
|
||||
Hashes for CRL's look similar except the letter B<r> appears after
|
||||
the period, like this: C<HHHHHHHH.rD>.
|
||||
the period, like this: I<HHHHHHHH.>B<r>I<D>.
|
||||
|
||||
Multiple objects may have the same hash; they will be indicated by
|
||||
incrementing the B<D> value. Duplicates are found by comparing the
|
||||
incrementing the I<D> value. Duplicates are found by comparing the
|
||||
full SHA-1 fingerprint. A warning will be displayed if a duplicate
|
||||
is found.
|
||||
|
||||
@@ -75,7 +81,7 @@ a certificate or CRL:
|
||||
$OPENSSL x509 -hash -fingerprint -noout -in FILENAME
|
||||
$OPENSSL crl -hash -fingerprint -noout -in FILENAME
|
||||
|
||||
where B<FILENAME> is the filename. It must output the hash of the
|
||||
where I<FILENAME> is the filename. It must output the hash of the
|
||||
file on the first line, and the fingerprint on the second,
|
||||
optionally prefixed with some text and an equals sign.
|
||||
|
||||
@@ -107,7 +113,7 @@ releases.
|
||||
=item B<-v>
|
||||
|
||||
Print messages about old links removed and new links created.
|
||||
By default, B<rehash> only lists each directory as it is processed.
|
||||
By default, this command only lists each directory as it is processed.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
+94
-105
@@ -8,53 +8,54 @@ openssl-req - PKCS#10 certificate request and certificate generating utility
|
||||
|
||||
B<openssl> B<req>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-passin arg>]
|
||||
[B<-out filename>]
|
||||
[B<-passout arg>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-text>]
|
||||
[B<-pubkey>]
|
||||
[B<-noout>]
|
||||
[B<-verify>]
|
||||
[B<-modulus>]
|
||||
[B<-new>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-newkey rsa:bits>]
|
||||
[B<-newkey alg:file>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-newkey> I<arg>]
|
||||
[B<-nodes>]
|
||||
[B<-key filename>]
|
||||
[B<-keyform PEM|DER>]
|
||||
[B<-keyout filename>]
|
||||
[B<-keygen_engine id>]
|
||||
[B<-key> I<filename>]
|
||||
[B<-keyform> B<DER>|B<PEM>]
|
||||
[B<-keyout> I<filename>]
|
||||
[B<-keygen_engine> I<id>]
|
||||
[B<-I<digest>>]
|
||||
[B<-config filename>]
|
||||
[B<-config> I<filename>]
|
||||
[B<-multivalue-rdn>]
|
||||
[B<-x509>]
|
||||
[B<-days n>]
|
||||
[B<-set_serial n>]
|
||||
[B<-days> I<n>]
|
||||
[B<-set_serial> I<n>]
|
||||
[B<-newhdr>]
|
||||
[B<-addext ext>]
|
||||
[B<-extensions section>]
|
||||
[B<-reqexts section>]
|
||||
[B<-addext> I<ext>]
|
||||
[B<-extensions> I<section>]
|
||||
[B<-reqexts> I<section>]
|
||||
[B<-precert>]
|
||||
[B<-utf8>]
|
||||
[B<-nameopt>]
|
||||
[B<-reqopt>]
|
||||
[B<-subject>]
|
||||
[B<-subj arg>]
|
||||
[B<-sigopt nm:v>]
|
||||
[B<-subj> I<arg>]
|
||||
[B<-sigopt> I<nm>:I<v>]
|
||||
[B<-batch>]
|
||||
[B<-verbose>]
|
||||
[B<-engine id>]
|
||||
[B<-sm2-id string>]
|
||||
[B<-sm2-hex-id hex-string>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-sm2-id> I<string>]
|
||||
[B<-sm2-hex-id> I<hex-string>]
|
||||
|
||||
=for openssl ifdef engine keygen_engine sm2-id sm2-hex-id
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<req> command primarily creates and processes certificate requests
|
||||
This command primarily creates and processes certificate requests
|
||||
in PKCS#10 format. It can additionally create self signed certificates
|
||||
for use as root CAs for example.
|
||||
|
||||
@@ -66,44 +67,40 @@ for use as root CAs for example.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option uses an ASN1 DER encoded
|
||||
form compatible with the PKCS#10. The B<PEM> form is the default format: it
|
||||
consists of the B<DER> format base64 encoded with additional header and
|
||||
footer lines.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a request from or standard input
|
||||
if this option is not specified. A request is only read if the creation
|
||||
options (B<-new> and B<-newkey>) are not specified.
|
||||
|
||||
=item B<-sigopt nm:v>
|
||||
=item B<-sigopt> I<nm>:I<v>
|
||||
|
||||
Pass options to the signature algorithm during sign or verify operations.
|
||||
Names and values of these options are algorithm-specific.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The input file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The password source for the input and output file.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write to or standard output by
|
||||
default.
|
||||
|
||||
=item B<-passout arg>
|
||||
|
||||
The output file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
|
||||
=item B<-text>
|
||||
|
||||
Prints out the certificate request in text form.
|
||||
@@ -140,63 +137,55 @@ in the configuration file and any requested extensions.
|
||||
If the B<-key> option is not used it will generate a new RSA private
|
||||
key using information specified in the configuration file.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-newkey arg>
|
||||
=item B<-newkey> I<arg>
|
||||
|
||||
This option creates a new certificate request and a new private
|
||||
key. The argument takes one of several forms. B<rsa:nbits>, where
|
||||
B<nbits> is the number of bits, generates an RSA key B<nbits>
|
||||
in size. If B<nbits> is omitted, i.e. B<-newkey rsa> specified,
|
||||
key. The argument takes one of several forms.
|
||||
|
||||
B<rsa:>I<nbits>, where
|
||||
I<nbits> is the number of bits, generates an RSA key I<nbits>
|
||||
in size. If I<nbits> is omitted, i.e. B<-newkey> I<rsa> specified,
|
||||
the default key size, specified in the configuration file is used.
|
||||
|
||||
All other algorithms support the B<-newkey alg:file> form, where file may be
|
||||
an algorithm parameter file, created by the B<genpkey -genparam> command
|
||||
or and X.509 certificate for a key with appropriate algorithm.
|
||||
All other algorithms support the B<-newkey> I<alg>:I<file> form, where file
|
||||
may be an algorithm parameter file, created with C<openssl genpkey -genparam>
|
||||
or an X.509 certificate for a key with appropriate algorithm.
|
||||
|
||||
B<param:file> generates a key using the parameter file or certificate B<file>,
|
||||
the algorithm is determined by the parameters. B<algname:file> use algorithm
|
||||
B<algname> and parameter file B<file>: the two algorithms must match or an
|
||||
error occurs. B<algname> just uses algorithm B<algname>, and parameters,
|
||||
if necessary should be specified via B<-pkeyopt> parameter.
|
||||
B<param:>I<file> generates a key using the parameter file or certificate
|
||||
I<file>, the algorithm is determined by the parameters. I<algname>:I<file>
|
||||
use algorithm I<algname> and parameter file I<file>: the two algorithms must
|
||||
match or an error occurs. I<algname> just uses algorithm I<algname>, and
|
||||
parameters, if necessary should be specified via B<-pkeyopt> parameter.
|
||||
|
||||
B<dsa:filename> generates a DSA key using the parameters
|
||||
in the file B<filename>. B<ec:filename> generates EC key (usable both with
|
||||
ECDSA or ECDH algorithms), B<gost2001:filename> generates GOST R
|
||||
34.10-2001 key (requires B<ccgost> engine configured in the configuration
|
||||
B<dsa:>I<filename> generates a DSA key using the parameters
|
||||
in the file I<filename>. B<ec:>I<filename> generates EC key (usable both with
|
||||
ECDSA or ECDH algorithms), B<gost2001:>I<filename> generates GOST R
|
||||
34.10-2001 key (requires B<gost> engine configured in the configuration
|
||||
file). If just B<gost2001> is specified a parameter set should be
|
||||
specified by B<-pkeyopt paramset:X>
|
||||
specified by B<-pkeyopt> I<paramset:X>
|
||||
|
||||
=item B<-pkeyopt> I<opt>:I<value>
|
||||
|
||||
=item B<-pkeyopt opt:value>
|
||||
|
||||
Set the public key algorithm option B<opt> to B<value>. The precise set of
|
||||
Set the public key algorithm option I<opt> to I<value>. The precise set of
|
||||
options supported depends on the public key algorithm used and its
|
||||
implementation. See B<KEY GENERATION OPTIONS> in the B<genpkey> manual page
|
||||
for more details.
|
||||
implementation.
|
||||
See L<openssl-genpkey(1)/KEY GENERATION OPTIONS> for more details.
|
||||
|
||||
=item B<-key filename>
|
||||
=item B<-key> I<filename>
|
||||
|
||||
This specifies the file to read the private key from. It also
|
||||
accepts PKCS#8 format private keys for PEM format files.
|
||||
|
||||
=item B<-keyform PEM|DER>
|
||||
=item B<-keyform> B<DER>|B<PEM>
|
||||
|
||||
The format of the private key file specified in the B<-key>
|
||||
argument. PEM is the default.
|
||||
|
||||
=item B<-keyout filename>
|
||||
=item B<-keyout> I<filename>
|
||||
|
||||
This gives the filename to write the newly created private key to.
|
||||
If this option is not specified then the filename present in the
|
||||
@@ -218,17 +207,17 @@ Some public key algorithms may override this choice. For instance, DSA
|
||||
signatures always use SHA1, GOST R 34.10 signatures always use
|
||||
GOST R 34.11-94 (B<-md_gost94>), Ed25519 and Ed448 never use any digest.
|
||||
|
||||
=item B<-config filename>
|
||||
=item B<-config> I<filename>
|
||||
|
||||
This allows an alternative configuration file to be specified.
|
||||
Optional; for a description of the default value,
|
||||
see L<openssl(1)/COMMAND SUMMARY>.
|
||||
|
||||
=item B<-subj arg>
|
||||
=item B<-subj> I<arg>
|
||||
|
||||
Sets subject name for new request or supersedes the subject name
|
||||
when processing a request.
|
||||
The arg must be formatted as I</type0=value0/type1=value1/type2=...>.
|
||||
The arg must be formatted as C</type0=value0/type1=value1/type2=...>.
|
||||
Keyword characters may be escaped by \ (backslash), and whitespace is retained.
|
||||
Empty values are permitted, but the corresponding type will not be included
|
||||
in the request.
|
||||
@@ -238,9 +227,9 @@ in the request.
|
||||
This option causes the -subj argument to be interpreted with full
|
||||
support for multivalued RDNs. Example:
|
||||
|
||||
I</DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe>
|
||||
C</DC=org/DC=OpenSSL/DC=users/UID=123456+CN=John Doe>
|
||||
|
||||
If -multi-rdn is not used then the UID value is I<123456+CN=John Doe>.
|
||||
If -multi-rdn is not used then the UID value is C<123456+CN=John Doe>.
|
||||
|
||||
=item B<-x509>
|
||||
|
||||
@@ -248,24 +237,24 @@ This option outputs a self signed certificate instead of a certificate
|
||||
request. This is typically used to generate a test certificate or
|
||||
a self signed root CA. The extensions added to the certificate
|
||||
(if any) are specified in the configuration file. Unless specified
|
||||
using the B<set_serial> option, a large random number will be used for
|
||||
using the B<-set_serial> option, a large random number will be used for
|
||||
the serial number.
|
||||
|
||||
If existing request is specified with the B<-in> option, it is converted
|
||||
to the self signed certificate otherwise new request is created.
|
||||
|
||||
=item B<-days n>
|
||||
=item B<-days> I<n>
|
||||
|
||||
When the B<-x509> option is being used this specifies the number of
|
||||
days to certify the certificate for, otherwise it is ignored. B<n> should
|
||||
days to certify the certificate for, otherwise it is ignored. I<n> should
|
||||
be a positive integer. The default is 30 days.
|
||||
|
||||
=item B<-set_serial n>
|
||||
=item B<-set_serial> I<n>
|
||||
|
||||
Serial number to use when outputting a self signed certificate. This
|
||||
may be specified as a decimal value or a hex value if preceded by B<0x>.
|
||||
may be specified as a decimal value or a hex value if preceded by C<0x>.
|
||||
|
||||
=item B<-addext ext>
|
||||
=item B<-addext> I<ext>
|
||||
|
||||
Add a specific extension to the certificate (if the B<-x509> option is
|
||||
present) or certificate request. The argument must have the form of
|
||||
@@ -273,9 +262,9 @@ a key=value pair as it would appear in a config file.
|
||||
|
||||
This option can be given multiple times.
|
||||
|
||||
=item B<-extensions section>
|
||||
=item B<-extensions> I<section>
|
||||
|
||||
=item B<-reqexts section>
|
||||
=item B<-reqexts> I<section>
|
||||
|
||||
These options specify alternative sections to include certificate
|
||||
extensions (if the B<-x509> option is present) or certificate
|
||||
@@ -300,19 +289,19 @@ default they are interpreted as ASCII. This means that the field
|
||||
values, whether prompted from a terminal or obtained from a
|
||||
configuration file, must be valid UTF8 strings.
|
||||
|
||||
=item B<-nameopt option>
|
||||
=item B<-nameopt> I<option>
|
||||
|
||||
Option which determines how the subject or issuer names are displayed. The
|
||||
B<option> argument can be a single option or multiple options separated by
|
||||
I<option> argument can be a single option or multiple options separated by
|
||||
commas. Alternatively the B<-nameopt> switch may be used more than once to
|
||||
set multiple options. See the L<x509(1)> manual page for details.
|
||||
set multiple options. See the L<openssl-x509(1)> manual page for details.
|
||||
|
||||
=item B<-reqopt>
|
||||
=item B<-reqopt> I<option>
|
||||
|
||||
Customise the output format used with B<-text>. The B<option> argument can be
|
||||
Customise the output format used with B<-text>. The I<option> argument can be
|
||||
a single option or multiple options separated by commas.
|
||||
|
||||
See discussion of the B<-certopt> parameter in the L<x509(1)>
|
||||
See discussion of the B<-certopt> parameter in the L<openssl-x509(1)>
|
||||
command.
|
||||
|
||||
=item B<-newhdr>
|
||||
@@ -328,27 +317,27 @@ Non-interactive mode.
|
||||
|
||||
Print extra details about the operations being performed.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<req>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
=item B<-keygen_engine id>
|
||||
=item B<-keygen_engine> I<id>
|
||||
|
||||
Specifies an engine (by its unique B<id> string) which would be used
|
||||
Specifies an engine (by its unique I<id> string) which would be used
|
||||
for key generation operations.
|
||||
|
||||
=item B<-sm2-id>
|
||||
|
||||
Specify the ID string to use when verifying an SM2 certificate. The ID string is
|
||||
required by the SM2 signature algorithm for signing and verification.
|
||||
Specify the ID string to use when verifying an SM2 certificate request. The ID
|
||||
string is required by the SM2 signature algorithm for signing and verification.
|
||||
|
||||
=item B<-sm2-hex-id>
|
||||
|
||||
Specify a binary ID string to use when signing or verifying using an SM2
|
||||
certificate. The argument for this option is string of hexadecimal digits.
|
||||
Specify a binary ID string to use when verifying an SM2 certificate request. The
|
||||
argument for this option is string of hexadecimal digits.
|
||||
|
||||
=back
|
||||
|
||||
@@ -484,8 +473,8 @@ just consist of field names and values: for example,
|
||||
OU=My Organization
|
||||
emailAddress=someone@somewhere.org
|
||||
|
||||
This allows external programs (e.g. GUI based) to generate a template file
|
||||
with all the field names and values and just pass it to B<req>. An example
|
||||
This allows external programs (e.g. GUI based) to generate a template file with
|
||||
all the field names and values and just pass it to this command. An example
|
||||
of this kind of configuration file is contained in the B<EXAMPLES> section.
|
||||
|
||||
Alternatively if the B<prompt> option is absent or not set to B<no> then the
|
||||
@@ -664,7 +653,7 @@ The following messages are frequently asked about:
|
||||
Using configuration from /some/path/openssl.cnf
|
||||
Unable to load config info
|
||||
|
||||
This is followed some time later by...
|
||||
This is followed some time later by:
|
||||
|
||||
unable to find 'distinguished_name' in config
|
||||
problems making Certificate Request
|
||||
|
||||
+27
-29
@@ -8,12 +8,12 @@ openssl-rsa - RSA key processing tool
|
||||
|
||||
B<openssl> B<rsa>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER>]
|
||||
[B<-in filename>]
|
||||
[B<-passin arg>]
|
||||
[B<-out filename>]
|
||||
[B<-passout arg>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-aes128>]
|
||||
[B<-aes192>]
|
||||
[B<-aes256>]
|
||||
@@ -34,15 +34,17 @@ B<openssl> B<rsa>
|
||||
[B<-pubout>]
|
||||
[B<-RSAPublicKey_in>]
|
||||
[B<-RSAPublicKey_out>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
=for openssl ifdef pvk-strong pvk-weak pvk-none engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<rsa> command processes RSA keys. They can be converted between various
|
||||
forms and their components printed out. B<Note> this command uses the
|
||||
This command processes RSA keys. They can be converted between
|
||||
various forms and their components printed out. B<Note> this command uses the
|
||||
traditional SSLeay compatible format for private key encryption: newer
|
||||
applications should use the more secure PKCS#8 format using the B<pkcs8>
|
||||
utility.
|
||||
applications should use the more secure PKCS#8 format using the
|
||||
L<openssl-pkcs8(1)> command.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -52,7 +54,7 @@ utility.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option uses an ASN1 DER encoded
|
||||
form compatible with the PKCS#1 RSAPrivateKey or SubjectPublicKeyInfo format.
|
||||
@@ -60,42 +62,38 @@ The B<PEM> form is the default format: it consists of the B<DER> format base64
|
||||
encoded with additional header and footer lines. On input PKCS#8 format private
|
||||
keys are also accepted.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a key from or standard input if this
|
||||
option is not specified. If the key is encrypted a pass phrase will be
|
||||
prompted for.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The input file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The password source for the input and output file.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write a key to or standard output if this
|
||||
option is not specified. If any encryption options are set then a pass phrase
|
||||
will be prompted for. The output filename should B<not> be the same as the input
|
||||
filename.
|
||||
|
||||
=item B<-passout password>
|
||||
|
||||
The output file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
|
||||
=item B<-aes128>, B<-aes192>, B<-aes256>, B<-aria128>, B<-aria192>, B<-aria256>, B<-camellia128>, B<-camellia192>, B<-camellia256>, B<-des>, B<-des3>, B<-idea>
|
||||
|
||||
These options encrypt the private key with the specified
|
||||
cipher before outputting it. A pass phrase is prompted for.
|
||||
If none of these options is specified the key is written in plain text. This
|
||||
means that using the B<rsa> utility to read in an encrypted key with no
|
||||
encryption option can be used to remove the pass phrase from a key, or by
|
||||
setting the encryption options it can be use to add or change the pass phrase.
|
||||
means that this command can be used to remove the pass phrase from a key
|
||||
by not giving any encryption option is given, or to add or change the pass
|
||||
phrase by setting them.
|
||||
These options can only be used with PEM format output files.
|
||||
|
||||
=item B<-text>
|
||||
@@ -130,9 +128,9 @@ the input is a public key.
|
||||
|
||||
Like B<-pubin> and B<-pubout> except B<RSAPublicKey> format is used instead.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<rsa>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -184,7 +182,7 @@ Output the public part of a private key in B<RSAPublicKey> format:
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
There should be an option that automatically handles .key files,
|
||||
There should be an option that automatically handles F<.key> files,
|
||||
without having to manually edit them.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
+20
-26
@@ -8,27 +8,29 @@ openssl-rsautl - RSA utility
|
||||
|
||||
B<openssl> B<rsautl>
|
||||
[B<-help>]
|
||||
[B<-in file>]
|
||||
[B<-out file>]
|
||||
[B<-inkey file>]
|
||||
[B<-keyform PEM|DER|ENGINE>]
|
||||
[B<-in> I<file>]
|
||||
[B<-out> I<file>]
|
||||
[B<-inkey> I<file>]
|
||||
[B<-keyform> B<DER>|B<PEM>|B<ENGINE>]
|
||||
[B<-pubin>]
|
||||
[B<-certin>]
|
||||
[B<-sign>]
|
||||
[B<-verify>]
|
||||
[B<-encrypt>]
|
||||
[B<-decrypt>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-pkcs>]
|
||||
[B<-ssl>]
|
||||
[B<-raw>]
|
||||
[B<-hexdump>]
|
||||
[B<-asn1parse>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<rsautl> command can be used to sign, verify, encrypt and decrypt
|
||||
This command can be used to sign, verify, encrypt and decrypt
|
||||
data using the RSA algorithm.
|
||||
|
||||
=head1 OPTIONS
|
||||
@@ -39,21 +41,21 @@ data using the RSA algorithm.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read data from or standard input
|
||||
if this option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename to write to or standard output by
|
||||
default.
|
||||
|
||||
=item B<-inkey file>
|
||||
=item B<-inkey> I<file>
|
||||
|
||||
The input key file, by default it should be an RSA private key.
|
||||
|
||||
=item B<-keyform PEM|DER|ENGINE>
|
||||
=item B<-keyform> B<DER>|B<PEM>|B<ENGINE>
|
||||
|
||||
The key format PEM, DER or ENGINE.
|
||||
|
||||
@@ -82,20 +84,11 @@ Encrypt the input data using an RSA public key.
|
||||
|
||||
Decrypt the input data using an RSA private key.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-pkcs, -oaep, -ssl, -raw>
|
||||
=item B<-pkcs>, B<-oaep>, B<-ssl>, B<-raw>
|
||||
|
||||
The padding to use: PKCS#1 v1.5 (the default), PKCS#1 OAEP,
|
||||
special padding used in SSL v2 backwards compatible handshakes,
|
||||
@@ -115,7 +108,7 @@ B<-verify> option.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
B<rsautl> because it uses the RSA algorithm directly can only be
|
||||
Since this command uses the RSA algorithm directly, it can only be
|
||||
used to sign or verify small pieces of data.
|
||||
|
||||
=head1 EXAMPLES
|
||||
@@ -146,8 +139,9 @@ encrypt and decrypt the block would have been of type 2 (the second byte)
|
||||
and random padding data visible instead of the 0xff bytes.
|
||||
|
||||
It is possible to analyse the signature of certificates using this
|
||||
utility in conjunction with B<asn1parse>. Consider the self signed
|
||||
example in certs/pca-cert.pem . Running B<asn1parse> as follows yields:
|
||||
utility in conjunction with L<openssl-asn1parse(1)>. Consider the self signed
|
||||
example in F<certs/pca-cert.pem>. Running L<openssl-asn1parse(1)> as follows
|
||||
yields:
|
||||
|
||||
openssl asn1parse -in pca-cert.pem
|
||||
|
||||
|
||||
+149
-162
@@ -8,42 +8,42 @@ openssl-s_client - SSL/TLS client program
|
||||
|
||||
B<openssl> B<s_client>
|
||||
[B<-help>]
|
||||
[B<-connect host:port>]
|
||||
[B<-bind host:port>]
|
||||
[B<-proxy host:port>]
|
||||
[B<-proxy_user userid>]
|
||||
[B<-proxy_pass arg>]
|
||||
[B<-unix path>]
|
||||
[B<-connect> I<host:port>]
|
||||
[B<-bind> I<host:port>]
|
||||
[B<-proxy> I<host:port>]
|
||||
[B<-proxy_user> I<userid>]
|
||||
[B<-proxy_pass> I<arg>]
|
||||
[B<-unix> I<path>]
|
||||
[B<-4>]
|
||||
[B<-6>]
|
||||
[B<-servername name>]
|
||||
[B<-servername> I<name>]
|
||||
[B<-noservername>]
|
||||
[B<-verify depth>]
|
||||
[B<-verify> I<depth>]
|
||||
[B<-verify_return_error>]
|
||||
[B<-cert filename>]
|
||||
[B<-certform DER|PEM>]
|
||||
[B<-key filename>]
|
||||
[B<-keyform DER|PEM>]
|
||||
[B<-cert_chain filename>]
|
||||
[B<-cert> I<filename>]
|
||||
[B<-certform> B<DER>|B<PEM>]
|
||||
[B<-key> I<filename>]
|
||||
[B<-keyform> B<DER>|B<PEM>]
|
||||
[B<-cert_chain> I<filename>]
|
||||
[B<-build_chain>]
|
||||
[B<-xkey>]
|
||||
[B<-xcert>]
|
||||
[B<-xchain>]
|
||||
[B<-xchain_build>]
|
||||
[B<-xcertform PEM|DER>]
|
||||
[B<-xkeyform PEM|DER>]
|
||||
[B<-pass arg>]
|
||||
[B<-CApath directory>]
|
||||
[B<-CAfile filename>]
|
||||
[B<-chainCApath directory>]
|
||||
[B<-chainCAfile filename>]
|
||||
[B<-xcertform> B<DER>|B<PEM>]
|
||||
[B<-xkeyform> B<DER>|B<PEM>]
|
||||
[B<-pass> I<arg>]
|
||||
[B<-CApath> I<directory>]
|
||||
[B<-CAfile> I<filename>]
|
||||
[B<-chainCApath> I<directory>]
|
||||
[B<-chainCAfile> I<filename>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-requestCAfile filename>]
|
||||
[B<-dane_tlsa_domain domain>]
|
||||
[B<-dane_tlsa_rrdata rrdata>]
|
||||
[B<-requestCAfile> I<filename>]
|
||||
[B<-dane_tlsa_domain> I<domain>]
|
||||
[B<-dane_tlsa_rrdata> I<rrdata>]
|
||||
[B<-dane_ee_no_namechecks>]
|
||||
[B<-attime timestamp>]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
@@ -54,23 +54,23 @@ B<openssl> B<s_client>
|
||||
[B<-inhibit_map>]
|
||||
[B<-no_check_time>]
|
||||
[B<-partial_chain>]
|
||||
[B<-policy arg>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-policy_check>]
|
||||
[B<-policy_print>]
|
||||
[B<-purpose purpose>]
|
||||
[B<-purpose> I<purpose>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-trusted_first>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-use_deltas>]
|
||||
[B<-auth_level num>]
|
||||
[B<-nameopt option>]
|
||||
[B<-verify_depth num>]
|
||||
[B<-verify_email email>]
|
||||
[B<-verify_hostname hostname>]
|
||||
[B<-verify_ip ip>]
|
||||
[B<-verify_name name>]
|
||||
[B<-auth_level> I<num>]
|
||||
[B<-nameopt> I<option>]
|
||||
[B<-verify_depth> I<num>]
|
||||
[B<-verify_email> I<email>]
|
||||
[B<-verify_hostname> I<hostname>]
|
||||
[B<-verify_ip> I<ip>]
|
||||
[B<-verify_name> I<name>]
|
||||
[B<-build_chain>]
|
||||
[B<-x509_strict>]
|
||||
[B<-reconnect>]
|
||||
@@ -83,9 +83,9 @@ B<openssl> B<s_client>
|
||||
[B<-crlf>]
|
||||
[B<-ign_eof>]
|
||||
[B<-no_ign_eof>]
|
||||
[B<-psk_identity identity>]
|
||||
[B<-psk key>]
|
||||
[B<-psk_session file>]
|
||||
[B<-psk_identity> I<identity>]
|
||||
[B<-psk> I<key>]
|
||||
[B<-psk_session> I<file>]
|
||||
[B<-quiet>]
|
||||
[B<-ssl3>]
|
||||
[B<-tls1>]
|
||||
@@ -112,42 +112,52 @@ B<openssl> B<s_client>
|
||||
[B<-comp>]
|
||||
[B<-no_comp>]
|
||||
[B<-allow_no_dhe_kex>]
|
||||
[B<-sigalgs sigalglist>]
|
||||
[B<-curves curvelist>]
|
||||
[B<-cipher cipherlist>]
|
||||
[B<-ciphersuites val>]
|
||||
[B<-sigalgs> I<sigalglist>]
|
||||
[B<-curves> I<curvelist>]
|
||||
[B<-cipher> I<cipherlist>]
|
||||
[B<-ciphersuites> I<val>]
|
||||
[B<-serverpref>]
|
||||
[B<-starttls protocol>]
|
||||
[B<-xmpphost hostname>]
|
||||
[B<-name hostname>]
|
||||
[B<-engine id>]
|
||||
[B<-starttls> I<protocol>]
|
||||
[B<-xmpphost> I<hostname>]
|
||||
[B<-name> I<hostname>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-tlsextdebug>]
|
||||
[B<-no_ticket>]
|
||||
[B<-sess_out filename>]
|
||||
[B<-sess_in filename>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-serverinfo types>]
|
||||
[B<-sess_out> I<filename>]
|
||||
[B<-sess_in> I<filename>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-serverinfo> I<types>]
|
||||
[B<-status>]
|
||||
[B<-alpn protocols>]
|
||||
[B<-nextprotoneg protocols>]
|
||||
[B<-alpn> I<protocols>]
|
||||
[B<-nextprotoneg> I<protocols>]
|
||||
[B<-ct>]
|
||||
[B<-noct>]
|
||||
[B<-ctlogfile>]
|
||||
[B<-keylogfile file>]
|
||||
[B<-early_data file>]
|
||||
[B<-keylogfile> I<file>]
|
||||
[B<-early_data> I<file>]
|
||||
[B<-enable_pha>]
|
||||
[B<target>]
|
||||
[I<host>:I<port>]
|
||||
|
||||
=for openssl ifdef engine ssl_client_engine ct noct ctlogfile
|
||||
|
||||
=for openssl ifdef ssl3 unix 4 6 use_srtp status trace wdebug nextprotoneg
|
||||
|
||||
=for openssl ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3 dtls mtu dtls1 dtls1_2
|
||||
|
||||
=for openssl ifdef sctp_label_bug sctp
|
||||
|
||||
=for openssl ifdef srpuser srppass srp_lateuser srp_moregroups srp_strength
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<s_client> command implements a generic SSL/TLS client which connects
|
||||
to a remote host using SSL/TLS. It is a I<very> useful diagnostic tool for
|
||||
SSL servers.
|
||||
This command implements a generic SSL/TLS client which
|
||||
connects to a remote host using SSL/TLS. It is a I<very> useful diagnostic
|
||||
tool for SSL servers.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
In addition to the options below the B<s_client> utility also supports the
|
||||
In addition to the options below, this command also supports the
|
||||
common and client only options documented
|
||||
in the "Supported Command Line Commands" section of the L<SSL_CONF_cmd(3)>
|
||||
manual page.
|
||||
@@ -158,26 +168,26 @@ manual page.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-connect host:port>
|
||||
=item B<-connect> I<host>:I<port>
|
||||
|
||||
This specifies the host and optional port to connect to. It is possible to
|
||||
select the host and port using the optional target positional argument instead.
|
||||
If neither this nor the target positional argument are specified then an attempt
|
||||
is made to connect to the local host on port 4433.
|
||||
|
||||
=item B<-bind host:port>]
|
||||
=item B<-bind> I<host:port>]
|
||||
|
||||
This specifies the host address and or port to bind as the source for the
|
||||
connection. For Unix-domain sockets the port is ignored and the host is
|
||||
used as the source socket address.
|
||||
|
||||
=item B<-proxy host:port>
|
||||
=item B<-proxy> I<host:port>
|
||||
|
||||
When used with the B<-connect> flag, the program uses the host and port
|
||||
specified with this flag and issues an HTTP CONNECT command to connect
|
||||
to the desired server.
|
||||
|
||||
=item B<-proxy_user userid>
|
||||
=item B<-proxy_user> I<userid>
|
||||
|
||||
When used with the B<-proxy> flag, the program will attempt to authenticate
|
||||
with the specified proxy using basic (base64) authentication.
|
||||
@@ -186,13 +196,13 @@ in easily reversible base64 encoding before any TLS/SSL session is established.
|
||||
Therefore these credentials are easily recovered by anyone able to sniff/trace
|
||||
the network. Use with caution.
|
||||
|
||||
=item B<-proxy_pass arg>
|
||||
=item B<-proxy_pass> I<arg>
|
||||
|
||||
The proxy password source, used with the B<-proxy_user> flag.
|
||||
For more information about the format of B<arg> see the B<PASS PHRASE ARGUMENTS>
|
||||
section in L<openssl(1)>.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-unix path>
|
||||
=item B<-unix> I<path>
|
||||
|
||||
Connect over the specified Unix-domain socket.
|
||||
|
||||
@@ -204,7 +214,7 @@ Use IPv4 only.
|
||||
|
||||
Use IPv6 only.
|
||||
|
||||
=item B<-servername name>
|
||||
=item B<-servername> I<name>
|
||||
|
||||
Set the TLS SNI (Server Name Indication) extension in the ClientHello message to
|
||||
the given value.
|
||||
@@ -225,21 +235,21 @@ Suppresses sending of the SNI (Server Name Indication) extension in the
|
||||
ClientHello message. Cannot be used in conjunction with the B<-servername> or
|
||||
<-dane_tlsa_domain> options.
|
||||
|
||||
=item B<-cert certname>
|
||||
=item B<-cert> I<certname>
|
||||
|
||||
The certificate to use, if one is requested by the server. The default is
|
||||
not to use a certificate.
|
||||
|
||||
=item B<-certform format>
|
||||
=item B<-certform> I<format>
|
||||
|
||||
The certificate format to use: DER or PEM. PEM is the default.
|
||||
|
||||
=item B<-key keyfile>
|
||||
=item B<-key> I<keyfile>
|
||||
|
||||
The private key to use. If not specified then the certificate file will
|
||||
be used.
|
||||
|
||||
=item B<-keyform format>
|
||||
=item B<-keyform> I<format>
|
||||
|
||||
The private format to use: DER or PEM. PEM is the default.
|
||||
|
||||
@@ -254,7 +264,7 @@ B<-cert> option.
|
||||
Specify whether the application should build the certificate chain to be
|
||||
provided to the server.
|
||||
|
||||
=item B<-xkey infile>, B<-xcert infile>, B<-xchain>
|
||||
=item B<-xkey> I<infile>, B<-xcert> I<infile>, B<-xchain>
|
||||
|
||||
Specify an extra certificate, private key and certificate chain. These behave
|
||||
in the same manner as the B<-cert>, B<-key> and B<-cert_chain> options. When
|
||||
@@ -264,19 +274,19 @@ client.
|
||||
=item B<-xchain_build>
|
||||
|
||||
Specify whether the application should build the certificate chain to be
|
||||
provided to the server for the extra certificates provided via B<-xkey infile>,
|
||||
B<-xcert infile>, B<-xchain> options.
|
||||
provided to the server for the extra certificates provided via B<-xkey> I<infile>,
|
||||
B<-xcert> I<infile>, B<-xchain> options.
|
||||
|
||||
=item B<-xcertform PEM|DER>, B<-xkeyform PEM|DER>
|
||||
=item B<-xcertform> B<DER>|B<PEM>, B<-xkeyform> B<DER>|B<PEM>
|
||||
|
||||
Extra certificate and private key format respectively.
|
||||
|
||||
=item B<-pass arg>
|
||||
=item B<-pass> I<arg>
|
||||
|
||||
the private key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
the private key password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass phrase options>.
|
||||
|
||||
=item B<-verify depth>
|
||||
=item B<-verify> I<depth>
|
||||
|
||||
The verify depth to use. This specifies the maximum length of the
|
||||
server certificate chain and turns on server certificate verification.
|
||||
@@ -289,49 +299,35 @@ will never fail due to a server certificate verify failure.
|
||||
Return verification errors instead of continuing. This will typically
|
||||
abort the handshake with a fatal error.
|
||||
|
||||
=item B<-nameopt option>
|
||||
=item B<-nameopt> I<option>
|
||||
|
||||
Option which determines how the subject or issuer names are displayed. The
|
||||
B<option> argument can be a single option or multiple options separated by
|
||||
I<option> argument can be a single option or multiple options separated by
|
||||
commas. Alternatively the B<-nameopt> switch may be used more than once to
|
||||
set multiple options. See the L<x509(1)> manual page for details.
|
||||
set multiple options. See the L<openssl-x509(1)> manual page for details.
|
||||
|
||||
=item B<-CApath directory>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
The directory to use for server certificate verification. This directory
|
||||
must be in "hash format", see L<verify(1)> for more information. These are
|
||||
also used when building the client certificate chain.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-CAfile file>
|
||||
|
||||
A file containing trusted certificates to use during server authentication
|
||||
and to use when attempting to build the client certificate chain.
|
||||
|
||||
=item B<-chainCApath directory>
|
||||
=item B<-chainCApath> I<directory>
|
||||
|
||||
The directory to use for building the chain provided to the server. This
|
||||
directory must be in "hash format", see L<verify(1)> for more information.
|
||||
directory must be in "hash format", see L<openssl-verify(1)> for more
|
||||
information.
|
||||
|
||||
=item B<-chainCAfile file>
|
||||
=item B<-chainCAfile> I<file>
|
||||
|
||||
A file containing trusted certificates to use when attempting to build the
|
||||
client certificate chain.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location
|
||||
|
||||
=item B<-requestCAfile file>
|
||||
=item B<-requestCAfile> I<file>
|
||||
|
||||
A file containing a list of certificates whose subject names will be sent
|
||||
to the server in the B<certificate_authorities> extension. Only supported
|
||||
for TLS 1.3
|
||||
|
||||
=item B<-dane_tlsa_domain domain>
|
||||
=item B<-dane_tlsa_domain> I<domain>
|
||||
|
||||
Enable RFC6698/RFC7671 DANE TLSA authentication and specify the
|
||||
TLSA base domain which becomes the default SNI hint and the primary
|
||||
@@ -347,10 +343,10 @@ certificate of the chain, the result is reported as "TA public key
|
||||
verified". Otherwise, either the TLSA record "matched TA certificate"
|
||||
at a positive depth or else "matched EE certificate" at depth 0.
|
||||
|
||||
=item B<-dane_tlsa_rrdata rrdata>
|
||||
=item B<-dane_tlsa_rrdata> I<rrdata>
|
||||
|
||||
Use one or more times to specify the RRDATA fields of the DANE TLSA
|
||||
RRset associated with the target service. The B<rrdata> value is
|
||||
RRset associated with the target service. The I<rrdata> value is
|
||||
specied in "presentation form", that is four whitespace separated
|
||||
fields that specify the usage, selector, matching type and associated
|
||||
data, with the last of these encoded in hexadecimal. Optional
|
||||
@@ -396,7 +392,7 @@ B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,
|
||||
B<-verify_ip>, B<-verify_name>, B<-x509_strict>
|
||||
|
||||
Set various certificate chain validation options. See the
|
||||
L<verify(1)> manual page for details.
|
||||
L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=item B<-reconnect>
|
||||
|
||||
@@ -469,27 +465,27 @@ turns on B<-ign_eof> as well.
|
||||
Shut down the connection when end of file is reached in the input.
|
||||
Can be used to override the implicit B<-ign_eof> after B<-quiet>.
|
||||
|
||||
=item B<-psk_identity identity>
|
||||
=item B<-psk_identity> I<identity>
|
||||
|
||||
Use the PSK identity B<identity> when using a PSK cipher suite.
|
||||
Use the PSK identity I<identity> when using a PSK cipher suite.
|
||||
The default value is "Client_identity" (without the quotes).
|
||||
|
||||
=item B<-psk key>
|
||||
=item B<-psk> I<key>
|
||||
|
||||
Use the PSK key B<key> when using a PSK cipher suite. The key is
|
||||
Use the PSK key I<key> when using a PSK cipher suite. The key is
|
||||
given as a hexadecimal number without leading 0x, for example -psk
|
||||
1a2b3c4d.
|
||||
This option must be provided in order to use a PSK cipher.
|
||||
|
||||
=item B<-psk_session file>
|
||||
=item B<-psk_session> I<file>
|
||||
|
||||
Use the pem encoded SSL_SESSION data stored in B<file> as the basis of a PSK.
|
||||
Use the pem encoded SSL_SESSION data stored in I<file> as the basis of a PSK.
|
||||
Note that this will only work if TLSv1.3 is negotiated.
|
||||
|
||||
=item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>, B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3>
|
||||
|
||||
These options require or disable the use of the specified SSL or TLS protocols.
|
||||
By default B<s_client> will negotiate the highest mutually supported protocol
|
||||
By default, this command will negotiate the highest mutually supported protocol
|
||||
version.
|
||||
When a specific TLS version is required, only that version will be offered to
|
||||
and accepted from the server.
|
||||
@@ -498,8 +494,8 @@ OpenSSL was built.
|
||||
|
||||
=item B<-dtls>, B<-dtls1>, B<-dtls1_2>
|
||||
|
||||
These options make B<s_client> use DTLS protocols instead of TLS.
|
||||
With B<-dtls>, B<s_client> will negotiate any supported DTLS protocol version,
|
||||
These options make this command use DTLS protocols instead of TLS.
|
||||
With B<-dtls>, it will negotiate any supported DTLS protocol version,
|
||||
whilst B<-dtls1> and B<-dtls1_2> will only support DTLS1.0 and DTLS1.2
|
||||
respectively.
|
||||
|
||||
@@ -528,12 +524,12 @@ asynchronously. This will only have an effect if an asynchronous capable engine
|
||||
is also used via the B<-engine> option. For test purposes the dummy async engine
|
||||
(dasync) can be used (if available).
|
||||
|
||||
=item B<-max_send_frag int>
|
||||
=item B<-max_send_frag> I<int>
|
||||
|
||||
The maximum size of data fragment to send.
|
||||
See L<SSL_CTX_set_max_send_fragment(3)> for further information.
|
||||
|
||||
=item B<-split_send_frag int>
|
||||
=item B<-split_send_frag> I<int>
|
||||
|
||||
The size used to split data for encrypt pipelines. If more data is written in
|
||||
one go than this value then it will be split into multiple pipelines, up to the
|
||||
@@ -542,14 +538,14 @@ a suitable cipher suite has been negotiated, an engine that supports pipelining
|
||||
has been loaded, and max_pipelines is greater than 1. See
|
||||
L<SSL_CTX_set_split_send_fragment(3)> for further information.
|
||||
|
||||
=item B<-max_pipelines int>
|
||||
=item B<-max_pipelines> I<int>
|
||||
|
||||
The maximum number of encrypt/decrypt pipelines to be used. This will only have
|
||||
an effect if an engine has been loaded that supports pipelining (e.g. the dasync
|
||||
engine) and a suitable cipher suite has been negotiated. The default value is 1.
|
||||
See L<SSL_CTX_set_max_pipelines(3)> for further information.
|
||||
|
||||
=item B<-read_buf int>
|
||||
=item B<-read_buf> I<int>
|
||||
|
||||
The default read buffer size to be used for connections. This will only have an
|
||||
effect if the buffer size is larger than the size that would otherwise be used
|
||||
@@ -579,44 +575,44 @@ OpenSSL 1.1.0.
|
||||
Only provide a brief summary of connection parameters instead of the
|
||||
normal verbose output.
|
||||
|
||||
=item B<-sigalgs sigalglist>
|
||||
=item B<-sigalgs> I<sigalglist>
|
||||
|
||||
Specifies the list of signature algorithms that are sent by the client.
|
||||
The server selects one entry in the list based on its preferences.
|
||||
For example strings, see L<SSL_CTX_set1_sigalgs(3)>
|
||||
|
||||
=item B<-curves curvelist>
|
||||
=item B<-curves> I<curvelist>
|
||||
|
||||
Specifies the list of supported curves to be sent by the client. The curve is
|
||||
ultimately selected by the server. For a list of all curves, use:
|
||||
|
||||
$ openssl ecparam -list_curves
|
||||
|
||||
=item B<-cipher cipherlist>
|
||||
=item B<-cipher> I<cipherlist>
|
||||
|
||||
This allows the TLSv1.2 and below cipher list sent by the client to be modified.
|
||||
This list will be combined with any TLSv1.3 ciphersuites that have been
|
||||
configured. Although the server determines which ciphersuite is used it should
|
||||
take the first supported cipher in the list sent by the client. See the
|
||||
B<ciphers> command for more information.
|
||||
take the first supported cipher in the list sent by the client. See
|
||||
L<openssl-ciphers(1)> for more information.
|
||||
|
||||
=item B<-ciphersuites val>
|
||||
=item B<-ciphersuites> I<val>
|
||||
|
||||
This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
|
||||
list will be combined with any TLSv1.2 and below ciphersuites that have been
|
||||
configured. Although the server determines which cipher suite is used it should
|
||||
take the first supported cipher in the list sent by the client. See the
|
||||
B<ciphers> command for more information. The format for this list is a simple
|
||||
take the first supported cipher in the list sent by the client. See
|
||||
L<openssl-ciphers(1)> for more information. The format for this list is a simple
|
||||
colon (":") separated list of TLSv1.3 ciphersuite names.
|
||||
|
||||
=item B<-starttls protocol>
|
||||
=item B<-starttls> I<protocol>
|
||||
|
||||
Send the protocol-specific message(s) to switch to TLS for communication.
|
||||
B<protocol> is a keyword for the intended protocol. Currently, the only
|
||||
I<protocol> is a keyword for the intended protocol. Currently, the only
|
||||
supported keywords are "smtp", "pop3", "imap", "ftp", "xmpp", "xmpp-server",
|
||||
"irc", "postgres", "mysql", "lmtp", "nntp", "sieve" and "ldap".
|
||||
|
||||
=item B<-xmpphost hostname>
|
||||
=item B<-xmpphost> I<hostname>
|
||||
|
||||
This option, when used with "-starttls xmpp" or "-starttls xmpp-server",
|
||||
specifies the host for the "to" attribute of the stream element.
|
||||
@@ -625,7 +621,7 @@ will be used.
|
||||
|
||||
This option is an alias of the B<-name> option for "xmpp" and "xmpp-server".
|
||||
|
||||
=item B<-name hostname>
|
||||
=item B<-name> I<hostname>
|
||||
|
||||
This option is used to specify hostname information for various protocols
|
||||
used with B<-starttls> option. Currently only "xmpp", "xmpp-server",
|
||||
@@ -647,36 +643,27 @@ Print out a hex dump of any TLS extensions received from the server.
|
||||
|
||||
Disable RFC4507bis session ticket support.
|
||||
|
||||
=item B<-sess_out filename>
|
||||
=item B<-sess_out> I<filename>
|
||||
|
||||
Output SSL session to B<filename>.
|
||||
Output SSL session to I<filename>.
|
||||
|
||||
=item B<-sess_in sess.pem>
|
||||
=item B<-sess_in> I<filename>
|
||||
|
||||
Load SSL session from B<filename>. The client will attempt to resume a
|
||||
Load SSL session from I<filename>. The client will attempt to resume a
|
||||
connection from this session.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<s_client>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-serverinfo types>
|
||||
=item B<-serverinfo> I<types>
|
||||
|
||||
A list of comma-separated TLS Extension Types (numbers between 0 and
|
||||
65535). Each type will be sent as an empty ClientHello TLS Extension.
|
||||
@@ -688,12 +675,12 @@ file.
|
||||
Sends a certificate status request to the server (OCSP stapling). The server
|
||||
response (if any) is printed out.
|
||||
|
||||
=item B<-alpn protocols>, B<-nextprotoneg protocols>
|
||||
=item B<-alpn> I<protocols>, B<-nextprotoneg> I<protocols>
|
||||
|
||||
These flags enable the Enable the Application-Layer Protocol Negotiation
|
||||
or Next Protocol Negotiation (NPN) extension, respectively. ALPN is the
|
||||
IETF standard and replaces NPN.
|
||||
The B<protocols> list is a comma-separated list of protocol names that
|
||||
The I<protocols> list is a comma-separated list of protocol names that
|
||||
the client should advertise support for. The list should contain the most
|
||||
desirable protocols first. Protocol names are printable ASCII strings,
|
||||
for example "http/1.1" or "spdy/3".
|
||||
@@ -717,12 +704,12 @@ for SCTs.
|
||||
A file containing a list of known Certificate Transparency logs. See
|
||||
L<SSL_CTX_set_ctlog_list_file(3)> for the expected file format.
|
||||
|
||||
=item B<-keylogfile file>
|
||||
=item B<-keylogfile> I<file>
|
||||
|
||||
Appends TLS secrets to the specified keylog file such that external programs
|
||||
(like Wireshark) can decrypt TLS connections.
|
||||
|
||||
=item B<-early_data file>
|
||||
=item B<-early_data> I<file>
|
||||
|
||||
Reads the contents of the specified file and attempts to send it as early data
|
||||
to the server. This will only work with resumed sessions that support early
|
||||
@@ -733,12 +720,12 @@ data and when the server accepts the early data.
|
||||
For TLSv1.3 only, send the Post-Handshake Authentication extension. This will
|
||||
happen whether or not a certificate has been provided via B<-cert>.
|
||||
|
||||
=item B<[target]>
|
||||
=item I<host>:I<port>
|
||||
|
||||
Rather than providing B<-connect>, the target hostname and optional port may
|
||||
be provided as a single positional argument after all options. If neither this
|
||||
nor B<-connect> are provided, falls back to attempting to connect to localhost
|
||||
on port 4433.
|
||||
nor B<-connect> are provided, falls back to attempting to connect to
|
||||
I<localhost> on port I<4433>.
|
||||
|
||||
=back
|
||||
|
||||
@@ -774,7 +761,7 @@ Send a key update message to the server and request one back (TLSv1.3 only)
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
B<s_client> can be used to debug SSL servers. To connect to an SSL HTTP
|
||||
This command can be used to debug SSL servers. To connect to an SSL HTTP
|
||||
server the command:
|
||||
|
||||
openssl s_client -connect servername:443
|
||||
@@ -792,7 +779,7 @@ A frequent problem when attempting to get client certificates working
|
||||
is that a web client complains it has no certificates or gives an empty
|
||||
list to choose from. This is normally because the server is not sending
|
||||
the clients certificate authority in its "acceptable CA list" when it
|
||||
requests a certificate. By using B<s_client> the CA list can be viewed
|
||||
requests a certificate. By using this command, the CA list can be viewed
|
||||
and checked. However some servers only request client authentication
|
||||
after a specific URL is requested. To obtain the list in this case it
|
||||
is necessary to use the B<-prexit> option and send an HTTP request
|
||||
@@ -807,7 +794,7 @@ If there are problems verifying a server certificate then the
|
||||
B<-showcerts> option can be used to show all the certificates sent by the
|
||||
server.
|
||||
|
||||
The B<s_client> utility is a test tool and is designed to continue the
|
||||
This command is a test tool and is designed to continue the
|
||||
handshake after any certificate verification errors. As a result it will
|
||||
accept any certificate chain (trusted or not) sent by the peer. None test
|
||||
applications should B<not> do this as it makes them vulnerable to a MITM
|
||||
@@ -820,8 +807,8 @@ connections to come from some particular address and or port.
|
||||
=head1 BUGS
|
||||
|
||||
Because this program has a lot of options and also because some of the
|
||||
techniques used are rather old, the C source of B<s_client> is rather hard to
|
||||
read and not a model of how things should be done.
|
||||
techniques used are rather old, the C source for this command is rather
|
||||
hard to read and not a model of how things should be done.
|
||||
A typical SSL client program would be much simpler.
|
||||
|
||||
The B<-prexit> option is a bit of a hack. We should really report
|
||||
|
||||
+181
-196
@@ -8,36 +8,36 @@ openssl-s_server - SSL/TLS server program
|
||||
|
||||
B<openssl> B<s_server>
|
||||
[B<-help>]
|
||||
[B<-port +int>]
|
||||
[B<-accept val>]
|
||||
[B<-unix val>]
|
||||
[B<-port> I<+int>]
|
||||
[B<-accept> I<val>]
|
||||
[B<-unix> I<val>]
|
||||
[B<-4>]
|
||||
[B<-6>]
|
||||
[B<-unlink>]
|
||||
[B<-context val>]
|
||||
[B<-verify int>]
|
||||
[B<-Verify int>]
|
||||
[B<-cert infile>]
|
||||
[B<-nameopt val>]
|
||||
[B<-naccept +int>]
|
||||
[B<-serverinfo val>]
|
||||
[B<-certform PEM|DER>]
|
||||
[B<-key infile>]
|
||||
[B<-keyform format>]
|
||||
[B<-pass val>]
|
||||
[B<-dcert infile>]
|
||||
[B<-dcertform PEM|DER>]
|
||||
[B<-dkey infile>]
|
||||
[B<-dkeyform PEM|DER>]
|
||||
[B<-dpass val>]
|
||||
[B<-context> I<val>]
|
||||
[B<-verify> I<int>]
|
||||
[B<-Verify> I<int>]
|
||||
[B<-cert> I<infile>]
|
||||
[B<-nameopt> I<val>]
|
||||
[B<-naccept> I<+int>]
|
||||
[B<-serverinfo> I<val>]
|
||||
[B<-certform> B<DER>|B<PEM>]
|
||||
[B<-key> I<infile>]
|
||||
[B<-keyform> I<format>]
|
||||
[B<-pass> I<val>]
|
||||
[B<-dcert> I<infile>]
|
||||
[B<-dcertform> B<DER>|B<PEM>]
|
||||
[B<-dkey> I<infile>]
|
||||
[B<-dkeyform> B<DER>|B<PEM>]
|
||||
[B<-dpass> I<val>]
|
||||
[B<-nbio_test>]
|
||||
[B<-crlf>]
|
||||
[B<-debug>]
|
||||
[B<-msg>]
|
||||
[B<-msgfile outfile>]
|
||||
[B<-msgfile> I<outfile>]
|
||||
[B<-state>]
|
||||
[B<-CAfile infile>]
|
||||
[B<-CApath dir>]
|
||||
[B<-CAfile> I<infile>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-nocert>]
|
||||
@@ -47,47 +47,47 @@ B<openssl> B<s_server>
|
||||
[B<-WWW>]
|
||||
[B<-servername>]
|
||||
[B<-servername_fatal>]
|
||||
[B<-cert2 infile>]
|
||||
[B<-key2 infile>]
|
||||
[B<-cert2> I<infile>]
|
||||
[B<-key2> I<infile>]
|
||||
[B<-tlsextdebug>]
|
||||
[B<-HTTP>]
|
||||
[B<-id_prefix val>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-keymatexport val>]
|
||||
[B<-keymatexportlen +int>]
|
||||
[B<-CRL infile>]
|
||||
[B<-id_prefix> I<val>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-keymatexport> I<val>]
|
||||
[B<-keymatexportlen> I<+int>]
|
||||
[B<-CRL> I<infile>]
|
||||
[B<-crl_download>]
|
||||
[B<-cert_chain infile>]
|
||||
[B<-dcert_chain infile>]
|
||||
[B<-chainCApath dir>]
|
||||
[B<-verifyCApath dir>]
|
||||
[B<-cert_chain> I<infile>]
|
||||
[B<-dcert_chain> I<infile>]
|
||||
[B<-chainCApath> I<dir>]
|
||||
[B<-verifyCApath> I<dir>]
|
||||
[B<-no_cache>]
|
||||
[B<-ext_cache>]
|
||||
[B<-CRLform PEM|DER>]
|
||||
[B<-CRLform> B<DER>|B<PEM>]
|
||||
[B<-verify_return_error>]
|
||||
[B<-verify_quiet>]
|
||||
[B<-build_chain>]
|
||||
[B<-chainCAfile infile>]
|
||||
[B<-verifyCAfile infile>]
|
||||
[B<-chainCAfile> I<infile>]
|
||||
[B<-verifyCAfile> I<infile>]
|
||||
[B<-ign_eof>]
|
||||
[B<-no_ign_eof>]
|
||||
[B<-status>]
|
||||
[B<-status_verbose>]
|
||||
[B<-status_timeout int>]
|
||||
[B<-status_url val>]
|
||||
[B<-status_file infile>]
|
||||
[B<-status_timeout> I<int>]
|
||||
[B<-status_url> I<val>]
|
||||
[B<-status_file> I<infile>]
|
||||
[B<-trace>]
|
||||
[B<-security_debug>]
|
||||
[B<-security_debug_verbose>]
|
||||
[B<-brief>]
|
||||
[B<-rev>]
|
||||
[B<-async>]
|
||||
[B<-ssl_config val>]
|
||||
[B<-max_send_frag +int>]
|
||||
[B<-split_send_frag +int>]
|
||||
[B<-max_pipelines +int>]
|
||||
[B<-read_buf +int>]
|
||||
[B<-ssl_config> I<val>]
|
||||
[B<-max_send_frag> I<+int>]
|
||||
[B<-split_send_frag> I<+int>]
|
||||
[B<-max_pipelines> I<+int>]
|
||||
[B<-read_buf> I<+int>]
|
||||
[B<-no_ssl3>]
|
||||
[B<-no_tls1>]
|
||||
[B<-no_tls1_1>]
|
||||
@@ -107,24 +107,24 @@ B<openssl> B<s_server>
|
||||
[B<-allow_no_dhe_kex>]
|
||||
[B<-prioritize_chacha>]
|
||||
[B<-strict>]
|
||||
[B<-sigalgs val>]
|
||||
[B<-client_sigalgs val>]
|
||||
[B<-groups val>]
|
||||
[B<-curves val>]
|
||||
[B<-named_curve val>]
|
||||
[B<-cipher val>]
|
||||
[B<-ciphersuites val>]
|
||||
[B<-dhparam infile>]
|
||||
[B<-record_padding val>]
|
||||
[B<-sigalgs> I<val>]
|
||||
[B<-client_sigalgs> I<val>]
|
||||
[B<-groups> I<val>]
|
||||
[B<-curves> I<val>]
|
||||
[B<-named_curve> I<val>]
|
||||
[B<-cipher> I<val>]
|
||||
[B<-ciphersuites> I<val>]
|
||||
[B<-dhparam> I<infile>]
|
||||
[B<-record_padding> I<val>]
|
||||
[B<-debug_broken_protocol>]
|
||||
[B<-policy val>]
|
||||
[B<-purpose val>]
|
||||
[B<-verify_name val>]
|
||||
[B<-verify_depth int>]
|
||||
[B<-auth_level int>]
|
||||
[B<-attime intmax>]
|
||||
[B<-verify_hostname val>]
|
||||
[B<-verify_email val>]
|
||||
[B<-policy> I<val>]
|
||||
[B<-purpose> I<val>]
|
||||
[B<-verify_name> I<val>]
|
||||
[B<-verify_depth> I<int>]
|
||||
[B<-auth_level> I<int>]
|
||||
[B<-attime> I<intmax>]
|
||||
[B<-verify_hostname> I<val>]
|
||||
[B<-verify_email> I<val>]
|
||||
[B<-verify_ip>]
|
||||
[B<-ignore_critical>]
|
||||
[B<-issuer_checks>]
|
||||
@@ -151,15 +151,15 @@ B<openssl> B<s_server>
|
||||
[B<-xcert>]
|
||||
[B<-xchain>]
|
||||
[B<-xchain_build>]
|
||||
[B<-xcertform PEM|DER>]
|
||||
[B<-xkeyform PEM|DER>]
|
||||
[B<-xcertform> B<DER>|B<PEM>]
|
||||
[B<-xkeyform> B<DER>|B<PEM>]
|
||||
[B<-nbio>]
|
||||
[B<-psk_identity val>]
|
||||
[B<-psk_hint val>]
|
||||
[B<-psk val>]
|
||||
[B<-psk_session file>]
|
||||
[B<-srpvfile infile>]
|
||||
[B<-srpuserseed val>]
|
||||
[B<-psk_identity> I<val>]
|
||||
[B<-psk_hint> I<val>]
|
||||
[B<-psk> I<val>]
|
||||
[B<-psk_session> I<file>]
|
||||
[B<-srpvfile> I<infile>]
|
||||
[B<-srpuserseed> I<val>]
|
||||
[B<-ssl3>]
|
||||
[B<-tls1>]
|
||||
[B<-tls1_1>]
|
||||
@@ -167,35 +167,44 @@ B<openssl> B<s_server>
|
||||
[B<-tls1_3>]
|
||||
[B<-dtls>]
|
||||
[B<-timeout>]
|
||||
[B<-mtu +int>]
|
||||
[B<-mtu> I<+int>]
|
||||
[B<-listen>]
|
||||
[B<-dtls1>]
|
||||
[B<-dtls1_2>]
|
||||
[B<-sctp>]
|
||||
[B<-sctp_label_bug>]
|
||||
[B<-no_dhe>]
|
||||
[B<-nextprotoneg val>]
|
||||
[B<-use_srtp val>]
|
||||
[B<-alpn val>]
|
||||
[B<-engine val>]
|
||||
[B<-keylogfile outfile>]
|
||||
[B<-max_early_data int>]
|
||||
[B<-nextprotoneg> I<val>]
|
||||
[B<-use_srtp> I<val>]
|
||||
[B<-alpn> I<val>]
|
||||
[B<-engine> I<val>]
|
||||
[B<-keylogfile> I<outfile>]
|
||||
[B<-max_early_data> I<int>]
|
||||
[B<-early_data>]
|
||||
[B<-anti_replay>]
|
||||
[B<-no_anti_replay>]
|
||||
[B<-http_server_binmode>]
|
||||
|
||||
=for openssl ifdef unix 4 6 unlink no_dhe nextprotoneg use_srtp engine
|
||||
|
||||
=for openssl ifdef status status_verbose status_timeout status_url status_file
|
||||
|
||||
=for openssl ifdef psk_hint srpvfile srpuserseed sctp sctp_label_bug
|
||||
|
||||
=for openssl ifdef sctp sctp_label_bug trace mtu timeout listen
|
||||
|
||||
=for openssl ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3 dtls mtu dtls1 dtls1_2
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<s_server> command implements a generic SSL/TLS server which listens
|
||||
for connections on a given port using SSL/TLS.
|
||||
This command implements a generic SSL/TLS server which
|
||||
listens for connections on a given port using SSL/TLS.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
In addition to the options below the B<s_server> utility also supports the
|
||||
common and server only options documented
|
||||
in the "Supported Command Line Commands" section of the L<SSL_CONF_cmd(3)>
|
||||
manual page.
|
||||
In addition to the options below, this command also supports
|
||||
the common and server only options documented
|
||||
L<SSL_CONF_cmd(3)/Supported Command Line Commands>
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -203,15 +212,15 @@ manual page.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-port +int>
|
||||
=item B<-port> I<+int>
|
||||
|
||||
The TCP port to listen on for connections. If not specified 4433 is used.
|
||||
|
||||
=item B<-accept val>
|
||||
=item B<-accept> I<val>
|
||||
|
||||
The optional TCP host and port to listen on for connections. If not specified, *:4433 is used.
|
||||
|
||||
=item B<-unix val>
|
||||
=item B<-unix> I<val>
|
||||
|
||||
Unix domain socket to accept on.
|
||||
|
||||
@@ -227,12 +236,12 @@ Use IPv6 only.
|
||||
|
||||
For -unix, unlink any existing socket first.
|
||||
|
||||
=item B<-context val>
|
||||
=item B<-context> I<val>
|
||||
|
||||
Sets the SSL context id. It can be given any string value. If this option
|
||||
is not present a default value will be used.
|
||||
|
||||
=item B<-verify int>, B<-Verify int>
|
||||
=item B<-verify> I<int>, B<-Verify> I<int>
|
||||
|
||||
The verify depth to use. This specifies the maximum length of the
|
||||
client certificate chain and makes the server request a certificate from
|
||||
@@ -243,12 +252,12 @@ must supply a certificate or an error occurs.
|
||||
If the cipher suite cannot request a client certificate (for example an
|
||||
anonymous cipher suite or PSK) this option has no effect.
|
||||
|
||||
=item B<-cert infile>
|
||||
=item B<-cert> I<infile>
|
||||
|
||||
The certificate to use, most servers cipher suites require the use of a
|
||||
certificate and some require a certificate with a certain public key type:
|
||||
for example the DSS cipher suites require a certificate containing a DSS
|
||||
(DSA) key. If not specified then the filename "server.pem" will be used.
|
||||
(DSA) key. If not specified then the filename F<server.pem> will be used.
|
||||
|
||||
=item B<-cert_chain>
|
||||
|
||||
@@ -261,19 +270,19 @@ B<-cert> option.
|
||||
Specify whether the application should build the certificate chain to be
|
||||
provided to the client.
|
||||
|
||||
=item B<-nameopt val>
|
||||
=item B<-nameopt> I<val>
|
||||
|
||||
Option which determines how the subject or issuer names are displayed. The
|
||||
B<val> argument can be a single option or multiple options separated by
|
||||
I<val> argument can be a single option or multiple options separated by
|
||||
commas. Alternatively the B<-nameopt> switch may be used more than once to
|
||||
set multiple options. See the L<x509(1)> manual page for details.
|
||||
set multiple options. See the L<openssl-x509(1)> manual page for details.
|
||||
|
||||
=item B<-naccept +int>
|
||||
=item B<-naccept> I<+int>
|
||||
|
||||
The server will exit after receiving the specified number of connections,
|
||||
default unlimited.
|
||||
|
||||
=item B<-serverinfo val>
|
||||
=item B<-serverinfo> I<val>
|
||||
|
||||
A file containing one or more blocks of PEM data. Each PEM block
|
||||
must encode a TLS ServerHello extension (2 bytes type, 2 bytes length,
|
||||
@@ -281,25 +290,25 @@ followed by "length" bytes of extension data). If the client sends
|
||||
an empty TLS ClientHello extension matching the type, the corresponding
|
||||
ServerHello extension will be returned.
|
||||
|
||||
=item B<-certform PEM|DER>
|
||||
=item B<-certform> B<DER>|B<PEM>
|
||||
|
||||
The certificate format to use: DER or PEM. PEM is the default.
|
||||
|
||||
=item B<-key infile>
|
||||
=item B<-key> I<infile>
|
||||
|
||||
The private key to use. If not specified then the certificate file will
|
||||
be used.
|
||||
|
||||
=item B<-keyform format>
|
||||
=item B<-keyform> I<format>
|
||||
|
||||
The private format to use: DER or PEM. PEM is the default.
|
||||
|
||||
=item B<-pass val>
|
||||
=item B<-pass> I<val>
|
||||
|
||||
The private key password source. For more information about the format of B<val>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-dcert infile>, B<-dkey infile>
|
||||
=item B<-dcert> I<infile>, B<-dkey> I<infile>
|
||||
|
||||
Specify an additional certificate and private key, these behave in the
|
||||
same manner as the B<-cert> and B<-key> options except there is no default
|
||||
@@ -316,11 +325,11 @@ A file containing trusted certificates to use when attempting to build the
|
||||
server certificate chain when a certificate specified via the B<-dcert> option
|
||||
is in use.
|
||||
|
||||
=item B<-dcertform PEM|DER>, B<-dkeyform PEM|DER>, B<-dpass val>
|
||||
=item B<-dcertform> B<DER>|B<PEM>, B<-dkeyform> B<DER>|B<PEM>, B<-dpass> I<val>
|
||||
|
||||
Additional certificate and private key format and passphrase respectively.
|
||||
|
||||
=item B<-xkey infile>, B<-xcert infile>, B<-xchain>
|
||||
=item B<-xkey> I<infile>, B<-xcert> I<infile>, B<-xchain>
|
||||
|
||||
Specify an extra certificate, private key and certificate chain. These behave
|
||||
in the same manner as the B<-cert>, B<-key> and B<-cert_chain> options. When
|
||||
@@ -330,10 +339,10 @@ the server.
|
||||
=item B<-xchain_build>
|
||||
|
||||
Specify whether the application should build the certificate chain to be
|
||||
provided to the client for the extra certificates provided via B<-xkey infile>,
|
||||
B<-xcert infile>, B<-xchain> options.
|
||||
provided to the client for the extra certificates provided via B<-xkey> I<infile>,
|
||||
B<-xcert> I<infile>, B<-xchain> options.
|
||||
|
||||
=item B<-xcertform PEM|DER>, B<-xkeyform PEM|DER>
|
||||
=item B<-xcertform> B<DER>|B<PEM>, B<-xkeyform> B<DER>|B<PEM>
|
||||
|
||||
Extra certificate and private key format respectively.
|
||||
|
||||
@@ -353,7 +362,7 @@ Print extensive debugging information including a hex dump of all traffic.
|
||||
|
||||
Show all protocol messages with hex dump.
|
||||
|
||||
=item B<-msgfile outfile>
|
||||
=item B<-msgfile> I<outfile>
|
||||
|
||||
File to send output of B<-msg> or B<-trace> to, default standard output.
|
||||
|
||||
@@ -361,37 +370,21 @@ File to send output of B<-msg> or B<-trace> to, default standard output.
|
||||
|
||||
Prints the SSL session states.
|
||||
|
||||
=item B<-CAfile infile>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
A file containing trusted certificates to use during client authentication
|
||||
and to use when attempting to build the server certificate chain. The list
|
||||
is also used in the list of acceptable client CAs passed to the client when
|
||||
a certificate is requested.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-CApath dir>
|
||||
|
||||
The directory to use for client certificate verification. This directory
|
||||
must be in "hash format", see L<verify(1)> for more information. These are
|
||||
also used when building the server certificate chain.
|
||||
|
||||
=item B<-chainCApath dir>
|
||||
=item B<-chainCApath> I<dir>
|
||||
|
||||
The directory to use for building the chain provided to the client. This
|
||||
directory must be in "hash format", see L<verify(1)> for more information.
|
||||
directory must be in "hash format", see L<openssl-verify(1)> for more
|
||||
information.
|
||||
|
||||
=item B<-chainCAfile file>
|
||||
=item B<-chainCAfile> I<file>
|
||||
|
||||
A file containing trusted certificates to use when attempting to build the
|
||||
server certificate chain.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location.
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location.
|
||||
|
||||
=item B<-nocert>
|
||||
|
||||
If this option is set then no certificate is used. This restricts the
|
||||
@@ -413,7 +406,7 @@ web browser. Cannot be used in conjunction with B<-early_data>.
|
||||
|
||||
Emulates a simple web server. Pages will be resolved relative to the
|
||||
current directory, for example if the URL https://myhost/page.html is
|
||||
requested the file ./page.html will be loaded. Cannot be used in conjunction
|
||||
requested the file F<./page.html> will be loaded. Cannot be used in conjunction
|
||||
with B<-early_data>.
|
||||
|
||||
=item B<-tlsextdebug>
|
||||
@@ -424,30 +417,21 @@ Print a hex dump of any TLS extensions received from the server.
|
||||
|
||||
Emulates a simple web server. Pages will be resolved relative to the
|
||||
current directory, for example if the URL https://myhost/page.html is
|
||||
requested the file ./page.html will be loaded. The files loaded are
|
||||
requested the file F<./page.html> will be loaded. The files loaded are
|
||||
assumed to contain a complete and correct HTTP response (lines that
|
||||
are part of the HTTP response line and headers must end with CRLF). Cannot be
|
||||
used in conjunction with B<-early_data>.
|
||||
|
||||
=item B<-id_prefix val>
|
||||
=item B<-id_prefix> I<val>
|
||||
|
||||
Generate SSL/TLS session IDs prefixed by B<val>. This is mostly useful
|
||||
Generate SSL/TLS session IDs prefixed by I<val>. This is mostly useful
|
||||
for testing any SSL/TLS code (eg. proxies) that wish to deal with multiple
|
||||
servers, when each of which might be generating a unique range of session
|
||||
IDs (eg. with a certain prefix).
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item B<-verify_return_error>
|
||||
|
||||
@@ -464,17 +448,17 @@ Enables certificate status request support (aka OCSP stapling).
|
||||
Enables certificate status request support (aka OCSP stapling) and gives
|
||||
a verbose printout of the OCSP response.
|
||||
|
||||
=item B<-status_timeout int>
|
||||
=item B<-status_timeout> I<int>
|
||||
|
||||
Sets the timeout for OCSP response to B<int> seconds.
|
||||
Sets the timeout for OCSP response to I<int> seconds.
|
||||
|
||||
=item B<-status_url val>
|
||||
=item B<-status_url> I<val>
|
||||
|
||||
Sets a fallback responder URL to use if no responder URL is present in the
|
||||
server certificate. Without this option an error is returned if the server
|
||||
certificate does not contain a responder address.
|
||||
|
||||
=item B<-status_file infile>
|
||||
=item B<-status_file> I<infile>
|
||||
|
||||
Overrides any OCSP responder URLs from the certificate and always provides the
|
||||
OCSP Response stored in the file. The file must be in DER format.
|
||||
@@ -502,12 +486,12 @@ asynchronously. This will only have an effect if an asynchronous capable engine
|
||||
is also used via the B<-engine> option. For test purposes the dummy async engine
|
||||
(dasync) can be used (if available).
|
||||
|
||||
=item B<-max_send_frag +int>
|
||||
=item B<-max_send_frag> I<+int>
|
||||
|
||||
The maximum size of data fragment to send.
|
||||
See L<SSL_CTX_set_max_send_fragment(3)> for further information.
|
||||
|
||||
=item B<-split_send_frag +int>
|
||||
=item B<-split_send_frag> I<+int>
|
||||
|
||||
The size used to split data for encrypt pipelines. If more data is written in
|
||||
one go than this value then it will be split into multiple pipelines, up to the
|
||||
@@ -516,14 +500,14 @@ a suitable cipher suite has been negotiated, an engine that supports pipelining
|
||||
has been loaded, and max_pipelines is greater than 1. See
|
||||
L<SSL_CTX_set_split_send_fragment(3)> for further information.
|
||||
|
||||
=item B<-max_pipelines +int>
|
||||
=item B<-max_pipelines> I<+int>
|
||||
|
||||
The maximum number of encrypt/decrypt pipelines to be used. This will only have
|
||||
an effect if an engine has been loaded that supports pipelining (e.g. the dasync
|
||||
engine) and a suitable cipher suite has been negotiated. The default value is 1.
|
||||
See L<SSL_CTX_set_max_pipelines(3)> for further information.
|
||||
|
||||
=item B<-read_buf +int>
|
||||
=item B<-read_buf> I<+int>
|
||||
|
||||
The default read buffer size to be used for connections. This will only have an
|
||||
effect if the buffer size is larger than the size that would otherwise be used
|
||||
@@ -533,8 +517,8 @@ further information).
|
||||
=item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3>
|
||||
|
||||
These options require or disable the use of the specified SSL or TLS protocols.
|
||||
By default B<s_server> will negotiate the highest mutually supported protocol
|
||||
version.
|
||||
By default, this command will negotiate the highest mutually supported
|
||||
protocol version.
|
||||
When a specific TLS version is required, only that version will be accepted
|
||||
from the client.
|
||||
Note that not all protocols and flags may be available, depending on how
|
||||
@@ -581,44 +565,44 @@ Prioritize ChaCha ciphers when preferred by clients. Requires B<-serverpref>.
|
||||
|
||||
Set the B<SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION> option.
|
||||
|
||||
=item B<-client_sigalgs val>
|
||||
=item B<-client_sigalgs> I<val>
|
||||
|
||||
Signature algorithms to support for client certificate authentication
|
||||
(colon-separated list).
|
||||
|
||||
=item B<-named_curve val>
|
||||
=item B<-named_curve> I<val>
|
||||
|
||||
Specifies the elliptic curve to use. NOTE: this is single curve, not a list.
|
||||
For a list of all possible curves, use:
|
||||
|
||||
$ openssl ecparam -list_curves
|
||||
|
||||
=item B<-cipher val>
|
||||
=item B<-cipher> I<val>
|
||||
|
||||
This allows the list of TLSv1.2 and below ciphersuites used by the server to be
|
||||
modified. This list is combined with any TLSv1.3 ciphersuites that have been
|
||||
configured. When the client sends a list of supported ciphers the first client
|
||||
cipher also included in the server list is used. Because the client specifies
|
||||
the preference order, the order of the server cipherlist is irrelevant. See
|
||||
the B<ciphers> command for more information.
|
||||
L<openssl-ciphers(1)> for more information.
|
||||
|
||||
=item B<-ciphersuites val>
|
||||
=item B<-ciphersuites> I<val>
|
||||
|
||||
This allows the list of TLSv1.3 ciphersuites used by the server to be modified.
|
||||
This list is combined with any TLSv1.2 and below ciphersuites that have been
|
||||
configured. When the client sends a list of supported ciphers the first client
|
||||
cipher also included in the server list is used. Because the client specifies
|
||||
the preference order, the order of the server cipherlist is irrelevant. See
|
||||
the B<ciphers> command for more information. The format for this list is a
|
||||
simple colon (":") separated list of TLSv1.3 ciphersuite names.
|
||||
L<openssl-ciphers(1)> command for more information. The format for this list is
|
||||
a simple colon (":") separated list of TLSv1.3 ciphersuite names.
|
||||
|
||||
=item B<-dhparam infile>
|
||||
=item B<-dhparam> I<infile>
|
||||
|
||||
The DH parameter file to use. The ephemeral DH cipher suites generate keys
|
||||
using a set of DH parameters. If not specified then an attempt is made to
|
||||
load the parameters from the server certificate file.
|
||||
If this fails then a static set of parameters hard coded into the B<s_server>
|
||||
program will be used.
|
||||
If this fails then a static set of parameters hard coded into this command
|
||||
will be used.
|
||||
|
||||
=item B<-attime>, B<-check_ss_sig>, B<-crl_check>, B<-crl_check_all>,
|
||||
B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>, B<-inhibit_any>,
|
||||
@@ -629,7 +613,7 @@ B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,
|
||||
B<-verify_ip>, B<-verify_name>, B<-x509_strict>
|
||||
|
||||
Set different peer certificate verification options.
|
||||
See the L<verify(1)> manual page for details.
|
||||
See the L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=item B<-crl_check>, B<-crl_check_all>
|
||||
|
||||
@@ -641,44 +625,45 @@ option all CRLs of all CAs in the chain are checked.
|
||||
|
||||
Turns on non blocking I/O.
|
||||
|
||||
=item B<-psk_identity val>
|
||||
=item B<-psk_identity> I<val>
|
||||
|
||||
Expect the client to send PSK identity B<val> when using a PSK
|
||||
Expect the client to send PSK identity I<val> when using a PSK
|
||||
cipher suite, and warn if they do not. By default, the expected PSK
|
||||
identity is the string "Client_identity".
|
||||
|
||||
=item B<-psk_hint val>
|
||||
=item B<-psk_hint> I<val>
|
||||
|
||||
Use the PSK identity hint B<val> when using a PSK cipher suite.
|
||||
Use the PSK identity hint I<val> when using a PSK cipher suite.
|
||||
|
||||
=item B<-psk val>
|
||||
=item B<-psk> I<val>
|
||||
|
||||
Use the PSK key B<val> when using a PSK cipher suite. The key is
|
||||
Use the PSK key I<val> when using a PSK cipher suite. The key is
|
||||
given as a hexadecimal number without leading 0x, for example -psk
|
||||
1a2b3c4d.
|
||||
This option must be provided in order to use a PSK cipher.
|
||||
|
||||
=item B<-psk_session file>
|
||||
=item B<-psk_session> I<file>
|
||||
|
||||
Use the pem encoded SSL_SESSION data stored in B<file> as the basis of a PSK.
|
||||
Use the pem encoded SSL_SESSION data stored in I<file> as the basis of a PSK.
|
||||
Note that this will only work if TLSv1.3 is negotiated.
|
||||
|
||||
=item B<-listen>
|
||||
|
||||
This option can only be used in conjunction with one of the DTLS options above.
|
||||
With this option B<s_server> will listen on a UDP port for incoming connections.
|
||||
With this option, this command will listen on a UDP port for incoming
|
||||
connections.
|
||||
Any ClientHellos that arrive will be checked to see if they have a cookie in
|
||||
them or not.
|
||||
Any without a cookie will be responded to with a HelloVerifyRequest.
|
||||
If a ClientHello with a cookie is received then B<s_server> will connect to
|
||||
that peer and complete the handshake.
|
||||
If a ClientHello with a cookie is received then this command will
|
||||
connect to that peer and complete the handshake.
|
||||
|
||||
=item B<-dtls>, B<-dtls1>, B<-dtls1_2>
|
||||
|
||||
These options make B<s_server> use DTLS protocols instead of TLS.
|
||||
With B<-dtls>, B<s_server> will negotiate any supported DTLS protocol version,
|
||||
whilst B<-dtls1> and B<-dtls1_2> will only support DTLSv1.0 and DTLSv1.2
|
||||
respectively.
|
||||
These options make this command use DTLS protocols instead of TLS.
|
||||
With B<-dtls>, it will negotiate any supported DTLS protocol
|
||||
version, whilst B<-dtls1> and B<-dtls1_2> will only support DTLSv1.0 and
|
||||
DTLSv1.2 respectively.
|
||||
|
||||
=item B<-sctp>
|
||||
|
||||
@@ -699,30 +684,30 @@ available where OpenSSL has support for SCTP enabled.
|
||||
If this option is set then no DH parameters will be loaded effectively
|
||||
disabling the ephemeral DH cipher suites.
|
||||
|
||||
=item B<-alpn val>, B<-nextprotoneg val>
|
||||
=item B<-alpn> I<val>, B<-nextprotoneg> I<val>
|
||||
|
||||
These flags enable the Enable the Application-Layer Protocol Negotiation
|
||||
or Next Protocol Negotiation (NPN) extension, respectively. ALPN is the
|
||||
IETF standard and replaces NPN.
|
||||
The B<val> list is a comma-separated list of supported protocol
|
||||
The I<val> list is a comma-separated list of supported protocol
|
||||
names. The list should contain the most desirable protocols first.
|
||||
Protocol names are printable ASCII strings, for example "http/1.1" or
|
||||
"spdy/3".
|
||||
The flag B<-nextprotoneg> cannot be specified if B<-tls1_3> is used.
|
||||
|
||||
=item B<-engine val>
|
||||
=item B<-engine> I<val>
|
||||
|
||||
Specifying an engine (by its unique id string in B<val>) will cause B<s_server>
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
Specifying an engine (by its unique id string in I<val>) will cause
|
||||
this command to attempt to obtain a functional reference to the
|
||||
specified engine, thus initialising it if needed. The engine will then be
|
||||
set as the default for all available algorithms.
|
||||
|
||||
=item B<-keylogfile outfile>
|
||||
=item B<-keylogfile> I<outfile>
|
||||
|
||||
Appends TLS secrets to the specified keylog file such that external programs
|
||||
(like Wireshark) can decrypt TLS connections.
|
||||
|
||||
=item B<-max_early_data int>
|
||||
=item B<-max_early_data> I<int>
|
||||
|
||||
Change the default maximum early data bytes that are specified for new sessions
|
||||
and any incoming early data (when used in conjunction with the B<-early_data>
|
||||
@@ -804,8 +789,8 @@ Send a certificate request to the client (TLSv1.3 only)
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
B<s_server> can be used to debug SSL clients. To accept connections from
|
||||
a web browser the command:
|
||||
This command can be used to debug SSL clients. To accept connections
|
||||
from a web browser the command:
|
||||
|
||||
openssl s_server -accept 443 -www
|
||||
|
||||
@@ -815,20 +800,20 @@ Although specifying an empty list of CAs when requesting a client certificate
|
||||
is strictly speaking a protocol violation, some SSL clients interpret this to
|
||||
mean any CA is acceptable. This is useful for debugging purposes.
|
||||
|
||||
The session parameters can printed out using the B<sess_id> program.
|
||||
The session parameters can printed out using the L<openssl-sess_id(1)> command.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Because this program has a lot of options and also because some of the
|
||||
techniques used are rather old, the C source of B<s_server> is rather hard to
|
||||
read and not a model of how things should be done.
|
||||
techniques used are rather old, the C source for this command is rather
|
||||
hard to read and not a model of how things should be done.
|
||||
A typical SSL server program would be much simpler.
|
||||
|
||||
The output of common ciphers is wrong: it just gives the list of ciphers that
|
||||
OpenSSL recognizes and the client supports.
|
||||
|
||||
There should be a way for the B<s_server> program to print out details of any
|
||||
unknown cipher suites a client says it supports.
|
||||
There should be a way for this command to print out details
|
||||
of any unknown cipher suites a client says it supports.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
+54
-59
@@ -8,35 +8,38 @@ openssl-s_time - SSL/TLS performance timing program
|
||||
|
||||
B<openssl> B<s_time>
|
||||
[B<-help>]
|
||||
[B<-connect host:port>]
|
||||
[B<-www page>]
|
||||
[B<-cert filename>]
|
||||
[B<-key filename>]
|
||||
[B<-CApath directory>]
|
||||
[B<-cafile filename>]
|
||||
[B<-connect> I<host>:I<port>]
|
||||
[B<-www> I<page>]
|
||||
[B<-cert> I<filename>]
|
||||
[B<-key> I<filename>]
|
||||
[B<-CApath> I<directory>]
|
||||
[B<-cafile> I<filename>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-reuse>]
|
||||
[B<-new>]
|
||||
[B<-verify depth>]
|
||||
[B<-nameopt option>]
|
||||
[B<-time seconds>]
|
||||
[B<-verify> I<depth>]
|
||||
[B<-nameopt> I<option>]
|
||||
[B<-time> I<seconds>]
|
||||
[B<-ssl3>]
|
||||
[B<-tls1>]
|
||||
[B<-tls1_1>]
|
||||
[B<-tls1_2>]
|
||||
[B<-tls1_3>]
|
||||
[B<-bugs>]
|
||||
[B<-cipher cipherlist>]
|
||||
[B<-ciphersuites val>]
|
||||
[B<-cipher> I<cipherlist>]
|
||||
[B<-ciphersuites> I<val>]
|
||||
|
||||
=for openssl ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<s_time> command implements a generic SSL/TLS client which connects to a
|
||||
remote host using SSL/TLS. It can request a page from the server and includes
|
||||
the time to transfer the payload data in its timing measurements. It measures
|
||||
the number of connections within a given timeframe, the amount of data
|
||||
transferred (if any), and calculates the average time spent for one connection.
|
||||
This command implements a generic SSL/TLS client which
|
||||
connects to a remote host using SSL/TLS. It can request a page from the server
|
||||
and includes the time to transfer the payload data in its timing measurements.
|
||||
It measures the number of connections within a given timeframe, the amount of
|
||||
data transferred (if any), and calculates the average time spent for one
|
||||
connection.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -46,28 +49,28 @@ transferred (if any), and calculates the average time spent for one connection.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-connect host:port>
|
||||
=item B<-connect> I<host>:I<port>
|
||||
|
||||
This specifies the host and optional port to connect to.
|
||||
|
||||
=item B<-www page>
|
||||
=item B<-www> I<page>
|
||||
|
||||
This specifies the page to GET from the server. A value of '/' gets the
|
||||
index.htm[l] page. If this parameter is not specified, then B<s_time> will only
|
||||
perform the handshake to establish SSL connections but not transfer any
|
||||
payload data.
|
||||
F<index.html> page. If this parameter is not specified, then this command
|
||||
will only perform the handshake to establish SSL connections but not transfer
|
||||
any payload data.
|
||||
|
||||
=item B<-cert certname>
|
||||
=item B<-cert> I<certname>
|
||||
|
||||
The certificate to use, if one is requested by the server. The default is
|
||||
not to use a certificate. The file is in PEM format.
|
||||
|
||||
=item B<-key keyfile>
|
||||
=item B<-key> I<keyfile>
|
||||
|
||||
The private key to use. If not specified then the certificate file will
|
||||
be used. The file is in PEM format.
|
||||
|
||||
=item B<-verify depth>
|
||||
=item B<-verify> I<depth>
|
||||
|
||||
The verify depth to use. This specifies the maximum length of the
|
||||
server certificate chain and turns on server certificate verification.
|
||||
@@ -75,31 +78,22 @@ Currently the verify operation continues after errors so all the problems
|
||||
with a certificate chain can be seen. As a side effect the connection
|
||||
will never fail due to a server certificate verify failure.
|
||||
|
||||
=item B<-nameopt option>
|
||||
=item B<-nameopt> I<option>
|
||||
|
||||
Option which determines how the subject or issuer names are displayed. The
|
||||
B<option> argument can be a single option or multiple options separated by
|
||||
I<option> argument can be a single option or multiple options separated by
|
||||
commas. Alternatively the B<-nameopt> switch may be used more than once to
|
||||
set multiple options. See the L<x509(1)> manual page for details.
|
||||
set multiple options. See the L<openssl-x509(1)> manual page for details.
|
||||
|
||||
=item B<-CApath directory>
|
||||
=item B<-CApath> I<directory>
|
||||
|
||||
The directory to use for server certificate verification. This directory
|
||||
must be in "hash format", see B<verify> for more information. These are
|
||||
also used when building the client certificate chain.
|
||||
must be in "hash format", see L<openssl-verify(1)> for more information.
|
||||
These are also used when building the client certificate chain.
|
||||
|
||||
=item B<-CAfile file>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
A file containing trusted certificates to use during server authentication
|
||||
and to use when attempting to build the client certificate chain.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-new>
|
||||
|
||||
@@ -116,8 +110,8 @@ specified, they are both on by default and executed in sequence.
|
||||
=item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>
|
||||
|
||||
These options enable specific SSL or TLS protocol versions for the handshake
|
||||
initiated by B<s_time>.
|
||||
By default B<s_time> negotiates the highest mutually supported protocol
|
||||
initiated by this command.
|
||||
By default, it negotiates the highest mutually supported protocol
|
||||
version.
|
||||
Note that not all protocols and flags may be available, depending on how
|
||||
OpenSSL was built.
|
||||
@@ -127,40 +121,41 @@ OpenSSL was built.
|
||||
There are several known bugs in SSL and TLS implementations. Adding this
|
||||
option enables various workarounds.
|
||||
|
||||
=item B<-cipher cipherlist>
|
||||
=item B<-cipher> I<cipherlist>
|
||||
|
||||
This allows the TLSv1.2 and below cipher list sent by the client to be modified.
|
||||
This list will be combined with any TLSv1.3 ciphersuites that have been
|
||||
configured. Although the server determines which cipher suite is used it should
|
||||
take the first supported cipher in the list sent by the client. See
|
||||
L<ciphers(1)> for more information.
|
||||
L<openssl-ciphers(1)> for more information.
|
||||
|
||||
=item B<-ciphersuites val>
|
||||
=item B<-ciphersuites> I<val>
|
||||
|
||||
This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
|
||||
list will be combined with any TLSv1.2 and below ciphersuites that have been
|
||||
configured. Although the server determines which cipher suite is used it should
|
||||
take the first supported cipher in the list sent by the client. See
|
||||
L<ciphers(1)> for more information. The format for this list is a simple
|
||||
colon (":") separated list of TLSv1.3 ciphersuite names.
|
||||
L<openssl-ciphers(1)> for more information. The format for this list is a
|
||||
simple colon (":") separated list of TLSv1.3 ciphersuite names.
|
||||
|
||||
=item B<-time length>
|
||||
=item B<-time> I<length>
|
||||
|
||||
Specifies how long (in seconds) B<s_time> should establish connections and
|
||||
optionally transfer payload data from a server. Server and client performance
|
||||
and the link speed determine how many connections B<s_time> can establish.
|
||||
Specifies how long (in seconds) this command should establish connections
|
||||
and optionally transfer payload data from a server. Server and client
|
||||
performance and the link speed determine how many connections it
|
||||
can establish.
|
||||
|
||||
=back
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
B<s_time> can be used to measure the performance of an SSL connection.
|
||||
This command can be used to measure the performance of an SSL connection.
|
||||
To connect to an SSL HTTP server and get the default page the command
|
||||
|
||||
openssl s_time -connect servername:443 -www / -CApath yourdir -CAfile yourfile.pem -cipher commoncipher [-ssl3]
|
||||
|
||||
would typically be used (https uses port 443). 'commoncipher' is a cipher to
|
||||
which both client and server can agree, see the L<ciphers(1)> command
|
||||
would typically be used (https uses port 443). I<commoncipher> is a cipher to
|
||||
which both client and server can agree, see the L<openssl-ciphers(1)> command
|
||||
for details.
|
||||
|
||||
If the handshake fails then there are several possible causes, if it is
|
||||
@@ -173,10 +168,10 @@ A frequent problem when attempting to get client certificates working
|
||||
is that a web client complains it has no certificates or gives an empty
|
||||
list to choose from. This is normally because the server is not sending
|
||||
the clients certificate authority in its "acceptable CA list" when it
|
||||
requests a certificate. By using L<s_client(1)> the CA list can be
|
||||
requests a certificate. By using L<openssl-s_client(1)> the CA list can be
|
||||
viewed and checked. However some servers only request client authentication
|
||||
after a specific URL is requested. To obtain the list in this case it
|
||||
is necessary to use the B<-prexit> option of L<s_client(1)> and
|
||||
is necessary to use the B<-prexit> option of L<openssl-s_client(1)> and
|
||||
send an HTTP request for an appropriate page.
|
||||
|
||||
If a certificate is specified on the command line using the B<-cert>
|
||||
@@ -187,8 +182,8 @@ on the command line is no guarantee that the certificate works.
|
||||
=head1 BUGS
|
||||
|
||||
Because this program does not have all the options of the
|
||||
L<s_client(1)> program to turn protocols on and off, you may not be
|
||||
able to measure the performance of all protocols with all servers.
|
||||
L<openssl-s_client(1)> program to turn protocols on and off, you may not
|
||||
be able to measure the performance of all protocols with all servers.
|
||||
|
||||
The B<-verify> option should really exit if the server verification
|
||||
fails.
|
||||
|
||||
@@ -8,21 +8,21 @@ openssl-sess_id - SSL/TLS session handling utility
|
||||
|
||||
B<openssl> B<sess_id>
|
||||
[B<-help>]
|
||||
[B<-inform PEM|DER>]
|
||||
[B<-outform PEM|DER|NSS>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>|B<NSS>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-text>]
|
||||
[B<-noout>]
|
||||
[B<-context ID>]
|
||||
[B<-context> I<ID>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<sess_id> process the encoded version of the SSL session structure
|
||||
and optionally prints out SSL session details (for example the SSL session
|
||||
master key) in human readable format. Since this is a diagnostic tool that
|
||||
needs some knowledge of the SSL protocol to use properly, most users will
|
||||
not need to use it.
|
||||
This command processes the encoded version of the SSL session
|
||||
structure and optionally prints out SSL session details (for example
|
||||
the SSL session master key) in human readable format. Since this is a
|
||||
diagnostic tool that needs some knowledge of the SSL protocol to use
|
||||
properly, most users will not need to use it.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -32,25 +32,25 @@ not need to use it.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format. The B<DER> option uses an ASN1 DER encoded
|
||||
format containing session details. The precise format can vary from one version
|
||||
to the next. The B<PEM> form is the default format: it consists of the B<DER>
|
||||
format base64 encoded with additional header and footer lines.
|
||||
|
||||
=item B<-outform DER|PEM|NSS>
|
||||
=item B<-outform> B<DER>|B<PEM>|B<NSS>
|
||||
|
||||
This specifies the output format. The B<PEM> and B<DER> options have the same meaning
|
||||
and default as the B<-inform> option. The B<NSS> option outputs the session id and
|
||||
the master key in NSS keylog format.
|
||||
This specifies the output format. The B<PEM> and B<DER> options have the same
|
||||
meaning and default as the B<-inform> option. The B<NSS> option outputs the
|
||||
session id and the master key in NSS keylog format.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read session information from or standard
|
||||
input by default.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write session information to or standard
|
||||
output if this option is not specified.
|
||||
@@ -69,7 +69,7 @@ if the B<-text> option is also present then it will be printed out in text form.
|
||||
|
||||
This option prevents output of the encoded version of the session.
|
||||
|
||||
=item B<-context ID>
|
||||
=item B<-context> I<ID>
|
||||
|
||||
This option can set the session id so the output session information uses the
|
||||
supplied ID. The ID can be any string of characters. This option won't normally
|
||||
|
||||
+58
-80
@@ -17,12 +17,12 @@ B<openssl> B<smime>
|
||||
[B<-binary>]
|
||||
[B<-crlfeol>]
|
||||
[B<-I<cipher>>]
|
||||
[B<-in file>]
|
||||
[B<-CAfile file>]
|
||||
[B<-CApath dir>]
|
||||
[B<-in> I<file>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-attime timestamp>]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
@@ -32,48 +32,50 @@ B<openssl> B<smime>
|
||||
[B<-inhibit_any>]
|
||||
[B<-inhibit_map>]
|
||||
[B<-partial_chain>]
|
||||
[B<-policy arg>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-policy_check>]
|
||||
[B<-policy_print>]
|
||||
[B<-purpose purpose>]
|
||||
[B<-purpose> I<purpose>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-trusted_first>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-use_deltas>]
|
||||
[B<-auth_level num>]
|
||||
[B<-verify_depth num>]
|
||||
[B<-verify_email email>]
|
||||
[B<-verify_hostname hostname>]
|
||||
[B<-verify_ip ip>]
|
||||
[B<-verify_name name>]
|
||||
[B<-auth_level> I<num>]
|
||||
[B<-verify_depth> I<num>]
|
||||
[B<-verify_email> I<email>]
|
||||
[B<-verify_hostname> I<hostname>]
|
||||
[B<-verify_ip> I<ip>]
|
||||
[B<-verify_name> I<name>]
|
||||
[B<-x509_strict>]
|
||||
[B<-certfile file>]
|
||||
[B<-signer file>]
|
||||
[B<-recip file>]
|
||||
[B<-inform SMIME|PEM|DER>]
|
||||
[B<-passin arg>]
|
||||
[B<-inkey file_or_id>]
|
||||
[B<-out file>]
|
||||
[B<-outform SMIME|PEM|DER>]
|
||||
[B<-content file>]
|
||||
[B<-to addr>]
|
||||
[B<-from ad>]
|
||||
[B<-subject s>]
|
||||
[B<-certfile> I<file>]
|
||||
[B<-signer> I<file>]
|
||||
[B<-recip> I< file>]
|
||||
[B<-inform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-inkey> I<file_or_id>]
|
||||
[B<-out> I<file>]
|
||||
[B<-outform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-content> I<file>]
|
||||
[B<-to> I<addr>]
|
||||
[B<-from> I<ad>]
|
||||
[B<-subject> I<s>]
|
||||
[B<-text>]
|
||||
[B<-indef>]
|
||||
[B<-noindef>]
|
||||
[B<-stream>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-md digest>]
|
||||
[cert.pem]...
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-md> I<digest>]
|
||||
I<cert.pem> ...
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<smime> command handles S/MIME mail. It can encrypt, decrypt, sign and
|
||||
verify S/MIME messages.
|
||||
This command handles S/MIME mail. It can encrypt, decrypt, sign
|
||||
and verify S/MIME messages.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -119,12 +121,12 @@ Takes an input message and writes out a PEM encoded PKCS#7 structure.
|
||||
|
||||
Resign a message: take an existing message and one or more new signers.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
The input message to be encrypted or signed or the MIME message to
|
||||
be decrypted or verified.
|
||||
|
||||
=item B<-inform SMIME|PEM|DER>
|
||||
=item B<-inform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
This specifies the input format for the PKCS#7 structure. The default
|
||||
is B<SMIME> which reads an S/MIME format message. B<PEM> and B<DER>
|
||||
@@ -133,12 +135,12 @@ instead. This currently only affects the input format of the PKCS#7
|
||||
structure, if no PKCS#7 structure is being input (for example with
|
||||
B<-encrypt> or B<-sign>) this option has no effect.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
The message text that has been decrypted or verified or the output MIME
|
||||
format message that has been signed or verified.
|
||||
|
||||
=item B<-outform SMIME|PEM|DER>
|
||||
=item B<-outform> B<DER>|B<PEM>|B<SMIME>
|
||||
|
||||
This specifies the output format for the PKCS#7 structure. The default
|
||||
is B<SMIME> which write an S/MIME format message. B<PEM> and B<DER>
|
||||
@@ -147,7 +149,7 @@ instead. This currently only affects the output format of the PKCS#7
|
||||
structure, if no PKCS#7 structure is being output (for example with
|
||||
B<-verify> or B<-decrypt>) this option has no effect.
|
||||
|
||||
=item B<-stream -indef -noindef>
|
||||
=item B<-stream>, B<-indef>, B<-noindef>
|
||||
|
||||
The B<-stream> and B<-indef> options are equivalent and enable streaming I/O
|
||||
for encoding operations. This permits single pass processing of data without
|
||||
@@ -162,7 +164,7 @@ Disable streaming I/O where it would produce and indefinite length constructed
|
||||
encoding. This option currently has no effect. In future streaming will be
|
||||
enabled by default on all relevant operations and this option will disable it.
|
||||
|
||||
=item B<-content filename>
|
||||
=item B<-content> I<filename>
|
||||
|
||||
This specifies a file containing the detached content, this is only
|
||||
useful with the B<-verify> command. This is only usable if the PKCS#7
|
||||
@@ -177,26 +179,11 @@ message if encrypting or signing. If decrypting or verifying it strips
|
||||
off text headers: if the decrypted or verified message is not of MIME
|
||||
type text/plain then an error occurs.
|
||||
|
||||
=item B<-CAfile file>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
A file containing trusted CA certificates, only used with B<-verify>.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-CApath dir>
|
||||
|
||||
A directory containing trusted CA certificates, only used with
|
||||
B<-verify>. This directory must be a standard certificate directory: that
|
||||
is a hash of each subject name (using B<x509 -hash>) should be linked
|
||||
to each certificate.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location.
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location.
|
||||
|
||||
=item B<-md digest>
|
||||
=item B<-md> I<digest>
|
||||
|
||||
Digest algorithm to use when signing or resigning. If not present then the
|
||||
default digest algorithm for the signing key will be used (usually SHA1).
|
||||
@@ -206,7 +193,7 @@ default digest algorithm for the signing key will be used (usually SHA1).
|
||||
The encryption algorithm to use. For example DES (56 bits) - B<-des>,
|
||||
triple DES (168 bits) - B<-des3>,
|
||||
EVP_get_cipherbyname() function) can also be used preceded by a dash, for
|
||||
example B<-aes-128-cbc>. See L<B<enc>|enc(1)> for list of ciphers
|
||||
example B<-aes-128-cbc>. See L<openssl-enc(1)> for list of ciphers
|
||||
supported by your version of OpenSSL.
|
||||
|
||||
If not specified triple DES is used. Only used with B<-encrypt>.
|
||||
@@ -263,25 +250,25 @@ to translation by mail relays but it cannot be read by mail agents that
|
||||
do not support S/MIME. Without this option cleartext signing with
|
||||
the MIME type multipart/signed is used.
|
||||
|
||||
=item B<-certfile file>
|
||||
=item B<-certfile> I<file>
|
||||
|
||||
Allows additional certificates to be specified. When signing these will
|
||||
be included with the message. When verifying these will be searched for
|
||||
the signers certificates. The certificates should be in PEM format.
|
||||
|
||||
=item B<-signer file>
|
||||
=item B<-signer> I<file>
|
||||
|
||||
A signing certificate when signing or resigning a message, this option can be
|
||||
used multiple times if more than one signer is required. If a message is being
|
||||
verified then the signers certificates will be written to this file if the
|
||||
verification was successful.
|
||||
|
||||
=item B<-recip file>
|
||||
=item B<-recip> I<file>
|
||||
|
||||
The recipients certificate when decrypting a message. This certificate
|
||||
must match one of the recipients of the message or an error occurs.
|
||||
|
||||
=item B<-inkey file_or_id>
|
||||
=item B<-inkey> I<file_or_id>
|
||||
|
||||
The private key to use when signing or decrypting. This must match the
|
||||
corresponding certificate. If this option is not specified then the
|
||||
@@ -291,30 +278,16 @@ multiple times to specify successive keys.
|
||||
If no engine is used, the argument is taken as a file; if an engine is
|
||||
specified, the argument is given to the engine as a key identifier.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The private key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The private key password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<cert.pem...>
|
||||
|
||||
One or more certificates of message recipients: used when encrypting
|
||||
a message.
|
||||
|
||||
=item B<-to, -from, -subject>
|
||||
=item B<-to>, B<-from>, B<-subject>
|
||||
|
||||
The relevant mail headers. These are included outside the signed
|
||||
portion of a message so they may be included manually. If signing
|
||||
@@ -330,7 +303,12 @@ B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,
|
||||
B<-verify_ip>, B<-verify_name>, B<-x509_strict>
|
||||
|
||||
Set various options of certificate chain verification. See
|
||||
L<verify(1)> manual page for details.
|
||||
L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=item I<cert.pem> ...
|
||||
|
||||
One or more certificates of message recipients, used when encrypting
|
||||
a message.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
+34
-40
@@ -8,25 +8,27 @@ openssl-speed - test library performance
|
||||
|
||||
B<openssl speed>
|
||||
[B<-help>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-elapsed>]
|
||||
[B<-evp algo>]
|
||||
[B<-hmac algo>]
|
||||
[B<-cmac algo>]
|
||||
[B<-evp> I<algo>]
|
||||
[B<-hmac> I<algo>]
|
||||
[B<-cmac> I<algo>]
|
||||
[B<-decrypt>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-primes num>]
|
||||
[B<-seconds num>]
|
||||
[B<-bytes num>]
|
||||
[B<algorithm...>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-primes> I<num>]
|
||||
[B<-seconds> I<num>]
|
||||
[B<-bytes> I<num>]
|
||||
[I<algorithm> ...]
|
||||
|
||||
=for openssl ifdef cmac multi async_jobs engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This command is used to test the performance of cryptographic algorithms.
|
||||
To see the list of supported algorithms, use the I<list --digest-commands>
|
||||
or I<list --cipher-commands> command. The global CSPRNG is denoted by
|
||||
the I<rand> algorithm name.
|
||||
To see the list of supported algorithms, use C<openssl list -digest-commands>
|
||||
or C<openssl list -cipher-commands> command. The global CSPRNG is denoted by
|
||||
the B<rand> algorithm name.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -36,9 +38,9 @@ the I<rand> algorithm name.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<speed>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -49,54 +51,46 @@ When calculating operations- or bytes-per-second, use wall-clock time
|
||||
instead of CPU user time as divisor. It can be useful when testing speed
|
||||
of hardware engines.
|
||||
|
||||
=item B<-evp algo>
|
||||
=item B<-evp> I<algo>
|
||||
|
||||
Use the specified cipher or message digest algorithm via the EVP interface.
|
||||
If B<algo> is an AEAD cipher, then you can pass <-aead> to benchmark a
|
||||
TLS-like sequence. And if B<algo> is a multi-buffer capable cipher, e.g.
|
||||
If I<algo> is an AEAD cipher, then you can pass B<-aead> to benchmark a
|
||||
TLS-like sequence. And if I<algo> is a multi-buffer capable cipher, e.g.
|
||||
aes-128-cbc-hmac-sha1, then B<-mb> will time multi-buffer operation.
|
||||
|
||||
=item B<-hmac digest>
|
||||
=item B<-hmac> I<digest>
|
||||
|
||||
Time the HMAC algorithm using the specified message digest.
|
||||
|
||||
=item B<-cmac cipher>
|
||||
=item B<-cmac> I<cipher>
|
||||
|
||||
Time the CMAC algorithm using the specified cipher e.g. B<speed -cmac aes128>.
|
||||
Time the CMAC algorithm using the specified cipher e.g.
|
||||
C<openssl speed -cmac aes128>.
|
||||
|
||||
=item B<-decrypt>
|
||||
|
||||
Time the decryption instead of encryption. Affects only the EVP testing.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-primes> I<num>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-primes num>
|
||||
|
||||
Generate a B<num>-prime RSA key and use it to run the benchmarks. This option
|
||||
Generate a I<num>-prime RSA key and use it to run the benchmarks. This option
|
||||
is only effective if RSA algorithm is specified to test.
|
||||
|
||||
=item B<-seconds num>
|
||||
=item B<-seconds> I<num>
|
||||
|
||||
Run benchmarks for B<num> seconds.
|
||||
Run benchmarks for I<num> seconds.
|
||||
|
||||
=item B<-bytes num>
|
||||
=item B<-bytes> I<num>
|
||||
|
||||
Run benchmarks on B<num>-byte buffers. Affects ciphers, digests and the CSPRNG.
|
||||
Run benchmarks on I<num>-byte buffers. Affects ciphers, digests and the CSPRNG.
|
||||
|
||||
=item B<[zero or more test algorithms]>
|
||||
=item I<algorithm> ...
|
||||
|
||||
If any options are given, B<speed> tests those algorithms, otherwise a
|
||||
If any I<algorithm> is given, then those algorithms are tested, otherwise a
|
||||
pre-compiled grand selection is tested.
|
||||
|
||||
=back
|
||||
|
||||
+27
-25
@@ -8,22 +8,24 @@ openssl-spkac - SPKAC printing and generating utility
|
||||
|
||||
B<openssl> B<spkac>
|
||||
[B<-help>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-key keyfile>]
|
||||
[B<-keyform PEM|DER|ENGINE>]
|
||||
[B<-passin arg>]
|
||||
[B<-challenge string>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-key> I<keyfile>]
|
||||
[B<-keyform> B<DER>|B<PEM>|B<ENGINE>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-challenge> I<string>]
|
||||
[B<-pubkey>]
|
||||
[B<-spkac spkacname>]
|
||||
[B<-spksect section>]
|
||||
[B<-spkac> I<spkacname>]
|
||||
[B<-spksect> I<section>]
|
||||
[B<-noout>]
|
||||
[B<-verify>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<spkac> command processes Netscape signed public key and challenge
|
||||
This command processes Netscape signed public key and challenge
|
||||
(SPKAC) files. It can print out their contents, verify the signature and
|
||||
produce its own SPKACs from a supplied private key.
|
||||
|
||||
@@ -35,43 +37,43 @@ produce its own SPKACs from a supplied private key.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read from or standard input if this
|
||||
option is not specified. Ignored if the B<-key> option is used.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename to write to or standard output by
|
||||
default.
|
||||
|
||||
=item B<-key keyfile>
|
||||
=item B<-key> I<keyfile>
|
||||
|
||||
Create an SPKAC file using the private key in B<keyfile>. The
|
||||
Create an SPKAC file using the private key in I<keyfile>. The
|
||||
B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if
|
||||
present.
|
||||
|
||||
=item B<-keyform PEM|DER|ENGINE>
|
||||
=item B<-keyform> B<DER>|B<PEM>|B<ENGINE>
|
||||
|
||||
Whether the key format is PEM, DER, or an engine-backed key.
|
||||
The default is PEM.
|
||||
|
||||
=item B<-passin password>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The input file password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The input file password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-challenge string>
|
||||
=item B<-challenge> I<string>
|
||||
|
||||
Specifies the challenge string if an SPKAC is being created.
|
||||
|
||||
=item B<-spkac spkacname>
|
||||
=item B<-spkac> I<spkacname>
|
||||
|
||||
Allows an alternative name form the variable containing the
|
||||
SPKAC. The default is "SPKAC". This option affects both
|
||||
generated and input SPKAC files.
|
||||
|
||||
=item B<-spksect section>
|
||||
=item B<-spksect> I<section>
|
||||
|
||||
Allows an alternative name form the section containing the
|
||||
SPKAC. The default is the default section.
|
||||
@@ -90,9 +92,9 @@ being created).
|
||||
|
||||
Verifies the digital signature on the supplied SPKAC.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<spkac>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -124,8 +126,8 @@ Example of an SPKAC, (long lines split up for clarity):
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
A created SPKAC with suitable DN components appended can be fed into
|
||||
the B<ca> utility.
|
||||
A created SPKAC with suitable DN components appended can be fed to
|
||||
L<openssl-ca(1)>.
|
||||
|
||||
SPKACs are typically generated by Netscape when a form is submitted
|
||||
containing the B<KEYGEN> tag as part of the certificate enrollment
|
||||
|
||||
+41
-24
@@ -13,51 +13,68 @@ B<openssl srp>
|
||||
[B<-modify>]
|
||||
[B<-delete>]
|
||||
[B<-list>]
|
||||
[B<-name section>]
|
||||
[B<-config file>]
|
||||
[B<-srpvfile file>]
|
||||
[B<-gn identifier>]
|
||||
[B<-userinfo text...>]
|
||||
[B<-passin arg>]
|
||||
[B<-passout arg>]
|
||||
[I<user...>]
|
||||
[B<-name> I<section>]
|
||||
[B<-config> I<file>]
|
||||
[B<-srpvfile> I<file>]
|
||||
[B<-gn> I<identifier>]
|
||||
[B<-userinfo> I<text>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[I<user> ...]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<srp> command is used to maintain an SRP (secure remote password)
|
||||
file.
|
||||
This command is used to maintain an SRP (secure remote password) file.
|
||||
At most one of the B<-add>, B<-modify>, B<-delete>, and B<-list> options
|
||||
can be specified.
|
||||
These options take zero or more usernames as parameters and perform the
|
||||
appropriate operation on the SRP file.
|
||||
For B<-list>, if no B<user> is given then all users are displayed.
|
||||
For B<-list>, if no I<user> is given then all users are displayed.
|
||||
|
||||
The configuration file to use, and the section within the file, can be
|
||||
specified with the B<-config> and B<-name> flags, respectively.
|
||||
If the config file is not specified, the B<-srpvfile> can be used to
|
||||
just specify the file to operate on.
|
||||
|
||||
The B<-userinfo> option specifies additional information to add when
|
||||
adding or modifying a user.
|
||||
|
||||
The B<-gn> flag specifies the B<g> and B<N> values, using one of
|
||||
the strengths defined in IETF RFC 5054.
|
||||
|
||||
The B<-passin> and B<-passout> arguments are parsed as described in
|
||||
the L<openssl(1)> command.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item [B<-help>]
|
||||
=item B<-help>
|
||||
|
||||
Display an option summary.
|
||||
|
||||
=item [B<-verbose>]
|
||||
=item B<-verbose>
|
||||
|
||||
Generate verbose output while processing.
|
||||
|
||||
=item B<-srpvfile> I<file>
|
||||
|
||||
If the config file is not specified,
|
||||
B<-srpvfile> can be used to specify the file to operate on.
|
||||
|
||||
=item B<-gn>
|
||||
|
||||
Specifies the B<g> and B<N> values, using one of
|
||||
the strengths defined in IETF RFC 5054.
|
||||
|
||||
=item B<-userinfo>
|
||||
|
||||
specifies additional information to add when
|
||||
adding or modifying a user.
|
||||
|
||||
=item B<-passin> I<arg>, B<-passout> I<arg>
|
||||
|
||||
The password source for the input and output file.
|
||||
For more information about the format of B<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=back
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -8,27 +8,27 @@ openssl-storeutl - STORE utility
|
||||
|
||||
B<openssl> B<storeutl>
|
||||
[B<-help>]
|
||||
[B<-out file>]
|
||||
[B<-out> I<file>]
|
||||
[B<-noout>]
|
||||
[B<-passin arg>]
|
||||
[B<-text arg>]
|
||||
[B<-engine id>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-text> I<arg>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-r>]
|
||||
[B<-certs>]
|
||||
[B<-keys>]
|
||||
[B<-crls>]
|
||||
[B<-subject arg>]
|
||||
[B<-issuer arg>]
|
||||
[B<-serial arg>]
|
||||
[B<-alias arg>]
|
||||
[B<-fingerprint arg>]
|
||||
[B<-subject> I<arg>]
|
||||
[B<-issuer> I<arg>]
|
||||
[B<-serial> I<arg>]
|
||||
[B<-alias> I<arg>]
|
||||
[B<-fingerprint> I<arg>]
|
||||
[B<-I<digest>>]
|
||||
B<uri> ...
|
||||
I<uri> ...
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<storeutl> command can be used to display the contents (after decryption
|
||||
as the case may be) fetched from the given URIs.
|
||||
This command can be used to display the contents (after
|
||||
decryption as the case may be) fetched from the given URIs.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -38,7 +38,7 @@ as the case may be) fetched from the given URIs.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
specifies the output filename to write to or standard output by
|
||||
default.
|
||||
@@ -47,19 +47,19 @@ default.
|
||||
|
||||
this option prevents output of the PEM data.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
the key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
the key password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-text>
|
||||
|
||||
Prints out the objects in text form, similarly to the B<-text> output from
|
||||
B<openssl x509>, B<openssl pkey>, etc.
|
||||
L<openssl-x509(1)>, L<openssl-pkey(1)>, etc.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
specifying an engine (by its unique B<id> string) will cause B<storeutl>
|
||||
specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed.
|
||||
The engine will then be set as the default for all available algorithms.
|
||||
@@ -78,31 +78,31 @@ Only select the certificates, keys or CRLs from the given URI.
|
||||
However, if this URI would return a set of names (URIs), those are always
|
||||
returned.
|
||||
|
||||
=item B<-subject arg>
|
||||
=item B<-subject> I<arg>
|
||||
|
||||
Search for an object having the subject name B<arg>.
|
||||
The arg must be formatted as I</type0=value0/type1=value1/type2=...>.
|
||||
Search for an object having the subject name I<arg>.
|
||||
The arg must be formatted as C</type0=value0/type1=value1/type2=...>.
|
||||
Keyword characters may be escaped by \ (backslash), and whitespace is retained.
|
||||
Empty values are permitted but are ignored for the search. That is,
|
||||
a search with an empty value will have the same effect as not specifying
|
||||
the type at all.
|
||||
|
||||
=item B<-issuer arg>
|
||||
=item B<-issuer> I<arg>
|
||||
|
||||
=item B<-serial arg>
|
||||
=item B<-serial> I<arg>
|
||||
|
||||
Search for an object having the given issuer name and serial number.
|
||||
These two options I<must> be used together.
|
||||
The issuer arg must be formatted as I</type0=value0/type1=value1/type2=...>,
|
||||
The issuer arg must be formatted as C</type0=value0/type1=value1/type2=...>,
|
||||
characters may be escaped by \ (backslash), no spaces are skipped.
|
||||
The serial arg may be specified as a decimal value or a hex value if preceded
|
||||
by B<0x>.
|
||||
by C<0x>.
|
||||
|
||||
=item B<-alias arg>
|
||||
=item B<-alias> I<arg>
|
||||
|
||||
Search for an object having the given alias.
|
||||
|
||||
=item B<-fingerprint arg>
|
||||
=item B<-fingerprint> I<arg>
|
||||
|
||||
Search for an object having the given fingerprint.
|
||||
|
||||
@@ -118,7 +118,7 @@ L<openssl(1)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The B<openssl> B<storeutl> app was added in OpenSSL 1.1.1.
|
||||
This command was added in OpenSSL 1.1.1.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
||||
+156
-174
@@ -8,84 +8,86 @@ openssl-ts - Time Stamping Authority tool (client/server)
|
||||
|
||||
B<openssl> B<ts>
|
||||
B<-query>
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-config> configfile]
|
||||
[B<-data> file_to_hash]
|
||||
[B<-digest> digest_bytes]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-config> I<configfile>]
|
||||
[B<-data> I<file_to_hash>]
|
||||
[B<-digest> I<digest_bytes>]
|
||||
[B<-I<digest>>]
|
||||
[B<-tspolicy> object_id]
|
||||
[B<-tspolicy> I<object_id>]
|
||||
[B<-no_nonce>]
|
||||
[B<-cert>]
|
||||
[B<-in> request.tsq]
|
||||
[B<-out> request.tsq]
|
||||
[B<-in> I<request.tsq>]
|
||||
[B<-out> I<request.tsq>]
|
||||
[B<-text>]
|
||||
|
||||
B<openssl> B<ts>
|
||||
B<-reply>
|
||||
[B<-config> configfile]
|
||||
[B<-section> tsa_section]
|
||||
[B<-queryfile> request.tsq]
|
||||
[B<-passin> password_src]
|
||||
[B<-signer> tsa_cert.pem]
|
||||
[B<-inkey> file_or_id]
|
||||
[B<-config> I<configfile>]
|
||||
[B<-section> I<tsa_section>]
|
||||
[B<-queryfile> I<request.tsq>]
|
||||
[B<-passin> I<password_src>]
|
||||
[B<-signer> I<tsa_cert.pem>]
|
||||
[B<-inkey> I<file_or_id>]
|
||||
[B<-I<digest>>]
|
||||
[B<-chain> certs_file.pem]
|
||||
[B<-tspolicy> object_id]
|
||||
[B<-in> response.tsr]
|
||||
[B<-chain> I<certs_file.pem>]
|
||||
[B<-tspolicy> I<object_id>]
|
||||
[B<-in> I<response.tsr>]
|
||||
[B<-token_in>]
|
||||
[B<-out> response.tsr]
|
||||
[B<-out> I<response.tsr>]
|
||||
[B<-token_out>]
|
||||
[B<-text>]
|
||||
[B<-engine> id]
|
||||
[B<-engine> I<id>]
|
||||
|
||||
B<openssl> B<ts>
|
||||
B<-verify>
|
||||
[B<-data> file_to_hash]
|
||||
[B<-digest> digest_bytes]
|
||||
[B<-queryfile> request.tsq]
|
||||
[B<-in> response.tsr]
|
||||
[B<-data> I<file_to_hash>]
|
||||
[B<-digest> I<digest_bytes>]
|
||||
[B<-queryfile> I<request.tsq>]
|
||||
[B<-in> I<response.tsr>]
|
||||
[B<-token_in>]
|
||||
[B<-CApath> trusted_cert_path]
|
||||
[B<-CAfile> trusted_certs.pem]
|
||||
[B<-untrusted> cert_file.pem]
|
||||
[B<-CApath> I<trusted_cert_path>]
|
||||
[B<-CAfile> I<trusted_certs.pem>]
|
||||
[B<-untrusted> I<cert_file.pem>]
|
||||
[I<verify options>]
|
||||
|
||||
I<verify options:>
|
||||
[-attime timestamp]
|
||||
[-check_ss_sig]
|
||||
[-crl_check]
|
||||
[-crl_check_all]
|
||||
[-explicit_policy]
|
||||
[-extended_crl]
|
||||
[-ignore_critical]
|
||||
[-inhibit_any]
|
||||
[-inhibit_map]
|
||||
[-issuer_checks]
|
||||
[-no_alt_chains]
|
||||
[-no_check_time]
|
||||
[-partial_chain]
|
||||
[-policy arg]
|
||||
[-policy_check]
|
||||
[-policy_print]
|
||||
[-purpose purpose]
|
||||
[-suiteB_128]
|
||||
[-suiteB_128_only]
|
||||
[-suiteB_192]
|
||||
[-trusted_first]
|
||||
[-use_deltas]
|
||||
[-auth_level num]
|
||||
[-verify_depth num]
|
||||
[-verify_email email]
|
||||
[-verify_hostname hostname]
|
||||
[-verify_ip ip]
|
||||
[-verify_name name]
|
||||
[-x509_strict]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
[B<-explicit_policy>]
|
||||
[B<-extended_crl>]
|
||||
[B<-ignore_critical>]
|
||||
[B<-inhibit_any>]
|
||||
[B<-inhibit_map>]
|
||||
[B<-issuer_checks>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-no_check_time>]
|
||||
[B<-partial_chain>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-policy_check>]
|
||||
[B<-policy_print>]
|
||||
[B<-purpose> I<purpose>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-trusted_first>]
|
||||
[B<-use_deltas>]
|
||||
[B<-auth_level> I<num>]
|
||||
[B<-verify_depth> I<num>]
|
||||
[B<-verify_email> I<email>]
|
||||
[B<-verify_hostname> I<hostname>]
|
||||
[B<-verify_ip> I<ip>]
|
||||
[B<-verify_name> I<name>]
|
||||
[B<-x509_strict>]
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<ts> command is a basic Time Stamping Authority (TSA) client and server
|
||||
application as specified in RFC 3161 (Time-Stamp Protocol, TSP). A
|
||||
This command is a basic Time Stamping Authority (TSA) client and
|
||||
server application as specified in RFC 3161 (Time-Stamp Protocol, TSP). A
|
||||
TSA can be part of a PKI deployment and its role is to provide long
|
||||
term proof of the existence of a certain datum before a particular
|
||||
time. Here is a brief description of the protocol:
|
||||
@@ -100,23 +102,23 @@ the hash to the TSA.
|
||||
=item 2.
|
||||
|
||||
The TSA attaches the current date and time to the received hash value,
|
||||
signs them and sends the time stamp token back to the client. By
|
||||
signs them and sends the timestamp token back to the client. By
|
||||
creating this token the TSA certifies the existence of the original
|
||||
data file at the time of response generation.
|
||||
|
||||
=item 3.
|
||||
|
||||
The TSA client receives the time stamp token and verifies the
|
||||
The TSA client receives the timestamp token and verifies the
|
||||
signature on it. It also checks if the token contains the same hash
|
||||
value that it had sent to the TSA.
|
||||
|
||||
=back
|
||||
|
||||
There is one DER encoded protocol data unit defined for transporting a time
|
||||
stamp request to the TSA and one for sending the time stamp response
|
||||
back to the client. The B<ts> command has three main functions:
|
||||
creating a time stamp request based on a data file,
|
||||
creating a time stamp response based on a request, verifying if a
|
||||
stamp request to the TSA and one for sending the timestamp response
|
||||
back to the client. This command has three main functions:
|
||||
creating a timestamp request based on a data file,
|
||||
creating a timestamp response based on a request, verifying if a
|
||||
response corresponds to a particular request or a data file.
|
||||
|
||||
There is no support for sending the requests/responses automatically
|
||||
@@ -125,39 +127,30 @@ requests either by ftp or e-mail.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=head2 Time Stamp Request generation
|
||||
=head2 Timestamp Request generation
|
||||
|
||||
The B<-query> switch can be used for creating and printing a time stamp
|
||||
The B<-query> switch can be used for creating and printing a timestamp
|
||||
request with the following options:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-config> configfile
|
||||
=item B<-config> I<configfile>
|
||||
|
||||
The configuration file to use.
|
||||
Optional; for a description of the default value,
|
||||
see L<openssl(1)/COMMAND SUMMARY>.
|
||||
|
||||
=item B<-data> file_to_hash
|
||||
=item B<-data> I<file_to_hash>
|
||||
|
||||
The data file for which the time stamp request needs to be
|
||||
The data file for which the timestamp request needs to be
|
||||
created. stdin is the default if neither the B<-data> nor the B<-digest>
|
||||
parameter is specified. (Optional)
|
||||
|
||||
=item B<-digest> digest_bytes
|
||||
=item B<-digest> I<digest_bytes>
|
||||
|
||||
It is possible to specify the message imprint explicitly without the data
|
||||
file. The imprint must be specified in a hexadecimal format, two characters
|
||||
@@ -168,13 +161,13 @@ in use. (Optional)
|
||||
=item B<-I<digest>>
|
||||
|
||||
The message digest to apply to the data file.
|
||||
Any digest supported by the OpenSSL B<dgst> command can be used.
|
||||
Any digest supported by the L<openssl-dgst(1)> command can be used.
|
||||
The default is SHA-256. (Optional)
|
||||
|
||||
=item B<-tspolicy> object_id
|
||||
=item B<-tspolicy> I<object_id>
|
||||
|
||||
The policy that the client expects the TSA to use for creating the
|
||||
time stamp token. Either the dotted OID notation or OID names defined
|
||||
timestamp token. Either the dotted OID notation or OID names defined
|
||||
in the config file can be used. If no policy is requested the TSA will
|
||||
use its own default policy. (Optional)
|
||||
|
||||
@@ -190,14 +183,14 @@ protect against replay-attacks. (Optional)
|
||||
The TSA is expected to include its signing certificate in the
|
||||
response. (Optional)
|
||||
|
||||
=item B<-in> request.tsq
|
||||
=item B<-in> I<request.tsq>
|
||||
|
||||
This option specifies a previously created time stamp request in DER
|
||||
This option specifies a previously created timestamp request in DER
|
||||
format that will be printed into the output file. Useful when you need
|
||||
to examine the content of a request in human-readable
|
||||
format. (Optional)
|
||||
|
||||
=item B<-out> request.tsq
|
||||
=item B<-out> I<request.tsq>
|
||||
|
||||
Name of the output file to which the request will be written. Default
|
||||
is stdout. (Optional)
|
||||
@@ -209,41 +202,41 @@ instead of DER. (Optional)
|
||||
|
||||
=back
|
||||
|
||||
=head2 Time Stamp Response generation
|
||||
=head2 Timestamp Response generation
|
||||
|
||||
A time stamp response (TimeStampResp) consists of a response status
|
||||
and the time stamp token itself (ContentInfo), if the token generation was
|
||||
successful. The B<-reply> command is for creating a time stamp
|
||||
response or time stamp token based on a request and printing the
|
||||
A timestamp response (TimeStampResp) consists of a response status
|
||||
and the timestamp token itself (ContentInfo), if the token generation was
|
||||
successful. The B<-reply> command is for creating a timestamp
|
||||
response or timestamp token based on a request and printing the
|
||||
response/token in human-readable format. If B<-token_out> is not
|
||||
specified the output is always a time stamp response (TimeStampResp),
|
||||
otherwise it is a time stamp token (ContentInfo).
|
||||
specified the output is always a timestamp response (TimeStampResp),
|
||||
otherwise it is a timestamp token (ContentInfo).
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-config> configfile
|
||||
=item B<-config> I<configfile>
|
||||
|
||||
The configuration file to use.
|
||||
Optional; for a description of the default value,
|
||||
see L<openssl(1)/COMMAND SUMMARY>.
|
||||
See B<CONFIGURATION FILE OPTIONS> for configurable variables.
|
||||
See L</CONFIGURATION FILE OPTIONS> for configurable variables.
|
||||
|
||||
=item B<-section> tsa_section
|
||||
=item B<-section> I<tsa_section>
|
||||
|
||||
The name of the config file section containing the settings for the
|
||||
response generation. If not specified the default TSA section is
|
||||
used, see B<CONFIGURATION FILE OPTIONS> for details. (Optional)
|
||||
used, see L</CONFIGURATION FILE OPTIONS> for details. (Optional)
|
||||
|
||||
=item B<-queryfile> request.tsq
|
||||
=item B<-queryfile> I<request.tsq>
|
||||
|
||||
The name of the file containing a DER encoded time stamp request. (Optional)
|
||||
The name of the file containing a DER encoded timestamp request. (Optional)
|
||||
|
||||
=item B<-passin> password_src
|
||||
=item B<-passin> I<password_src>
|
||||
|
||||
Specifies the password source for the private key of the TSA. See
|
||||
B<PASS PHRASE ARGUMENTS> in L<openssl(1)>. (Optional)
|
||||
description in L<openssl(1)>. (Optional)
|
||||
|
||||
=item B<-signer> tsa_cert.pem
|
||||
=item B<-signer> I<tsa_cert.pem>
|
||||
|
||||
The signer certificate of the TSA in PEM format. The TSA signing
|
||||
certificate must have exactly one extended key usage assigned to it:
|
||||
@@ -251,7 +244,7 @@ timeStamping. The extended key usage must also be critical, otherwise
|
||||
the certificate is going to be refused. Overrides the B<signer_cert>
|
||||
variable of the config file. (Optional)
|
||||
|
||||
=item B<-inkey> file_or_id
|
||||
=item B<-inkey> I<file_or_id>
|
||||
|
||||
The signer private key of the TSA in PEM format. Overrides the
|
||||
B<signer_key> config file option. (Optional)
|
||||
@@ -263,7 +256,7 @@ specified, the argument is given to the engine as a key identifier.
|
||||
Signing digest to use. Overrides the B<signer_digest> config file
|
||||
option. (Mandatory unless specified in the config file)
|
||||
|
||||
=item B<-chain> certs_file.pem
|
||||
=item B<-chain> I<certs_file.pem>
|
||||
|
||||
The collection of certificates in PEM format that will all
|
||||
be included in the response in addition to the signer certificate if
|
||||
@@ -272,30 +265,30 @@ contain the certificate chain for the signer certificate from its
|
||||
issuer upwards. The B<-reply> command does not build a certificate
|
||||
chain automatically. (Optional)
|
||||
|
||||
=item B<-tspolicy> object_id
|
||||
=item B<-tspolicy> I<object_id>
|
||||
|
||||
The default policy to use for the response unless the client
|
||||
explicitly requires a particular TSA policy. The OID can be specified
|
||||
either in dotted notation or with its name. Overrides the
|
||||
B<default_policy> config file option. (Optional)
|
||||
|
||||
=item B<-in> response.tsr
|
||||
=item B<-in> I<response.tsr>
|
||||
|
||||
Specifies a previously created time stamp response or time stamp token
|
||||
Specifies a previously created timestamp response or timestamp token
|
||||
(if B<-token_in> is also specified) in DER format that will be written
|
||||
to the output file. This option does not require a request, it is
|
||||
useful e.g. when you need to examine the content of a response or
|
||||
token or you want to extract the time stamp token from a response. If
|
||||
the input is a token and the output is a time stamp response a default
|
||||
token or you want to extract the timestamp token from a response. If
|
||||
the input is a token and the output is a timestamp response a default
|
||||
'granted' status info is added to the token. (Optional)
|
||||
|
||||
=item B<-token_in>
|
||||
|
||||
This flag can be used together with the B<-in> option and indicates
|
||||
that the input is a DER encoded time stamp token (ContentInfo) instead
|
||||
of a time stamp response (TimeStampResp). (Optional)
|
||||
that the input is a DER encoded timestamp token (ContentInfo) instead
|
||||
of a timestamp response (TimeStampResp). (Optional)
|
||||
|
||||
=item B<-out> response.tsr
|
||||
=item B<-out> I<response.tsr>
|
||||
|
||||
The response is written to this file. The format and content of the
|
||||
file depends on other options (see B<-text>, B<-token_out>). The default is
|
||||
@@ -303,7 +296,7 @@ stdout. (Optional)
|
||||
|
||||
=item B<-token_out>
|
||||
|
||||
The output is a time stamp token (ContentInfo) instead of time stamp
|
||||
The output is a timestamp token (ContentInfo) instead of timestamp
|
||||
response (TimeStampResp). (Optional)
|
||||
|
||||
=item B<-text>
|
||||
@@ -311,68 +304,57 @@ response (TimeStampResp). (Optional)
|
||||
If this option is specified the output is human-readable text format
|
||||
instead of DER. (Optional)
|
||||
|
||||
=item B<-engine> id
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<ts>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms. Default is builtin. (Optional)
|
||||
for all available algorithms. Default is built-in. (Optional)
|
||||
|
||||
=back
|
||||
|
||||
=head2 Time Stamp Response verification
|
||||
=head2 Timestamp Response verification
|
||||
|
||||
The B<-verify> command is for verifying if a time stamp response or time
|
||||
stamp token is valid and matches a particular time stamp request or
|
||||
The B<-verify> command is for verifying if a timestamp response or time
|
||||
stamp token is valid and matches a particular timestamp request or
|
||||
data file. The B<-verify> command does not use the configuration file.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-data> file_to_hash
|
||||
=item B<-data> I<file_to_hash>
|
||||
|
||||
The response or token must be verified against file_to_hash. The file
|
||||
is hashed with the message digest algorithm specified in the token.
|
||||
The B<-digest> and B<-queryfile> options must not be specified with this one.
|
||||
(Optional)
|
||||
|
||||
=item B<-digest> digest_bytes
|
||||
=item B<-digest> I<digest_bytes>
|
||||
|
||||
The response or token must be verified against the message digest specified
|
||||
with this option. The number of bytes must match the message digest algorithm
|
||||
specified in the token. The B<-data> and B<-queryfile> options must not be
|
||||
specified with this one. (Optional)
|
||||
|
||||
=item B<-queryfile> request.tsq
|
||||
=item B<-queryfile> I<request.tsq>
|
||||
|
||||
The original time stamp request in DER format. The B<-data> and B<-digest>
|
||||
The original timestamp request in DER format. The B<-data> and B<-digest>
|
||||
options must not be specified with this one. (Optional)
|
||||
|
||||
=item B<-in> response.tsr
|
||||
=item B<-in> I<response.tsr>
|
||||
|
||||
The time stamp response that needs to be verified in DER format. (Mandatory)
|
||||
The timestamp response that needs to be verified in DER format. (Mandatory)
|
||||
|
||||
=item B<-token_in>
|
||||
|
||||
This flag can be used together with the B<-in> option and indicates
|
||||
that the input is a DER encoded time stamp token (ContentInfo) instead
|
||||
of a time stamp response (TimeStampResp). (Optional)
|
||||
that the input is a DER encoded timestamp token (ContentInfo) instead
|
||||
of a timestamp response (TimeStampResp). (Optional)
|
||||
|
||||
=item B<-CApath> trusted_cert_path
|
||||
=item B<-CAfile> I<file>, B<-CApath> I<dir>
|
||||
|
||||
The name of the directory containing the trusted CA certificates of the
|
||||
client. See the similar option of L<verify(1)> for additional
|
||||
details. Either this option or B<-CAfile> must be specified. (Optional)
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
|
||||
=item B<-CAfile> trusted_certs.pem
|
||||
|
||||
The name of the file containing a set of trusted self-signed CA
|
||||
certificates in PEM format. See the similar option of
|
||||
L<verify(1)> for additional details. Either this option
|
||||
or B<-CApath> must be specified.
|
||||
(Optional)
|
||||
|
||||
=item B<-untrusted> cert_file.pem
|
||||
=item B<-untrusted> I<cert_file.pem>
|
||||
|
||||
Set of additional untrusted certificates in PEM format which may be
|
||||
needed when building the certificate chain for the TSA's signing
|
||||
@@ -382,7 +364,7 @@ all intermediate CA certificates unless the response includes them.
|
||||
|
||||
=item I<verify options>
|
||||
|
||||
The options B<-attime timestamp>, B<-check_ss_sig>, B<-crl_check>,
|
||||
The options B<-attime>, B<-check_ss_sig>, B<-crl_check>,
|
||||
B<-crl_check_all>, B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>,
|
||||
B<-inhibit_any>, B<-inhibit_map>, B<-issuer_checks>, B<-no_alt_chains>,
|
||||
B<-no_check_time>, B<-partial_chain>, B<-policy>, B<-policy_check>,
|
||||
@@ -390,7 +372,7 @@ B<-policy_print>, B<-purpose>, B<-suiteB_128>, B<-suiteB_128_only>,
|
||||
B<-suiteB_192>, B<-trusted_first>, B<-use_deltas>, B<-auth_level>,
|
||||
B<-verify_depth>, B<-verify_email>, B<-verify_hostname>, B<-verify_ip>,
|
||||
B<-verify_name>, and B<-x509_strict> can be used to control timestamp
|
||||
verification. See L<verify(1)>.
|
||||
verification. See L<openssl-verify(1)>.
|
||||
|
||||
=back
|
||||
|
||||
@@ -416,27 +398,27 @@ section can be overridden with the B<-section> command line switch. (Optional)
|
||||
|
||||
=item B<oid_file>
|
||||
|
||||
See L<ca(1)> for description. (Optional)
|
||||
See L<openssl-ca(1)> for description. (Optional)
|
||||
|
||||
=item B<oid_section>
|
||||
|
||||
See L<ca(1)> for description. (Optional)
|
||||
See L<openssl-ca(1)> for description. (Optional)
|
||||
|
||||
=item B<RANDFILE>
|
||||
|
||||
See L<ca(1)> for description. (Optional)
|
||||
See L<openssl-ca(1)> for description. (Optional)
|
||||
|
||||
=item B<serial>
|
||||
|
||||
The name of the file containing the hexadecimal serial number of the
|
||||
last time stamp response created. This number is incremented by 1 for
|
||||
last timestamp response created. This number is incremented by 1 for
|
||||
each response. If the file does not exist at the time of response
|
||||
generation a new file is created with serial number 1. (Mandatory)
|
||||
|
||||
=item B<crypto_device>
|
||||
|
||||
Specifies the OpenSSL engine that will be set as the default for
|
||||
all available algorithms. The default value is builtin, you can specify
|
||||
all available algorithms. The default value is built-in, you can specify
|
||||
any other engines supported by OpenSSL (e.g. use chil for the NCipher HSM).
|
||||
(Optional)
|
||||
|
||||
@@ -486,7 +468,7 @@ the components is missing zero is assumed for that field. (Optional)
|
||||
=item B<clock_precision_digits>
|
||||
|
||||
Specifies the maximum number of digits, which represent the fraction of
|
||||
seconds, that need to be included in the time field. The trailing zeroes
|
||||
seconds, that need to be included in the time field. The trailing zeros
|
||||
must be removed from the time, so there might actually be fewer digits,
|
||||
or no fraction of seconds at all. Supported only on UNIX platforms.
|
||||
The maximum value is 6, default is 0.
|
||||
@@ -525,18 +507,18 @@ public key certificate identifier. Default is sha256. (Optional)
|
||||
|
||||
All the examples below presume that B<OPENSSL_CONF> is set to a proper
|
||||
configuration file, e.g. the example configuration file
|
||||
openssl/apps/openssl.cnf will do.
|
||||
F<openssl/apps/openssl.cnf> will do.
|
||||
|
||||
=head2 Time Stamp Request
|
||||
=head2 Timestamp Request
|
||||
|
||||
To create a time stamp request for design1.txt with SHA-256 digest,
|
||||
To create a timestamp request for F<design1.txt> with SHA-256 digest,
|
||||
without nonce and policy, and without requirement for a certificate
|
||||
in the response:
|
||||
|
||||
openssl ts -query -data design1.txt -no_nonce \
|
||||
-out design1.tsq
|
||||
|
||||
To create a similar time stamp request with specifying the message imprint
|
||||
To create a similar timestamp request with specifying the message imprint
|
||||
explicitly:
|
||||
|
||||
openssl ts -query -digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \
|
||||
@@ -546,15 +528,15 @@ To print the content of the previous request in human readable format:
|
||||
|
||||
openssl ts -query -in design1.tsq -text
|
||||
|
||||
To create a time stamp request which includes the SHA-512 digest
|
||||
of design2.txt, requests the signer certificate and nonce, and
|
||||
To create a timestamp request which includes the SHA-512 digest
|
||||
of F<design2.txt>, requests the signer certificate and nonce, and
|
||||
specifies a policy id (assuming the tsa_policy1 name is defined in the
|
||||
OID section of the config file):
|
||||
|
||||
openssl ts -query -data design2.txt -sha512 \
|
||||
-tspolicy tsa_policy1 -cert -out design2.tsq
|
||||
|
||||
=head2 Time Stamp Response
|
||||
=head2 Timestamp Response
|
||||
|
||||
Before generating a response a signing certificate must be created for
|
||||
the TSA that contains the B<timeStamping> critical extended key usage extension
|
||||
@@ -563,12 +545,12 @@ user certificate section of the config file to generate a proper certificate;
|
||||
|
||||
extendedKeyUsage = critical,timeStamping
|
||||
|
||||
See L<req(1)>, L<ca(1)>, and L<x509(1)> for instructions. The examples
|
||||
below assume that cacert.pem contains the certificate of the CA,
|
||||
tsacert.pem is the signing certificate issued by cacert.pem and
|
||||
tsakey.pem is the private key of the TSA.
|
||||
See L<openssl-req(1)>, L<openssl-ca(1)>, and L<openssl-x509(1)> for
|
||||
instructions. The examples below assume that F<cacert.pem> contains the
|
||||
certificate of the CA, F<tsacert.pem> is the signing certificate issued
|
||||
by F<cacert.pem> and F<tsakey.pem> is the private key of the TSA.
|
||||
|
||||
To create a time stamp response for a request:
|
||||
To create a timestamp response for a request:
|
||||
|
||||
openssl ts -reply -queryfile design1.tsq -inkey tsakey.pem \
|
||||
-signer tsacert.pem -out design1.tsr
|
||||
@@ -577,44 +559,44 @@ If you want to use the settings in the config file you could just write:
|
||||
|
||||
openssl ts -reply -queryfile design1.tsq -out design1.tsr
|
||||
|
||||
To print a time stamp reply to stdout in human readable format:
|
||||
To print a timestamp reply to stdout in human readable format:
|
||||
|
||||
openssl ts -reply -in design1.tsr -text
|
||||
|
||||
To create a time stamp token instead of time stamp response:
|
||||
To create a timestamp token instead of timestamp response:
|
||||
|
||||
openssl ts -reply -queryfile design1.tsq -out design1_token.der -token_out
|
||||
|
||||
To print a time stamp token to stdout in human readable format:
|
||||
To print a timestamp token to stdout in human readable format:
|
||||
|
||||
openssl ts -reply -in design1_token.der -token_in -text -token_out
|
||||
|
||||
To extract the time stamp token from a response:
|
||||
To extract the timestamp token from a response:
|
||||
|
||||
openssl ts -reply -in design1.tsr -out design1_token.der -token_out
|
||||
|
||||
To add 'granted' status info to a time stamp token thereby creating a
|
||||
To add 'granted' status info to a timestamp token thereby creating a
|
||||
valid response:
|
||||
|
||||
openssl ts -reply -in design1_token.der -token_in -out design1.tsr
|
||||
|
||||
=head2 Time Stamp Verification
|
||||
=head2 Timestamp Verification
|
||||
|
||||
To verify a time stamp reply against a request:
|
||||
To verify a timestamp reply against a request:
|
||||
|
||||
openssl ts -verify -queryfile design1.tsq -in design1.tsr \
|
||||
-CAfile cacert.pem -untrusted tsacert.pem
|
||||
|
||||
To verify a time stamp reply that includes the certificate chain:
|
||||
To verify a timestamp reply that includes the certificate chain:
|
||||
|
||||
openssl ts -verify -queryfile design2.tsq -in design2.tsr \
|
||||
-CAfile cacert.pem
|
||||
|
||||
To verify a time stamp token against the original data file:
|
||||
To verify a timestamp token against the original data file:
|
||||
openssl ts -verify -data design2.txt -in design2.tsr \
|
||||
-CAfile cacert.pem
|
||||
|
||||
To verify a time stamp token against a message imprint:
|
||||
To verify a timestamp token against a message imprint:
|
||||
openssl ts -verify -digest b7e5d3f93198b38379852f2c04e78d73abdd0f4b \
|
||||
-in design2.tsr -CAfile cacert.pem
|
||||
|
||||
@@ -622,13 +604,13 @@ You could also look at the 'test' directory for more examples.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
=for comment foreign manuals: procmail(1), perl(1)
|
||||
=for openssl foreign manuals: procmail(1), perl(1)
|
||||
|
||||
=over 2
|
||||
|
||||
=item *
|
||||
|
||||
No support for time stamps over SMTP, though it is quite easy
|
||||
No support for timestamps over SMTP, though it is quite easy
|
||||
to implement an automatic e-mail based TSA with L<procmail(1)>
|
||||
and L<perl(1)>. HTTP server support is provided in the form of
|
||||
a separate apache module. HTTP client support is provided by
|
||||
@@ -638,7 +620,7 @@ L<tsget(1)>. Pure TCP/IP protocol is not supported.
|
||||
|
||||
The file containing the last serial number of the TSA is not
|
||||
locked when being read or written. This is a problem if more than one
|
||||
instance of L<openssl(1)> is trying to create a time stamp
|
||||
instance of L<openssl(1)> is trying to create a timestamp
|
||||
response at the same time. This is not an issue when using the apache
|
||||
server module, it does proper locking.
|
||||
|
||||
|
||||
+90
-104
@@ -8,55 +8,57 @@ openssl-verify - Utility to verify certificates
|
||||
|
||||
B<openssl> B<verify>
|
||||
[B<-help>]
|
||||
[B<-CAfile file>]
|
||||
[B<-CApath directory>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-CApath> I<directory>]
|
||||
[B<-no-CAfile>]
|
||||
[B<-no-CApath>]
|
||||
[B<-allow_proxy_certs>]
|
||||
[B<-attime timestamp>]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-CRLfile file>]
|
||||
[B<-CRLfile> I<file>]
|
||||
[B<-crl_download>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
[B<-engine id>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-explicit_policy>]
|
||||
[B<-extended_crl>]
|
||||
[B<-ignore_critical>]
|
||||
[B<-inhibit_any>]
|
||||
[B<-inhibit_map>]
|
||||
[B<-nameopt option>]
|
||||
[B<-nameopt> I<option>]
|
||||
[B<-no_check_time>]
|
||||
[B<-partial_chain>]
|
||||
[B<-policy arg>]
|
||||
[B<-policy> I<arg>]
|
||||
[B<-policy_check>]
|
||||
[B<-policy_print>]
|
||||
[B<-purpose purpose>]
|
||||
[B<-purpose> I<purpose>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-trusted_first>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-untrusted file>]
|
||||
[B<-trusted file>]
|
||||
[B<-untrusted> I<file>]
|
||||
[B<-trusted> I<file>]
|
||||
[B<-use_deltas>]
|
||||
[B<-verbose>]
|
||||
[B<-auth_level level>]
|
||||
[B<-verify_depth num>]
|
||||
[B<-verify_email email>]
|
||||
[B<-verify_hostname hostname>]
|
||||
[B<-verify_ip ip>]
|
||||
[B<-verify_name name>]
|
||||
[B<-auth_level> I<level>]
|
||||
[B<-verify_depth> I<num>]
|
||||
[B<-verify_email> I<email>]
|
||||
[B<-verify_hostname> I<hostname>]
|
||||
[B<-verify_ip> I<ip>]
|
||||
[B<-verify_name> I<name>]
|
||||
[B<-x509_strict>]
|
||||
[B<-show_chain>]
|
||||
[B<-sm2-id string>]
|
||||
[B<-sm2-hex-id hex-string>]
|
||||
[B<->]
|
||||
[certificates]
|
||||
[B<-sm2-id> I<string>]
|
||||
[B<-sm2-hex-id> I<hex-string>]
|
||||
[B<-->]
|
||||
[I<certificate> ...]
|
||||
|
||||
=for openssl ifdef engine sm2-id sm2-hex-id
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<verify> command verifies certificate chains.
|
||||
This command verifies certificate chains.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -66,35 +68,18 @@ The B<verify> command verifies certificate chains.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-CAfile file>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
A B<file> of trusted certificates.
|
||||
The file should contain one or more certificates in PEM format.
|
||||
|
||||
=item B<-CApath directory>
|
||||
|
||||
A directory of trusted certificates. The certificates should have names
|
||||
of the form: hash.0 or have symbolic links to them of this
|
||||
form ("hash" is the hashed certificate subject name: see the B<-hash> option
|
||||
of the B<x509> utility). Under Unix the B<c_rehash> script will automatically
|
||||
create symbolic links to a directory of certificates.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the trusted CA certificates from the default file location.
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not load the trusted CA certificates from the default directory location.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-allow_proxy_certs>
|
||||
|
||||
Allow the verification of proxy certificates.
|
||||
|
||||
=item B<-attime timestamp>
|
||||
=item B<-attime> I<timestamp>
|
||||
|
||||
Perform validation checks using time specified by B<timestamp> and not
|
||||
current system time. B<timestamp> is the number of seconds since
|
||||
Perform validation checks using time specified by I<timestamp> and not
|
||||
current system time. I<timestamp> is the number of seconds since
|
||||
01.01.1970 (UNIX time).
|
||||
|
||||
=item B<-check_ss_sig>
|
||||
@@ -102,11 +87,11 @@ current system time. B<timestamp> is the number of seconds since
|
||||
Verify the signature on the self-signed root CA. This is disabled by default
|
||||
because it doesn't add any security.
|
||||
|
||||
=item B<-CRLfile file>
|
||||
=item B<-CRLfile> I<file>
|
||||
|
||||
The B<file> should contain one or more CRLs in PEM format.
|
||||
The I<file> should contain one or more CRLs in PEM format.
|
||||
This option can be specified more than once to include CRLs from multiple
|
||||
B<files>.
|
||||
I<file>s.
|
||||
|
||||
=item B<-crl_download>
|
||||
|
||||
@@ -122,9 +107,9 @@ If a valid CRL cannot be found an error occurs.
|
||||
Checks the validity of B<all> certificates in the chain by attempting
|
||||
to look up valid CRLs.
|
||||
|
||||
=item B<-engine id>
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Specifying an engine B<id> will cause L<verify(1)> to attempt to load the
|
||||
Specifying an engine I<id> will cause this command to attempt to load the
|
||||
specified engine.
|
||||
The engine will then be set as the default for all its supported algorithms.
|
||||
If you want to load certificates or CRLs that require engine support via any of
|
||||
@@ -154,17 +139,17 @@ Set policy variable inhibit-any-policy (see RFC5280).
|
||||
|
||||
Set policy variable inhibit-policy-mapping (see RFC5280).
|
||||
|
||||
=item B<-nameopt option>
|
||||
=item B<-nameopt> I<option>
|
||||
|
||||
Option which determines how the subject or issuer names are displayed. The
|
||||
B<option> argument can be a single option or multiple options separated by
|
||||
I<option> argument can be a single option or multiple options separated by
|
||||
commas. Alternatively the B<-nameopt> switch may be used more than once to
|
||||
set multiple options. See the L<x509(1)> manual page for details.
|
||||
set multiple options. See the L<openssl-x509(1)> manual page for details.
|
||||
|
||||
=item B<-no_check_time>
|
||||
|
||||
This option suppresses checking the validity period of certificates and CRLs
|
||||
against the current time. If option B<-attime timestamp> is used to specify
|
||||
against the current time. If option B<-attime> is used to specify
|
||||
a verification time, the check is not suppressed.
|
||||
|
||||
=item B<-partial_chain>
|
||||
@@ -173,10 +158,10 @@ Allow verification to succeed even if a I<complete> chain cannot be built to a
|
||||
self-signed trust-anchor, provided it is possible to construct a chain to a
|
||||
trusted certificate that might not be self-signed.
|
||||
|
||||
=item B<-policy arg>
|
||||
=item B<-policy> I<arg>
|
||||
|
||||
Enable policy processing and add B<arg> to the user-initial-policy-set (see
|
||||
RFC5280). The policy B<arg> can be an object name an OID in numeric form.
|
||||
Enable policy processing and add I<arg> to the user-initial-policy-set (see
|
||||
RFC5280). The policy I<arg> can be an object name an OID in numeric form.
|
||||
This argument can appear more than once.
|
||||
|
||||
=item B<-policy_check>
|
||||
@@ -187,12 +172,13 @@ Enables certificate policy processing.
|
||||
|
||||
Print out diagnostics related to policy processing.
|
||||
|
||||
=item B<-purpose purpose>
|
||||
=item B<-purpose> I<purpose>
|
||||
|
||||
The intended use for the certificate. If this option is not specified,
|
||||
B<verify> will not consider certificate purpose during chain verification.
|
||||
this command will not consider certificate purpose during chain
|
||||
verification.
|
||||
Currently accepted uses are B<sslclient>, B<sslserver>, B<nssslserver>,
|
||||
B<smimesign>, B<smimeencrypt>. See the B<VERIFY OPERATION> section for more
|
||||
B<smimesign>, B<smimeencrypt>. See the L</VERIFY OPERATION> section for more
|
||||
information.
|
||||
|
||||
=item B<-suiteB_128_only>, B<-suiteB_128>, B<-suiteB_192>
|
||||
@@ -220,24 +206,24 @@ trust store to see if an alternative chain can be found that is trusted.
|
||||
As of OpenSSL 1.1.0, with B<-trusted_first> always on, this option has no
|
||||
effect.
|
||||
|
||||
=item B<-untrusted file>
|
||||
=item B<-untrusted> I<file>
|
||||
|
||||
A B<file> of additional untrusted certificates (intermediate issuer CAs) used
|
||||
A I<file> of additional untrusted certificates (intermediate issuer CAs) used
|
||||
to construct a certificate chain from the subject certificate to a trust-anchor.
|
||||
The B<file> should contain one or more certificates in PEM format.
|
||||
The I<file> should contain one or more certificates in PEM format.
|
||||
This option can be specified more than once to include untrusted certificates
|
||||
from multiple B<files>.
|
||||
from multiple I<file>s.
|
||||
|
||||
=item B<-trusted file>
|
||||
=item B<-trusted> I<file>
|
||||
|
||||
A B<file> of trusted certificates, which must be self-signed, unless the
|
||||
A I<file> of trusted certificates, which must be self-signed, unless the
|
||||
B<-partial_chain> option is specified.
|
||||
The B<file> contains one or more certificates in PEM format.
|
||||
The I<file> contains one or more certificates in PEM format.
|
||||
With this option, no additional (e.g., default) certificate lists are
|
||||
consulted.
|
||||
That is, the only trust-anchors are those listed in B<file>.
|
||||
That is, the only trust-anchors are those listed in I<file>.
|
||||
This option can be specified more than once to include trusted certificates
|
||||
from multiple B<files>.
|
||||
from multiple I<file>s.
|
||||
This option implies the B<-no-CAfile> and B<-no-CApath> options.
|
||||
This option cannot be used in combination with either of the B<-CAfile> or
|
||||
B<-CApath> options.
|
||||
@@ -250,13 +236,13 @@ Enable support for delta CRLs.
|
||||
|
||||
Print extra information about the operations being performed.
|
||||
|
||||
=item B<-auth_level level>
|
||||
=item B<-auth_level> I<level>
|
||||
|
||||
Set the certificate chain authentication security level to B<level>.
|
||||
Set the certificate chain authentication security level to I<level>.
|
||||
The authentication security level determines the acceptable signature and
|
||||
public key strength when verifying certificate chains.
|
||||
For a certificate chain to validate, the public keys of all the certificates
|
||||
must meet the specified security B<level>.
|
||||
must meet the specified security I<level>.
|
||||
The signature algorithm security level is enforced for all the certificates in
|
||||
the chain except for the chain's I<trust anchor>, which is either directly
|
||||
trusted or validated by means other than its signature.
|
||||
@@ -268,36 +254,35 @@ Security level 1 requires at least 80-bit-equivalent security and is broadly
|
||||
interoperable, though it will, for example, reject MD5 signatures or RSA keys
|
||||
shorter than 1024 bits.
|
||||
|
||||
=item B<-verify_depth num>
|
||||
=item B<-verify_depth> I<num>
|
||||
|
||||
Limit the certificate chain to B<num> intermediate CA certificates.
|
||||
A maximal depth chain can have up to B<num+2> certificates, since neither the
|
||||
Limit the certificate chain to I<num> intermediate CA certificates.
|
||||
A maximal depth chain can have up to I<num>+2 certificates, since neither the
|
||||
end-entity certificate nor the trust-anchor certificate count against the
|
||||
B<-verify_depth> limit.
|
||||
|
||||
=item B<-verify_email email>
|
||||
=item B<-verify_email> I<email>
|
||||
|
||||
Verify if the B<email> matches the email address in Subject Alternative Name or
|
||||
Verify if I<email> matches the email address in Subject Alternative Name or
|
||||
the email in the subject Distinguished Name.
|
||||
|
||||
=item B<-verify_hostname hostname>
|
||||
=item B<-verify_hostname> I<hostname>
|
||||
|
||||
Verify if the B<hostname> matches DNS name in Subject Alternative Name or
|
||||
Verify if I<hostname> matches DNS name in Subject Alternative Name or
|
||||
Common Name in the subject certificate.
|
||||
|
||||
=item B<-verify_ip ip>
|
||||
=item B<-verify_ip> I<ip>
|
||||
|
||||
Verify if the B<ip> matches the IP address in Subject Alternative Name of
|
||||
Verify if I<ip> matches the IP address in Subject Alternative Name of
|
||||
the subject certificate.
|
||||
|
||||
=item B<-verify_name name>
|
||||
=item B<-verify_name> I<name>
|
||||
|
||||
Use default verification policies like trust model and required certificate
|
||||
policies identified by B<name>.
|
||||
policies identified by I<name>.
|
||||
The trust model determines which auxiliary trust or reject OIDs are applicable
|
||||
to verifying the given certificate chain.
|
||||
See the B<-addtrust> and B<-addreject> options of the L<x509(1)> command-line
|
||||
utility.
|
||||
See the B<-addtrust> and B<-addreject> options for L<openssl-x509(1)>.
|
||||
Supported policy names include: B<default>, B<pkcs7>, B<smime_sign>,
|
||||
B<ssl_client>, B<ssl_server>.
|
||||
These mimics the combinations of purpose and trust settings used in SSL, CMS
|
||||
@@ -327,30 +312,30 @@ required by the SM2 signature algorithm for signing and verification.
|
||||
Specify a binary ID string to use when signing or verifying using an SM2
|
||||
certificate. The argument for this option is string of hexadecimal digits.
|
||||
|
||||
=item B<->
|
||||
=item B<-->
|
||||
|
||||
Indicates the last option. All arguments following this are assumed to be
|
||||
certificate files. This is useful if the first certificate filename begins
|
||||
with a B<->.
|
||||
with a B<-->.
|
||||
|
||||
=item B<certificates>
|
||||
=item I<certificate> ...
|
||||
|
||||
One or more certificates to verify. If no certificates are given, B<verify>
|
||||
will attempt to read a certificate from standard input. Certificates must be
|
||||
in PEM format.
|
||||
One or more certificates to verify. If no certificates are given,
|
||||
this command will attempt to read a certificate from standard input.
|
||||
Certificates must be in PEM format.
|
||||
|
||||
=back
|
||||
|
||||
=head1 VERIFY OPERATION
|
||||
|
||||
The B<verify> program uses the same functions as the internal SSL and S/MIME
|
||||
verification, therefore this description applies to these verify operations
|
||||
too.
|
||||
This command uses the same functions as the internal SSL
|
||||
and S/MIME verification, therefore this description applies to these verify
|
||||
operations too.
|
||||
|
||||
There is one crucial difference between the verify operations performed
|
||||
by the B<verify> program: wherever possible an attempt is made to continue
|
||||
after an error whereas normally the verify operation would halt on the
|
||||
first error. This allows all the problems with a certificate chain to be
|
||||
by this command: wherever possible an attempt is made to
|
||||
continue after an error whereas normally the verify operation would halt on
|
||||
the first error. This allows all the problems with a certificate chain to be
|
||||
determined.
|
||||
|
||||
The verify operation consists of a number of separate steps.
|
||||
@@ -381,19 +366,19 @@ list.
|
||||
The second operation is to check every untrusted certificate's extensions for
|
||||
consistency with the supplied purpose. If the B<-purpose> option is not included
|
||||
then no checks are done. The supplied or "leaf" certificate must have extensions
|
||||
compatible with the supplied purpose and all other certificates must also be valid
|
||||
CA certificates. The precise extensions required are described in more detail in
|
||||
the B<CERTIFICATE EXTENSIONS> section of the B<x509> utility.
|
||||
compatible with the supplied purpose and all other certificates must also be
|
||||
valid CA certificates. The precise extensions required are described in more
|
||||
detail in L<openssl-x509(1)/CERTIFICATE EXTENSIONS>.
|
||||
|
||||
The third operation is to check the trust settings on the root CA. The root CA
|
||||
should be trusted for the supplied purpose.
|
||||
For compatibility with previous versions of OpenSSL, a certificate with no
|
||||
trust settings is considered to be valid for all purposes.
|
||||
|
||||
The final operation is to check the validity of the certificate chain. The validity
|
||||
period is checked against the current system time and the notBefore and notAfter
|
||||
dates in the certificate. The certificate signatures are also checked at this
|
||||
point.
|
||||
The final operation is to check the validity of the certificate chain. The
|
||||
validity period is checked against the current system time and the notBefore
|
||||
and notAfter dates in the certificate. The certificate signatures are also
|
||||
checked at this point.
|
||||
|
||||
If all operations complete successfully then certificate is considered valid. If
|
||||
any operation fails then the certificate is not valid.
|
||||
@@ -414,7 +399,8 @@ then 1 for the CA that signed the certificate and so on. Finally a text version
|
||||
of the error number is presented.
|
||||
|
||||
A partial list of the error codes and messages is shown below, this also
|
||||
includes the name of the error code as defined in the header file x509_vfy.h
|
||||
includes the name of the error code as defined in the header file
|
||||
F<< <openssl/x509_vfy.h> >>.
|
||||
Some of the error codes are defined but never returned: these are described
|
||||
as "unused".
|
||||
|
||||
@@ -706,7 +692,7 @@ IP address mismatch.
|
||||
|
||||
DANE TLSA authentication is enabled, but no TLSA records matched the
|
||||
certificate chain.
|
||||
This error is only possible in L<s_client(1)>.
|
||||
This error is only possible in L<openssl-s_client(1)>.
|
||||
|
||||
=item B<X509_V_ERR_EE_KEY_TOO_SMALL>
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ The OpenSSL CPU settings info.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The output of B<openssl version -a> would typically be used when sending
|
||||
The output of C<openssl version -a> would typically be used when sending
|
||||
in a bug report.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
+92
-98
@@ -8,13 +8,13 @@ openssl-x509 - Certificate display and signing utility
|
||||
|
||||
B<openssl> B<x509>
|
||||
[B<-help>]
|
||||
[B<-inform DER|PEM>]
|
||||
[B<-outform DER|PEM>]
|
||||
[B<-keyform DER|PEM>]
|
||||
[B<-CAform DER|PEM>]
|
||||
[B<-CAkeyform DER|PEM>]
|
||||
[B<-in filename>]
|
||||
[B<-out filename>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-keyform> B<DER>|B<PEM>]
|
||||
[B<-CAform> B<DER>|B<PEM>]
|
||||
[B<-CAkeyform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-serial>]
|
||||
[B<-hash>]
|
||||
[B<-subject_hash>]
|
||||
@@ -22,14 +22,14 @@ B<openssl> B<x509>
|
||||
[B<-ocspid>]
|
||||
[B<-subject>]
|
||||
[B<-issuer>]
|
||||
[B<-nameopt option>]
|
||||
[B<-nameopt> I<option>]
|
||||
[B<-email>]
|
||||
[B<-ocsp_uri>]
|
||||
[B<-startdate>]
|
||||
[B<-enddate>]
|
||||
[B<-purpose>]
|
||||
[B<-dates>]
|
||||
[B<-checkend num>]
|
||||
[B<-checkend> I<num>]
|
||||
[B<-modulus>]
|
||||
[B<-pubkey>]
|
||||
[B<-fingerprint>]
|
||||
@@ -38,40 +38,42 @@ B<openssl> B<x509>
|
||||
[B<-trustout>]
|
||||
[B<-clrtrust>]
|
||||
[B<-clrreject>]
|
||||
[B<-addtrust arg>]
|
||||
[B<-addreject arg>]
|
||||
[B<-setalias arg>]
|
||||
[B<-days arg>]
|
||||
[B<-set_serial n>]
|
||||
[B<-signkey filename>]
|
||||
[B<-passin arg>]
|
||||
[B<-addtrust> I<arg>]
|
||||
[B<-addreject> I<arg>]
|
||||
[B<-setalias> I<arg>]
|
||||
[B<-days> I<arg>]
|
||||
[B<-set_serial> I<n>]
|
||||
[B<-signkey> I<filename>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-x509toreq>]
|
||||
[B<-req>]
|
||||
[B<-CA filename>]
|
||||
[B<-CAkey filename>]
|
||||
[B<-CA> I<filename>]
|
||||
[B<-CAkey> I<filename>]
|
||||
[B<-CAcreateserial>]
|
||||
[B<-CAserial filename>]
|
||||
[B<-CAserial> I<filename>]
|
||||
[B<-new>]
|
||||
[B<-force_pubkey filename>]
|
||||
[B<-subj arg>]
|
||||
[B<-force_pubkey> I<filename>]
|
||||
[B<-subj> I<arg>]
|
||||
[B<-text>]
|
||||
[B<-ext extensions>]
|
||||
[B<-certopt option>]
|
||||
[B<-ext> I<extensions>]
|
||||
[B<-certopt> I<option>]
|
||||
[B<-C>]
|
||||
[B<-I<digest>>]
|
||||
[B<-clrext>]
|
||||
[B<-extfile filename>]
|
||||
[B<-extensions section>]
|
||||
[B<-sigopt nm:v>]
|
||||
[B<-rand file...>]
|
||||
[B<-writerand file>]
|
||||
[B<-engine id>]
|
||||
[B<-extfile> I<filename>]
|
||||
[B<-extensions> I<section>]
|
||||
[B<-sigopt> I<nm>:I<v>]
|
||||
[B<-rand> I<files>]
|
||||
[B<-writerand> I<file>]
|
||||
[B<-engine> I<id>]
|
||||
[B<-preserve_dates>]
|
||||
|
||||
=for openssl ifdef engine subject_hash_old issuer_hash_old
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<x509> command is a multi purpose certificate utility. It can be
|
||||
used to display certificate information, convert certificates to
|
||||
This command is a multi purpose certificate utility. It can
|
||||
be used to display certificate information, convert certificates to
|
||||
various forms, sign certificate requests like a "mini CA" or edit
|
||||
certificate trust settings.
|
||||
|
||||
@@ -88,7 +90,7 @@ various sections.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-inform DER|PEM>
|
||||
=item B<-inform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the input format normally the command will expect an X509
|
||||
certificate but this can change if other options such as B<-req> are
|
||||
@@ -96,17 +98,17 @@ present. The DER format is the DER encoding of the certificate and PEM
|
||||
is the base64 encoding of the DER encoding with header and footer lines
|
||||
added. The default format is PEM.
|
||||
|
||||
=item B<-outform DER|PEM>
|
||||
=item B<-outform> B<DER>|B<PEM>
|
||||
|
||||
This specifies the output format, the options have the same meaning and default
|
||||
as the B<-inform> option.
|
||||
|
||||
=item B<-in filename>
|
||||
=item B<-in> I<filename>
|
||||
|
||||
This specifies the input filename to read a certificate from or standard input
|
||||
if this option is not specified.
|
||||
|
||||
=item B<-out filename>
|
||||
=item B<-out> I<filename>
|
||||
|
||||
This specifies the output filename to write to or standard output by
|
||||
default.
|
||||
@@ -116,26 +118,17 @@ default.
|
||||
The digest to use.
|
||||
This affects any signing or display option that uses a message
|
||||
digest, such as the B<-fingerprint>, B<-signkey> and B<-CA> options.
|
||||
Any digest supported by the OpenSSL B<dgst> command can be used.
|
||||
Any digest supported by the L<openssl-dgst(1)> command can be used.
|
||||
If not specified then SHA1 is used with B<-fingerprint> or
|
||||
the default digest for the signing algorithm is used, typically SHA256.
|
||||
|
||||
=item B<-rand file...>
|
||||
=item B<-rand> I<files>, B<-writerand> I<file>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
|
||||
all others.
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item [B<-writerand file>]
|
||||
=item B<-engine> I<id>
|
||||
|
||||
Writes random data to the specified I<file> upon exit.
|
||||
This can be used with a subsequent B<-rand> flag.
|
||||
|
||||
=item B<-engine id>
|
||||
|
||||
Specifying an engine (by its unique B<id> string) will cause B<x509>
|
||||
Specifying an engine (by its unique I<id> string) will cause this command
|
||||
to attempt to obtain a functional reference to the specified engine,
|
||||
thus initialising it if needed. The engine will then be set as the default
|
||||
for all available algorithms.
|
||||
@@ -151,7 +144,7 @@ Cannot be used with the B<-days> option.
|
||||
=head2 Display Options
|
||||
|
||||
Note: the B<-alias> and B<-purpose> options are also display options
|
||||
but are described in the B<TRUST SETTINGS> section.
|
||||
but are described in the L</Trust Settings> section.
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -161,18 +154,18 @@ Prints out the certificate in text form. Full details are output including the
|
||||
public key, signature algorithms, issuer and subject names, serial number
|
||||
any extensions present and any trust settings.
|
||||
|
||||
=item B<-ext extensions>
|
||||
=item B<-ext> I<extensions>
|
||||
|
||||
Prints out the certificate extensions in text form. Extensions are specified
|
||||
with a comma separated string, e.g., "subjectAltName,subjectKeyIdentifier".
|
||||
See the L<x509v3_config(5)> manual page for the extension names.
|
||||
|
||||
=item B<-certopt option>
|
||||
=item B<-certopt> I<option>
|
||||
|
||||
Customise the output format used with B<-text>. The B<option> argument
|
||||
Customise the output format used with B<-text>. The I<option> argument
|
||||
can be a single option or multiple options separated by commas. The
|
||||
B<-certopt> switch may be also be used more than once to set multiple
|
||||
options. See the B<TEXT OPTIONS> section for more information.
|
||||
options. See the L</Text Options> section for more information.
|
||||
|
||||
=item B<-noout>
|
||||
|
||||
@@ -227,12 +220,12 @@ Outputs the subject name.
|
||||
|
||||
Outputs the issuer name.
|
||||
|
||||
=item B<-nameopt option>
|
||||
=item B<-nameopt> I<option>
|
||||
|
||||
Option which determines how the subject or issuer names are displayed. The
|
||||
B<option> argument can be a single option or multiple options separated by
|
||||
I<option> argument can be a single option or multiple options separated by
|
||||
commas. Alternatively the B<-nameopt> switch may be used more than once to
|
||||
set multiple options. See the B<NAME OPTIONS> section for more information.
|
||||
set multiple options. See the L</Name Options> section for more information.
|
||||
|
||||
=item B<-email>
|
||||
|
||||
@@ -254,10 +247,10 @@ Prints out the expiry date of the certificate, that is the notAfter date.
|
||||
|
||||
Prints out the start and expiry dates of a certificate.
|
||||
|
||||
=item B<-checkend arg>
|
||||
=item B<-checkend> I<arg>
|
||||
|
||||
Checks if the certificate expires within the next B<arg> seconds and exits
|
||||
non-zero if yes it will expire or zero if not.
|
||||
Checks if the certificate expires within the next I<arg> seconds and exits
|
||||
nonzero if yes it will expire or zero if not.
|
||||
|
||||
=item B<-fingerprint>
|
||||
|
||||
@@ -288,8 +281,8 @@ Trust settings currently are only used with a root CA. They allow a finer
|
||||
control over the purposes the root CA can be used for. For example a CA
|
||||
may be trusted for SSL client but not SSL server use.
|
||||
|
||||
See the description of the B<verify> utility for more information on the
|
||||
meaning of trust settings.
|
||||
See the description in L<openssl-verify(1)> for more information
|
||||
on the meaning of trust settings.
|
||||
|
||||
Future versions of OpenSSL will recognize trust settings on any
|
||||
certificate: not just root CAs.
|
||||
@@ -299,13 +292,13 @@ certificate: not just root CAs.
|
||||
|
||||
=item B<-trustout>
|
||||
|
||||
This causes B<x509> to output a B<trusted> certificate. An ordinary
|
||||
Output a B<trusted> certificate rather than an ordinary. An ordinary
|
||||
or trusted certificate can be input but by default an ordinary
|
||||
certificate is output and any trust settings are discarded. With the
|
||||
B<-trustout> option a trusted certificate is output. A trusted
|
||||
certificate is automatically output if any trust settings are modified.
|
||||
|
||||
=item B<-setalias arg>
|
||||
=item B<-setalias> I<arg>
|
||||
|
||||
Sets the alias of the certificate. This will allow the certificate
|
||||
to be referred to using a nickname for example "Steve's Certificate".
|
||||
@@ -322,7 +315,7 @@ Clears all the permitted or trusted uses of the certificate.
|
||||
|
||||
Clears all the prohibited or rejected uses of the certificate.
|
||||
|
||||
=item B<-addtrust arg>
|
||||
=item B<-addtrust> I<arg>
|
||||
|
||||
Adds a trusted certificate use.
|
||||
Any object name can be used here but currently only B<clientAuth> (SSL client
|
||||
@@ -332,7 +325,7 @@ As of OpenSSL 1.1.0, the last of these blocks all purposes when rejected or
|
||||
enables all purposes when trusted.
|
||||
Other OpenSSL applications may define additional uses.
|
||||
|
||||
=item B<-addreject arg>
|
||||
=item B<-addreject> I<arg>
|
||||
|
||||
Adds a prohibited use. It accepts the same values as the B<-addtrust>
|
||||
option.
|
||||
@@ -340,19 +333,19 @@ option.
|
||||
=item B<-purpose>
|
||||
|
||||
This option performs tests on the certificate extensions and outputs
|
||||
the results. For a more complete description see the B<CERTIFICATE
|
||||
EXTENSIONS> section.
|
||||
the results. For a more complete description see the
|
||||
L</CERTIFICATE EXTENSIONS> section.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Signing Options
|
||||
|
||||
The B<x509> utility can be used to sign certificates and requests: it
|
||||
This command can be used to sign certificates and requests: it
|
||||
can thus behave like a "mini CA".
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-signkey filename>
|
||||
=item B<-signkey> I<filename>
|
||||
|
||||
This option causes the input file to be self signed using the supplied
|
||||
private key.
|
||||
@@ -364,15 +357,15 @@ and the end date to a value determined by the B<-days> option.
|
||||
It retains any certificate extensions unless the B<-clrext> option is supplied;
|
||||
this includes, for example, any existing key identifier extensions.
|
||||
|
||||
=item B<-sigopt nm:v>
|
||||
=item B<-sigopt> I<nm>:I<v>
|
||||
|
||||
Pass options to the signature algorithm during sign or verify operations.
|
||||
Names and values of these options are algorithm-specific.
|
||||
|
||||
=item B<-passin arg>
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The key password source. For more information about the format of B<arg>
|
||||
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
|
||||
The key password source. For more information about the format of I<arg>
|
||||
see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-clrext>
|
||||
|
||||
@@ -381,12 +374,12 @@ certificate is being created from another certificate (for example with
|
||||
the B<-signkey> or the B<-CA> options). Normally all extensions are
|
||||
retained.
|
||||
|
||||
=item B<-keyform PEM|DER>
|
||||
=item B<-keyform> B<DER>|B<PEM>
|
||||
|
||||
Specifies the format (DER or PEM) of the private key file used in the
|
||||
B<-signkey> option.
|
||||
|
||||
=item B<-days arg>
|
||||
=item B<-days> I<arg>
|
||||
|
||||
Specifies the number of days to make a certificate valid for. The default
|
||||
is 30 days. Cannot be used with the B<-preserve_dates> option.
|
||||
@@ -401,32 +394,32 @@ is used to pass the required private key.
|
||||
By default a certificate is expected on input. With this option a
|
||||
certificate request is expected instead.
|
||||
|
||||
=item B<-set_serial n>
|
||||
=item B<-set_serial> I<n>
|
||||
|
||||
Specifies the serial number to use. This option can be used with either
|
||||
the B<-signkey> or B<-CA> options. If used in conjunction with the B<-CA>
|
||||
option the serial number file (as specified by the B<-CAserial> or
|
||||
B<-CAcreateserial> options) is not used.
|
||||
|
||||
The serial number can be decimal or hex (if preceded by B<0x>).
|
||||
The serial number can be decimal or hex (if preceded by C<0x>).
|
||||
|
||||
=item B<-CA filename>
|
||||
=item B<-CA> I<filename>
|
||||
|
||||
Specifies the CA certificate to be used for signing. When this option is
|
||||
present B<x509> behaves like a "mini CA". The input file is signed by this
|
||||
CA using this option: that is its issuer name is set to the subject name
|
||||
present, this command behaves like a "mini CA". The input file is signed by
|
||||
this CA using this option: that is its issuer name is set to the subject name
|
||||
of the CA and it is digitally signed using the CAs private key.
|
||||
|
||||
This option is normally combined with the B<-req> option. Without the
|
||||
B<-req> option the input is a certificate which must be self signed.
|
||||
|
||||
=item B<-CAkey filename>
|
||||
=item B<-CAkey> I<filename>
|
||||
|
||||
Sets the CA private key to sign a certificate with. If this option is
|
||||
not specified then it is assumed that the CA private key is present in
|
||||
the CA certificate file.
|
||||
|
||||
=item B<-CAserial filename>
|
||||
=item B<-CAserial> I<filename>
|
||||
|
||||
Sets the CA serial number file to use.
|
||||
|
||||
@@ -436,8 +429,9 @@ an even number of hex digits with the serial number to use. After each
|
||||
use the serial number is incremented and written out to the file again.
|
||||
|
||||
The default filename consists of the CA certificate file base name with
|
||||
".srl" appended. For example if the CA certificate file is called
|
||||
"mycacert.pem" it expects to find a serial number file called "mycacert.srl".
|
||||
F<.srl> appended. For example if the CA certificate file is called
|
||||
F<mycacert.pem> it expects to find a serial number file called
|
||||
F<mycacert.srl>.
|
||||
|
||||
=item B<-CAcreateserial>
|
||||
|
||||
@@ -447,12 +441,12 @@ have the 1 as its serial number. If the B<-CA> option is specified
|
||||
and the serial number file does not exist a random number is generated;
|
||||
this is the recommended practice.
|
||||
|
||||
=item B<-extfile filename>
|
||||
=item B<-extfile> I<filename>
|
||||
|
||||
File containing certificate extensions to use. If not specified then
|
||||
no extensions are added to the certificate.
|
||||
|
||||
=item B<-extensions section>
|
||||
=item B<-extensions> I<section>
|
||||
|
||||
The section to add certificate extensions from. If this option is not
|
||||
specified then the extensions should either be contained in the unnamed
|
||||
@@ -467,9 +461,9 @@ Generate a certificate from scratch, not using an input certificate
|
||||
or certificate request. So the B<-in> option must not be used in this case.
|
||||
Instead, the B<-subj> and <-force_pubkey> options need to be given.
|
||||
|
||||
=item B<-force_pubkey filename>
|
||||
=item B<-force_pubkey> I<filename>
|
||||
|
||||
When a certificate is created set its public key to the key in B<filename>
|
||||
When a certificate is created set its public key to the key in I<filename>
|
||||
instead of the key contained in the input or given with the B<-signkey> option.
|
||||
|
||||
This option is useful for creating self-issued certificates that are not
|
||||
@@ -479,13 +473,13 @@ generate a certificate containing any desired public key.
|
||||
|
||||
The format of the key file can be specified using the B<-keyform> option.
|
||||
|
||||
=item B<-subj arg>
|
||||
=item B<-subj> I<arg>
|
||||
|
||||
When a certificate is created set its subject name to the given value.
|
||||
The arg must be formatted as I</type0=value0/type1=value1/type2=...>.
|
||||
The arg must be formatted as C</type0=value0/type1=value1/type2=...>.
|
||||
Keyword characters may be escaped by \ (backslash), and whitespace is retained.
|
||||
Empty values are permitted, but the corresponding type will not be included
|
||||
in the certificate. Giving a single I</> will lead to an empty sequence of RDNs
|
||||
in the certificate. Giving a single C</> will lead to an empty sequence of RDNs
|
||||
(a NULL subject DN).
|
||||
|
||||
Unless the B<-CA> option is given the issuer is set to the same value.
|
||||
@@ -498,8 +492,8 @@ or certificate request.
|
||||
|
||||
=head2 Name Options
|
||||
|
||||
The B<nameopt> command line switch determines how the subject and issuer
|
||||
names are displayed. If no B<nameopt> switch is present the default "oneline"
|
||||
The B<-nameopt> command line switch determines how the subject and issuer
|
||||
names are displayed. If no B<-nameopt> switch is present the default "oneline"
|
||||
format is used which is compatible with previous versions of OpenSSL.
|
||||
Each option is described in detail below, all options can be preceded by
|
||||
a B<-> to turn the option off. Only the first four will normally be used.
|
||||
@@ -716,7 +710,7 @@ Hex dump unsupported extensions.
|
||||
|
||||
=item B<ca_default>
|
||||
|
||||
The value used by the B<ca> utility, equivalent to B<no_issuer>, B<no_pubkey>,
|
||||
The value used by L<openssl-ca(1)>, equivalent to B<no_issuer>, B<no_pubkey>,
|
||||
B<no_header>, and B<no_version>.
|
||||
|
||||
=back
|
||||
@@ -951,9 +945,9 @@ L<x509v3_config(5)>
|
||||
|
||||
The hash algorithm used in the B<-subject_hash> and B<-issuer_hash> options
|
||||
before OpenSSL 1.0.0 was based on the deprecated MD5 algorithm and the encoding
|
||||
of the distinguished name. In OpenSSL 1.0.0 and later it is based on a
|
||||
canonical version of the DN using SHA1. This means that any directories using
|
||||
the old form must have their links rebuilt using B<c_rehash> or similar.
|
||||
of the distinguished name. In OpenSSL 1.0.0 and later it is based on a canonical
|
||||
version of the DN using SHA1. This means that any directories using the old
|
||||
form must have their links rebuilt using L<openssl-rehash(1)> or similar.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
||||
+118
-34
@@ -8,10 +8,18 @@ openssl - OpenSSL command line tool
|
||||
|
||||
B<openssl>
|
||||
I<command>
|
||||
[ I<command_opts> ]
|
||||
[ I<command_args> ]
|
||||
[ I<command_opts> ... ]
|
||||
[ I<command_args> ... ]
|
||||
|
||||
B<openssl> B<list> [ B<standard-commands> | B<digest-commands> | B<cipher-commands> | B<cipher-algorithms> | B<digest-algorithms> | B<mac-algorithms> | B<public-key-algorithms>]
|
||||
B<openssl>
|
||||
B<list>
|
||||
B<-standard-commands> |
|
||||
B<-digest-commands> |
|
||||
B<-cipher-commands> |
|
||||
B<-cipher-algorithms> |
|
||||
B<-digest-algorithms> |
|
||||
B<-mac-algorithms> |
|
||||
B<-public-key-algorithms>
|
||||
|
||||
B<openssl> B<no->I<XXX> [ I<arbitrary options> ]
|
||||
|
||||
@@ -32,12 +40,12 @@ It can be used for
|
||||
o Encryption and Decryption with Ciphers
|
||||
o SSL/TLS Client and Server Tests
|
||||
o Handling of S/MIME signed or encrypted mail
|
||||
o Time Stamp requests, generation and verification
|
||||
o Timestamp requests, generation and verification
|
||||
|
||||
=head1 COMMAND SUMMARY
|
||||
|
||||
The B<openssl> program provides a rich variety of commands (I<command> in the
|
||||
SYNOPSIS above), each of which often has a wealth of options and arguments
|
||||
The B<openssl> program provides a rich variety of sub-commands (I<command> in
|
||||
the SYNOPSIS above), each of which often has a wealth of options and arguments
|
||||
(I<command_opts> and I<command_args> in the SYNOPSIS).
|
||||
|
||||
Detailed documentation and use cases for most standard subcommands are available
|
||||
@@ -48,22 +56,22 @@ arguments and have a B<-config> option to specify that file.
|
||||
The environment variable B<OPENSSL_CONF> can be used to specify
|
||||
the location of the file.
|
||||
If the environment variable is not specified, then the file is named
|
||||
B<openssl.cnf> in the default certificate storage area, whose value
|
||||
F<openssl.cnf> in the default certificate storage area, whose value
|
||||
depends on the configuration flags specified when the OpenSSL
|
||||
was built.
|
||||
|
||||
The list parameters B<standard-commands>, B<digest-commands>,
|
||||
and B<cipher-commands> output a list (one entry per line) of the names
|
||||
The list options B<-standard-commands>, B<-digest-commands>,
|
||||
and B<-cipher-commands> output a list (one entry per line) of the names
|
||||
of all standard commands, message digest commands, or cipher commands,
|
||||
respectively, that are available in the present B<openssl> utility.
|
||||
respectively, that are available.
|
||||
|
||||
The list parameters B<cipher-algorithms>, B<digest-algorithms>,
|
||||
and B<mac-algorithms> list all cipher, message digest, and message
|
||||
The list parameters B<-cipher-algorithms>, B<-digest-algorithms>,
|
||||
and B<-mac-algorithms> list all cipher, message digest, and message
|
||||
authentication code names, one entry per line. Aliases are listed as:
|
||||
|
||||
from => to
|
||||
|
||||
The list parameter B<public-key-algorithms> lists all supported public
|
||||
The list parameter B<-public-key-algorithms> lists all supported public
|
||||
key algorithms.
|
||||
|
||||
The command B<no->I<XXX> tests whether a command of the
|
||||
@@ -77,7 +85,7 @@ availability of ciphers in the B<openssl> program. (B<no->I<XXX> is
|
||||
not able to detect pseudo-commands such as B<quit>,
|
||||
B<list>, or B<no->I<XXX> itself.)
|
||||
|
||||
=head2 Standard Commands
|
||||
=head2 Standard Sub-commands
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -108,17 +116,17 @@ CRL to PKCS#7 Conversion.
|
||||
=item B<dgst>
|
||||
|
||||
Message Digest calculation. MAC calculations are superseded by
|
||||
L<mac(1)>.
|
||||
L<openssl-mac(1)>.
|
||||
|
||||
=item B<dh>
|
||||
|
||||
Diffie-Hellman Parameter Management.
|
||||
Obsoleted by L<dhparam(1)>.
|
||||
Obsoleted by L<openssl-dhparam(1)>.
|
||||
|
||||
=item B<dhparam>
|
||||
|
||||
Generation and Management of Diffie-Hellman Parameters. Superseded by
|
||||
L<genpkey(1)> and L<pkeyparam(1)>.
|
||||
L<openssl-genpkey(1)> and L<openssl-pkeyparam(1)>.
|
||||
|
||||
=item B<dsa>
|
||||
|
||||
@@ -127,7 +135,7 @@ DSA Data Management.
|
||||
=item B<dsaparam>
|
||||
|
||||
DSA Parameter Generation and Management. Superseded by
|
||||
L<genpkey(1)> and L<pkeyparam(1)>.
|
||||
L<openssl-genpkey(1)> and L<openssl-pkeyparam(1)>.
|
||||
|
||||
=item B<ec>
|
||||
|
||||
@@ -152,12 +160,12 @@ Error Number to Error String Conversion.
|
||||
=item B<gendh>
|
||||
|
||||
Generation of Diffie-Hellman Parameters.
|
||||
Obsoleted by L<dhparam(1)>.
|
||||
Obsoleted by L<openssl-dhparam(1)>.
|
||||
|
||||
=item B<gendsa>
|
||||
|
||||
Generation of DSA Private Key from Parameters. Superseded by
|
||||
L<genpkey(1)> and L<pkey(1)>.
|
||||
L<openssl-genpkey(1)> and L<openssl-pkey(1)>.
|
||||
|
||||
=item B<genpkey>
|
||||
|
||||
@@ -165,7 +173,7 @@ Generation of Private Key or Parameters.
|
||||
|
||||
=item B<genrsa>
|
||||
|
||||
Generation of RSA Private Key. Superseded by L<genpkey(1)>.
|
||||
Generation of RSA Private Key. Superseded by L<openssl-genpkey(1)>.
|
||||
|
||||
=item B<info>
|
||||
|
||||
@@ -238,7 +246,7 @@ RSA key management.
|
||||
=item B<rsautl>
|
||||
|
||||
RSA utility for signing, verification, encryption, and decryption. Superseded
|
||||
by L<pkeyutl(1)>.
|
||||
by L<openssl-pkeyutl(1)>.
|
||||
|
||||
=item B<s_client>
|
||||
|
||||
@@ -390,7 +398,8 @@ The following aliases provide convenient access to the most used encodings
|
||||
and ciphers.
|
||||
|
||||
Depending on how OpenSSL was configured and built, not all ciphers listed
|
||||
here may be present. See L<enc(1)> for more information and command usage.
|
||||
here may be present. See L<openssl-enc(1)> for more information and command
|
||||
usage.
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -496,6 +505,14 @@ This section describes some common options with common behavior.
|
||||
=item B<-help>
|
||||
|
||||
Provides a terse summary of all options.
|
||||
If an option takes an argument, the "type" of argument is also given.
|
||||
|
||||
=item B<-->
|
||||
|
||||
This terminates the list of options. It is mostly useful if any filename
|
||||
parameters start with a minus sign:
|
||||
|
||||
openssl verify [flags...] -- -cert1.pem...
|
||||
|
||||
=back
|
||||
|
||||
@@ -514,29 +531,29 @@ L<passphrase-encoding(7)>.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<pass:password>
|
||||
=item B<pass:>I<password>
|
||||
|
||||
The actual password is B<password>. Since the password is visible
|
||||
The actual password is I<password>. Since the password is visible
|
||||
to utilities (like 'ps' under Unix) this form should only be used
|
||||
where security is not important.
|
||||
|
||||
=item B<env:var>
|
||||
=item B<env:>I<var>
|
||||
|
||||
Obtain the password from the environment variable B<var>. Since
|
||||
Obtain the password from the environment variable I<var>. Since
|
||||
the environment of other processes is visible on certain platforms
|
||||
(e.g. ps under certain Unix OSes) this option should be used with caution.
|
||||
|
||||
=item B<file:pathname>
|
||||
=item B<file:>I<pathname>
|
||||
|
||||
The first line of B<pathname> is the password. If the same B<pathname>
|
||||
The first line of I<pathname> is the password. If the same I<pathname>
|
||||
argument is supplied to B<-passin> and B<-passout> arguments then the first
|
||||
line will be used for the input password and the next line for the output
|
||||
password. B<pathname> need not refer to a regular file: it could for example
|
||||
password. I<pathname> need not refer to a regular file: it could for example
|
||||
refer to a device or named pipe.
|
||||
|
||||
=item B<fd:number>
|
||||
=item B<fd:>I<number>
|
||||
|
||||
Read the password from the file descriptor B<number>. This can be used to
|
||||
Read the password from the file descriptor I<number>. This can be used to
|
||||
send the data via a pipe for example.
|
||||
|
||||
=item B<stdin>
|
||||
@@ -545,11 +562,78 @@ Read the password from standard input.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Trusted Certificate Options
|
||||
|
||||
Part of validating a certificate includes verifying that the chain of CA's
|
||||
can be traced up to an existing trusted root. The following options specify
|
||||
how to list the trusted roots, also known as trust anchors. A collection
|
||||
of trusted roots is called a I<trust store>.
|
||||
|
||||
Note that OpenSSL does not provide a default set of trust anchors. Many
|
||||
Linux distributions include a system default and configure OpenSSL to point
|
||||
to that. Mozilla maintains an influential trust store that can be found at
|
||||
L<https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/>.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-CAfile> I<file>
|
||||
|
||||
Load the specified file which contains one or more PEM-format certificates
|
||||
of CA's that are trusted.
|
||||
|
||||
=item B<-no-CAfile>
|
||||
|
||||
Do not load the default file of trusted certificates.
|
||||
|
||||
=item B<-CApath> I<dir>
|
||||
|
||||
Use the specified directory as a list of trust certificates. That is,
|
||||
files should be named with the hash of the X.509 SubjectName of each
|
||||
certificate. This is so that the library can extract the IssuerName,
|
||||
hash it, and directly lookup the file to get the issuer certificate.
|
||||
See L<openssl-rehash(1)> for information on creating this type of directory.
|
||||
|
||||
=item B<-no-CApath>
|
||||
|
||||
Do not use the default directory of trusted certificates.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Random State Options
|
||||
|
||||
Prior to OpenSSL 3.0, it was common for applications to store information
|
||||
about the state of the random-number generator in a file that was loaded
|
||||
at startup and rewritten upon exit. On modern operating systems, this is
|
||||
generally no longer necessary as OpenSSL will seed itself from the
|
||||
appropriate CPU flags, device files, and so on. These flags are still
|
||||
supported for special platforms or circumstances that might require them.
|
||||
|
||||
It is generally an error to use the same seed file more than once and
|
||||
every use of B<-rand> should be paired with B<-writerand>.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-rand> I<files>
|
||||
|
||||
A file or files containing random data used to seed the random number
|
||||
generator.
|
||||
Multiple files can be specified separated by an OS-dependent character.
|
||||
The separator is C<;> for MS-Windows, C<,> for OpenVMS, and C<:> for
|
||||
all others. Another way to specify multiple files is to repeat this flag
|
||||
with different filenames.
|
||||
|
||||
=item B<-writerand> I<file>
|
||||
|
||||
Writes the seed data to the specified I<file> upon exit.
|
||||
This file can be used in a subsequent command invocation.
|
||||
|
||||
=back
|
||||
|
||||
=head1 ENVIRONMENT
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<OPENSSL_TRACE=>I<name,...>
|
||||
=item B<OPENSSL_TRACE=>I<name>[,...]
|
||||
|
||||
Enable tracing output of OpenSSL library, by name.
|
||||
This output will only make sense if you know OpenSSL internals well.
|
||||
@@ -671,7 +755,7 @@ L<x509v3_config(5)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The B<list->I<XXX>B<-algorithms> pseudo-commands were added in OpenSSL 1.0.0;
|
||||
The B<list> -I<XXX>B<-algorithms> options were added in OpenSSL 1.0.0;
|
||||
For notes on the availability of other commands, see their individual
|
||||
manual pages.
|
||||
|
||||
|
||||
@@ -7,31 +7,30 @@ tsget - Time Stamping HTTP/HTTPS client
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<tsget>
|
||||
B<-h> server_url
|
||||
[B<-e> extension]
|
||||
[B<-o> output]
|
||||
B<-h> I<server_url>
|
||||
[B<-e> I<extension>]
|
||||
[B<-o> I<output>]
|
||||
[B<-v>]
|
||||
[B<-d>]
|
||||
[B<-k> private_key.pem]
|
||||
[B<-p> key_password]
|
||||
[B<-c> client_cert.pem]
|
||||
[B<-C> CA_certs.pem]
|
||||
[B<-P> CA_path]
|
||||
[B<-r> file:file...]
|
||||
[B<-g> EGD_socket]
|
||||
[request]...
|
||||
[B<-k> I<private_key.pem>]
|
||||
[B<-p> I<key_password>]
|
||||
[B<-c> I<client_cert.pem>]
|
||||
[B<-C> I<CA_certs.pem>]
|
||||
[B<-P> I<CA_path>]
|
||||
[B<-r> I<files>]
|
||||
[B<-g> I<EGD_socket>]
|
||||
[I<request> ...]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<tsget> command can be used for sending a time stamp request, as
|
||||
specified in B<RFC 3161>, to a time stamp server over HTTP or HTTPS and storing
|
||||
the time stamp response in a file. This tool cannot be used for creating the
|
||||
requests and verifying responses, you can use the OpenSSL B<ts(1)> command to
|
||||
do that. B<tsget> can send several requests to the server without closing
|
||||
the TCP connection if more than one requests are specified on the command
|
||||
line.
|
||||
This command can be used for sending a timestamp request, as specified
|
||||
in B<RFC 3161>, to a timestamp server over HTTP or HTTPS and storing the
|
||||
timestamp response in a file. It cannot be used for creating the requests
|
||||
and verifying responses, you have to use L<openssl-ts(1)> to do that. This
|
||||
command can send several requests to the server without closing the TCP
|
||||
connection if more than one requests are specified on the command line.
|
||||
|
||||
The tool sends the following HTTP request for each time stamp request:
|
||||
This command sends the following HTTP request for each timestamp request:
|
||||
|
||||
POST url HTTP/1.1
|
||||
User-Agent: OpenTSA tsget.pl/<version>
|
||||
@@ -43,28 +42,28 @@ The tool sends the following HTTP request for each time stamp request:
|
||||
|
||||
...binary request specified by the user...
|
||||
|
||||
B<tsget> expects a response of type application/timestamp-reply, which is
|
||||
It expects a response of type application/timestamp-reply, which is
|
||||
written to a file without any interpretation.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-h> server_url
|
||||
=item B<-h> I<server_url>
|
||||
|
||||
The URL of the HTTP/HTTPS server listening for time stamp requests.
|
||||
The URL of the HTTP/HTTPS server listening for timestamp requests.
|
||||
|
||||
=item B<-e> extension
|
||||
=item B<-e> I<extension>
|
||||
|
||||
If the B<-o> option is not given this argument specifies the extension of the
|
||||
output files. The base name of the output file will be the same as those of
|
||||
the input files. Default extension is '.tsr'. (Optional)
|
||||
the input files. Default extension is F<.tsr>. (Optional)
|
||||
|
||||
=item B<-o> output
|
||||
=item B<-o> I<output>
|
||||
|
||||
This option can be specified only when just one request is sent to the
|
||||
server. The time stamp response will be written to the given output file. '-'
|
||||
means standard output. In case of multiple time stamp requests or the absence
|
||||
server. The timestamp response will be written to the given output file. '-'
|
||||
means standard output. In case of multiple timestamp requests or the absence
|
||||
of this argument the names of the output files will be derived from the names
|
||||
of the input files and the default or specified extension argument. (Optional)
|
||||
|
||||
@@ -75,57 +74,57 @@ error. (Optional)
|
||||
|
||||
=item B<-d>
|
||||
|
||||
Switches on verbose mode for the underlying B<curl> library. You can see
|
||||
detailed debug messages for the connection. (Optional)
|
||||
=for comment perlpodstyle(1) says to refer to modules without section
|
||||
|
||||
=item B<-k> private_key.pem
|
||||
Switches on verbose mode for the underlying perl module L<WWW::Curl::Easy>.
|
||||
You can see detailed debug messages for the connection. (Optional)
|
||||
|
||||
=item B<-k> I<private_key.pem>
|
||||
|
||||
(HTTPS) In case of certificate-based client authentication over HTTPS
|
||||
<private_key.pem> must contain the private key of the user. The private key
|
||||
I<private_key.pem> must contain the private key of the user. The private key
|
||||
file can optionally be protected by a passphrase. The B<-c> option must also
|
||||
be specified. (Optional)
|
||||
|
||||
=item B<-p> key_password
|
||||
=item B<-p> I<key_password>
|
||||
|
||||
(HTTPS) Specifies the passphrase for the private key specified by the B<-k>
|
||||
argument. If this option is omitted and the key is passphrase protected B<tsget>
|
||||
will ask for it. (Optional)
|
||||
argument. If this option is omitted and the key is passphrase protected,
|
||||
it will be prompted for. (Optional)
|
||||
|
||||
=item B<-c> client_cert.pem
|
||||
=item B<-c> I<client_cert.pem>
|
||||
|
||||
(HTTPS) In case of certificate-based client authentication over HTTPS
|
||||
<client_cert.pem> must contain the X.509 certificate of the user. The B<-k>
|
||||
I<client_cert.pem> must contain the X.509 certificate of the user. The B<-k>
|
||||
option must also be specified. If this option is not specified no
|
||||
certificate-based client authentication will take place. (Optional)
|
||||
|
||||
=item B<-C> CA_certs.pem
|
||||
=item B<-C> I<CA_certs.pem>
|
||||
|
||||
(HTTPS) The trusted CA certificate store. The certificate chain of the peer's
|
||||
certificate must include one of the CA certificates specified in this file.
|
||||
Either option B<-C> or option B<-P> must be given in case of HTTPS. (Optional)
|
||||
|
||||
=item B<-P> CA_path
|
||||
=item B<-P> I<CA_path>
|
||||
|
||||
(HTTPS) The path containing the trusted CA certificates to verify the peer's
|
||||
certificate. The directory must be prepared with the B<c_rehash>
|
||||
OpenSSL utility. Either option B<-C> or option B<-P> must be given in case of
|
||||
HTTPS. (Optional)
|
||||
certificate. The directory must be prepared with L<openssl-rehash(1)>. Either
|
||||
option B<-C> or option B<-P> must be given in case of HTTPS. (Optional)
|
||||
|
||||
=item B<-rand> file:file...
|
||||
=item B<-r> I<files>
|
||||
|
||||
The files containing random data for seeding the random number
|
||||
generator. Multiple files can be specified, the separator is B<;> for
|
||||
MS-Windows, B<,> for VMS and B<:> for all other platforms. (Optional)
|
||||
See L<openssl(1)/Random State Options> for more information.
|
||||
|
||||
=item B<-g> EGD_socket
|
||||
=item B<-g> I<EGD_socket>
|
||||
|
||||
The name of an EGD socket to get random data from. (Optional)
|
||||
|
||||
=item [request]...
|
||||
=item I<request> ...
|
||||
|
||||
List of files containing B<RFC 3161> DER-encoded time stamp requests. If no
|
||||
requests are specified only one request will be sent to the server and it will be
|
||||
read from the standard input. (Optional)
|
||||
List of files containing B<RFC 3161> DER-encoded timestamp requests. If no
|
||||
requests are specified only one request will be sent to the server and it will
|
||||
be read from the standard input.
|
||||
(Optional)
|
||||
|
||||
=back
|
||||
|
||||
@@ -137,37 +136,37 @@ arguments.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
The examples below presume that B<file1.tsq> and B<file2.tsq> contain valid
|
||||
time stamp requests, tsa.opentsa.org listens at port 8080 for HTTP requests
|
||||
The examples below presume that F<file1.tsq> and F<file2.tsq> contain valid
|
||||
timestamp requests, tsa.opentsa.org listens at port 8080 for HTTP requests
|
||||
and at port 8443 for HTTPS requests, the TSA service is available at the /tsa
|
||||
absolute path.
|
||||
|
||||
Get a time stamp response for file1.tsq over HTTP, output is written to
|
||||
file1.tsr:
|
||||
Get a timestamp response for F<file1.tsq> over HTTP, output is written to
|
||||
F<file1.tsr>:
|
||||
|
||||
tsget -h http://tsa.opentsa.org:8080/tsa file1.tsq
|
||||
|
||||
Get a time stamp response for file1.tsq and file2.tsq over HTTP showing
|
||||
progress, output is written to file1.reply and file2.reply respectively:
|
||||
Get a timestamp response for F<file1.tsq> and F<file2.tsq> over HTTP showing
|
||||
progress, output is written to F<file1.reply> and F<file2.reply> respectively:
|
||||
|
||||
tsget -h http://tsa.opentsa.org:8080/tsa -v -e .reply \
|
||||
file1.tsq file2.tsq
|
||||
|
||||
Create a time stamp request, write it to file3.tsq, send it to the server and
|
||||
write the response to file3.tsr:
|
||||
Create a timestamp request, write it to F<file3.tsq>, send it to the server and
|
||||
write the response to F<file3.tsr>:
|
||||
|
||||
openssl ts -query -data file3.txt -cert | tee file3.tsq \
|
||||
| tsget -h http://tsa.opentsa.org:8080/tsa \
|
||||
-o file3.tsr
|
||||
|
||||
Get a time stamp response for file1.tsq over HTTPS without client
|
||||
Get a timestamp response for F<file1.tsq> over HTTPS without client
|
||||
authentication:
|
||||
|
||||
tsget -h https://tsa.opentsa.org:8443/tsa \
|
||||
-C cacerts.pem file1.tsq
|
||||
|
||||
Get a time stamp response for file1.tsq over HTTPS with certificate-based
|
||||
client authentication (it will ask for the passphrase if client_key.pem is
|
||||
Get a timestamp response for F<file1.tsq> over HTTPS with certificate-based
|
||||
client authentication (it will ask for the passphrase if F<client_key.pem> is
|
||||
protected):
|
||||
|
||||
tsget -h https://tsa.opentsa.org:8443/tsa -C cacerts.pem \
|
||||
@@ -184,12 +183,12 @@ example:
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=for comment foreign manuals: curl(1)
|
||||
=for openssl foreign manuals: WWW::Curl::Easy
|
||||
|
||||
L<openssl(1)>,
|
||||
L<openssl-ts(1)>,
|
||||
L<openssl-curl(1)>,
|
||||
B<RFC 3161>
|
||||
L<WWW::Curl::Easy>,
|
||||
L<RFC 3161|https://www.rfc-editor.org/rfc/rfc3161.html>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -37,7 +37,7 @@ These functions convert to and from B<ASN1_INTEGER> and B<ASN1_ENUMERATED>
|
||||
structures.
|
||||
|
||||
ASN1_INTEGER_get_int64() converts an B<ASN1_INTEGER> into an B<int64_t> type
|
||||
If successful it returns 1 and sets B<*pr> to the value of B<a>. If it fails
|
||||
If successful it returns 1 and sets I<*pr> to the value of I<a>. If it fails
|
||||
(due to invalid type or the value being too big to fit into an B<int64_t> type)
|
||||
it returns 0.
|
||||
|
||||
@@ -45,26 +45,26 @@ ASN1_INTEGER_get_uint64() is similar to ASN1_INTEGER_get_int64_t() except it
|
||||
converts to a B<uint64_t> type and an error is returned if the passed integer
|
||||
is negative.
|
||||
|
||||
ASN1_INTEGER_get() also returns the value of B<a> but it returns 0 if B<a> is
|
||||
ASN1_INTEGER_get() also returns the value of I<a> but it returns 0 if I<a> is
|
||||
NULL and -1 on error (which is ambiguous because -1 is a legitimate value for
|
||||
an B<ASN1_INTEGER>). New applications should use ASN1_INTEGER_get_int64()
|
||||
instead.
|
||||
|
||||
ASN1_INTEGER_set_int64() sets the value of B<ASN1_INTEGER> B<a> to the
|
||||
B<int64_t> value B<r>.
|
||||
ASN1_INTEGER_set_int64() sets the value of B<ASN1_INTEGER> I<a> to the
|
||||
B<int64_t> value I<r>.
|
||||
|
||||
ASN1_INTEGER_set_uint64() sets the value of B<ASN1_INTEGER> B<a> to the
|
||||
B<uint64_t> value B<r>.
|
||||
ASN1_INTEGER_set_uint64() sets the value of B<ASN1_INTEGER> I<a> to the
|
||||
B<uint64_t> value I<r>.
|
||||
|
||||
ASN1_INTEGER_set() sets the value of B<ASN1_INTEGER> B<a> to the B<long> value
|
||||
B<v>.
|
||||
ASN1_INTEGER_set() sets the value of B<ASN1_INTEGER> I<a> to the I<long> value
|
||||
I<v>.
|
||||
|
||||
BN_to_ASN1_INTEGER() converts B<BIGNUM> B<bn> to an B<ASN1_INTEGER>. If B<ai>
|
||||
is NULL a new B<ASN1_INTEGER> structure is returned. If B<ai> is not NULL then
|
||||
BN_to_ASN1_INTEGER() converts B<BIGNUM> I<bn> to an B<ASN1_INTEGER>. If I<ai>
|
||||
is NULL a new B<ASN1_INTEGER> structure is returned. If I<ai> is not NULL then
|
||||
the existing structure will be used instead.
|
||||
|
||||
ASN1_INTEGER_to_BN() converts ASN1_INTEGER B<ai> into a B<BIGNUM>. If B<bn> is
|
||||
NULL a new B<BIGNUM> structure is returned. If B<bn> is not NULL then the
|
||||
ASN1_INTEGER_to_BN() converts ASN1_INTEGER I<ai> into a B<BIGNUM>. If I<bn> is
|
||||
NULL a new B<BIGNUM> structure is returned. If I<bn> is not NULL then the
|
||||
existing structure will be used instead.
|
||||
|
||||
ASN1_ENUMERATED_get_int64(), ASN1_ENUMERATED_set_int64(),
|
||||
@@ -72,8 +72,8 @@ ASN1_ENUMERATED_set(), BN_to_ASN1_ENUMERATED() and ASN1_ENUMERATED_to_BN()
|
||||
behave in an identical way to their ASN1_INTEGER counterparts except they
|
||||
operate on an B<ASN1_ENUMERATED> value.
|
||||
|
||||
ASN1_ENUMERATED_get() returns the value of B<a> in a similar way to
|
||||
ASN1_INTEGER_get() but it returns B<0xffffffffL> if the value of B<a> will not
|
||||
ASN1_ENUMERATED_get() returns the value of I<a> in a similar way to
|
||||
ASN1_INTEGER_get() but it returns B<0xffffffffL> if the value of I<a> will not
|
||||
fit in a long type. New applications should use ASN1_ENUMERATED_get_int64()
|
||||
instead.
|
||||
|
||||
|
||||
@@ -13,15 +13,15 @@ ASN1_ITEM_lookup, ASN1_ITEM_get - lookup ASN.1 structures
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
ASN1_ITEM_lookup() returns the B<ASN1_ITEM name>.
|
||||
ASN1_ITEM_lookup() returns the B<ASN1_ITEM> named I<name>.
|
||||
|
||||
ASN1_ITEM_get() returns the B<ASN1_ITEM> with index B<i>. This function
|
||||
returns B<NULL> if the index B<i> is out of range.
|
||||
ASN1_ITEM_get() returns the B<ASN1_ITEM> with index I<i>. This function
|
||||
returns NULL if the index I<i> is out of range.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ASN1_ITEM_lookup() and ASN1_ITEM_get() return a valid B<ASN1_ITEM> structure
|
||||
or B<NULL> if an error occurred.
|
||||
or NULL if an error occurred.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
@@ -13,23 +13,23 @@ ASN1_OBJECT_new, ASN1_OBJECT_free - object allocation functions
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ASN1_OBJECT allocation routines, allocate and free an
|
||||
ASN1_OBJECT structure, which represents an ASN1 OBJECT IDENTIFIER.
|
||||
The B<ASN1_OBJECT> allocation routines, allocate and free an
|
||||
B<ASN1_OBJECT> structure, which represents an ASN1 OBJECT IDENTIFIER.
|
||||
|
||||
ASN1_OBJECT_new() allocates and initializes an ASN1_OBJECT structure.
|
||||
ASN1_OBJECT_new() allocates and initializes an B<ASN1_OBJECT> structure.
|
||||
|
||||
ASN1_OBJECT_free() frees up the B<ASN1_OBJECT> structure B<a>.
|
||||
If B<a> is NULL, nothing is done.
|
||||
ASN1_OBJECT_free() frees up the B<ASN1_OBJECT> structure I<a>.
|
||||
If I<a> is NULL, nothing is done.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Although ASN1_OBJECT_new() allocates a new ASN1_OBJECT structure it
|
||||
Although ASN1_OBJECT_new() allocates a new B<ASN1_OBJECT> structure it
|
||||
is almost never used in applications. The ASN1 object utility functions
|
||||
such as OBJ_nid2obj() are used instead.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
If the allocation fails, ASN1_OBJECT_new() returns B<NULL> and sets an error
|
||||
If the allocation fails, ASN1_OBJECT_new() returns NULL and sets an error
|
||||
code that can be obtained by L<ERR_get_error(3)>.
|
||||
Otherwise it returns a pointer to the newly allocated structure.
|
||||
|
||||
|
||||
@@ -26,16 +26,16 @@ B<ASN1_STRING_TABLE> is a table which holds string information
|
||||
=head2 Functions
|
||||
|
||||
ASN1_STRING_TABLE_add() adds a new B<ASN1_STRING_TABLE> item into the
|
||||
local ASN1 string table based on the B<nid> along with other parameters.
|
||||
local ASN1 string table based on the I<nid> along with other parameters.
|
||||
|
||||
If the item is already in the table, fields of B<ASN1_STRING_TABLE> are
|
||||
updated (depending on the values of those parameters, e.g., B<minsize>
|
||||
and B<maxsize> >= 0, B<mask> and B<flags> != 0). If the B<nid> is standard,
|
||||
updated (depending on the values of those parameters, e.g., I<minsize>
|
||||
and I<maxsize> >= 0, I<mask> and I<flags> != 0). If the I<nid> is standard,
|
||||
a copy of the standard B<ASN1_STRING_TABLE> is created and updated with
|
||||
other parameters.
|
||||
|
||||
ASN1_STRING_TABLE_get() searches for an B<ASN1_STRING_TABLE> item based
|
||||
on B<nid>. It will search the local table first, then the standard one.
|
||||
on I<nid>. It will search the local table first, then the standard one.
|
||||
|
||||
ASN1_STRING_TABLE_cleanup() frees all B<ASN1_STRING_TABLE> items added
|
||||
by ASN1_STRING_TABLE_add().
|
||||
@@ -45,7 +45,7 @@ by ASN1_STRING_TABLE_add().
|
||||
ASN1_STRING_TABLE_add() returns 1 on success, 0 if an error occurred.
|
||||
|
||||
ASN1_STRING_TABLE_get() returns a valid B<ASN1_STRING_TABLE> structure
|
||||
or B<NULL> if nothing is found.
|
||||
or NULL if nothing is found.
|
||||
|
||||
ASN1_STRING_TABLE_cleanup() does not return a value.
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ ASN1_STRING_to_UTF8 - ASN1_STRING utility functions
|
||||
|
||||
These functions allow an B<ASN1_STRING> structure to be manipulated.
|
||||
|
||||
ASN1_STRING_length() returns the length of the content of B<x>.
|
||||
ASN1_STRING_length() returns the length of the content of I<x>.
|
||||
|
||||
ASN1_STRING_get0_data() returns an internal pointer to the data of B<x>.
|
||||
ASN1_STRING_get0_data() returns an internal pointer to the data of I<x>.
|
||||
Since this is an internal pointer it should B<not> be freed or
|
||||
modified in any way.
|
||||
|
||||
@@ -38,21 +38,21 @@ ASN1_STRING_data() is similar to ASN1_STRING_get0_data() except the
|
||||
returned value is not constant. This function is deprecated:
|
||||
applications should use ASN1_STRING_get0_data() instead.
|
||||
|
||||
ASN1_STRING_dup() returns a copy of the structure B<a>.
|
||||
ASN1_STRING_dup() returns a copy of the structure I<a>.
|
||||
|
||||
ASN1_STRING_cmp() compares B<a> and B<b> returning 0 if the two
|
||||
ASN1_STRING_cmp() compares I<a> and I<b> returning 0 if the two
|
||||
are identical. The string types and content are compared.
|
||||
|
||||
ASN1_STRING_set() sets the data of string B<str> to the buffer
|
||||
B<data> or length B<len>. The supplied data is copied. If B<len>
|
||||
ASN1_STRING_set() sets the data of string I<str> to the buffer
|
||||
I<data> or length I<len>. The supplied data is copied. If I<len>
|
||||
is -1 then the length is determined by strlen(data).
|
||||
|
||||
ASN1_STRING_type() returns the type of B<x>, using standard constants
|
||||
ASN1_STRING_type() returns the type of I<x>, using standard constants
|
||||
such as B<V_ASN1_OCTET_STRING>.
|
||||
|
||||
ASN1_STRING_to_UTF8() converts the string B<in> to UTF8 format, the
|
||||
converted data is allocated in a buffer in B<*out>. The length of
|
||||
B<out> is returned or a negative error code. The buffer B<*out>
|
||||
ASN1_STRING_to_UTF8() converts the string I<in> to UTF8 format, the
|
||||
converted data is allocated in a buffer in I<*out>. The length of
|
||||
I<out> is returned or a negative error code. The buffer I<*out>
|
||||
should be freed using OPENSSL_free().
|
||||
|
||||
=head1 NOTES
|
||||
@@ -79,22 +79,22 @@ when calling ASN1_STRING_set().
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ASN1_STRING_length() returns the length of the content of B<x>.
|
||||
ASN1_STRING_length() returns the length of the content of I<x>.
|
||||
|
||||
ASN1_STRING_get0_data() and ASN1_STRING_data() return an internal pointer to
|
||||
the data of B<x>.
|
||||
the data of I<x>.
|
||||
|
||||
ASN1_STRING_dup() returns a valid B<ASN1_STRING> structure or B<NULL> if an
|
||||
ASN1_STRING_dup() returns a valid B<ASN1_STRING> structure or NULL if an
|
||||
error occurred.
|
||||
|
||||
ASN1_STRING_cmp() returns an integer greater than, equal to, or less than 0,
|
||||
according to whether B<a> is greater than, equal to, or less than B<b>.
|
||||
according to whether I<a> is greater than, equal to, or less than I<b>.
|
||||
|
||||
ASN1_STRING_set() returns 1 on success or 0 on error.
|
||||
|
||||
ASN1_STRING_type() returns the type of B<x>.
|
||||
ASN1_STRING_type() returns the type of I<x>.
|
||||
|
||||
ASN1_STRING_to_UTF8() returns the number of bytes in output string B<out> or a
|
||||
ASN1_STRING_to_UTF8() returns the number of bytes in output string I<out> or a
|
||||
negative value if an error occurred.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
@@ -19,10 +19,10 @@ ASN1_STRING_new() returns an allocated B<ASN1_STRING> structure. Its type
|
||||
is undefined.
|
||||
|
||||
ASN1_STRING_type_new() returns an allocated B<ASN1_STRING> structure of
|
||||
type B<type>.
|
||||
type I<type>.
|
||||
|
||||
ASN1_STRING_free() frees up B<a>.
|
||||
If B<a> is NULL nothing is done.
|
||||
ASN1_STRING_free() frees up I<a>.
|
||||
If I<a> is NULL nothing is done.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -32,7 +32,7 @@ ASN1_OCTET_STRING_new() calls ASN1_STRING_type(V_ASN1_OCTET_STRING).
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ASN1_STRING_new() and ASN1_STRING_type_new() return a valid
|
||||
ASN1_STRING structure or B<NULL> if an error occurred.
|
||||
B<ASN1_STRING> structure or NULL if an error occurred.
|
||||
|
||||
ASN1_STRING_free() does not return a value.
|
||||
|
||||
|
||||
@@ -20,15 +20,15 @@ ASN1_tag2str, ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp, ASN1_STRING_print
|
||||
These functions output an B<ASN1_STRING> structure. B<ASN1_STRING> is used to
|
||||
represent all the ASN1 string types.
|
||||
|
||||
ASN1_STRING_print_ex() outputs B<str> to B<out>, the format is determined by
|
||||
the options B<flags>. ASN1_STRING_print_ex_fp() is identical except it outputs
|
||||
to B<fp> instead.
|
||||
ASN1_STRING_print_ex() outputs I<str> to I<out>, the format is determined by
|
||||
the options I<flags>. ASN1_STRING_print_ex_fp() is identical except it outputs
|
||||
to I<fp> instead.
|
||||
|
||||
ASN1_STRING_print() prints B<str> to B<out> but using a different format to
|
||||
ASN1_STRING_print() prints I<str> to I<out> but using a different format to
|
||||
ASN1_STRING_print_ex(). It replaces unprintable characters (other than CR, LF)
|
||||
with '.'.
|
||||
|
||||
ASN1_tag2str() returns a human-readable name of the specified ASN.1 B<tag>.
|
||||
ASN1_tag2str() returns a human-readable name of the specified ASN.1 I<tag>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -38,7 +38,7 @@ ASN1_STRING_print_ex() instead.
|
||||
Although there are a large number of options frequently B<ASN1_STRFLGS_RFC2253> is
|
||||
suitable, or on UTF8 terminals B<ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB>.
|
||||
|
||||
The complete set of supported options for B<flags> is listed below.
|
||||
The complete set of supported options for I<flags> is listed below.
|
||||
|
||||
Various characters can be escaped. If B<ASN1_STRFLGS_ESC_2253> is set the characters
|
||||
determined by RFC2253 are escaped. If B<ASN1_STRFLGS_ESC_CTRL> is set control
|
||||
@@ -96,7 +96,7 @@ characters written or -1 if an error occurred.
|
||||
|
||||
ASN1_STRING_print() returns 1 on success or 0 on error.
|
||||
|
||||
ASN1_tag2str() returns a human-readable name of the specified ASN.1 B<tag>.
|
||||
ASN1_tag2str() returns a human-readable name of the specified ASN.1 I<tag>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
+73
-69
@@ -61,113 +61,115 @@ ASN1_TIME_to_generalizedtime - ASN.1 Time functions
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The ASN1_TIME_set(), ASN1_UTCTIME_set() and ASN1_GENERALIZEDTIME_set()
|
||||
functions set the structure B<s> to the time represented by the time_t
|
||||
value B<t>. If B<s> is NULL a new time structure is allocated and returned.
|
||||
functions set the structure I<s> to the time represented by the time_t
|
||||
value I<t>. If I<s> is NULL a new time structure is allocated and returned.
|
||||
|
||||
The ASN1_TIME_adj(), ASN1_UTCTIME_adj() and ASN1_GENERALIZEDTIME_adj()
|
||||
functions set the time structure B<s> to the time represented
|
||||
by the time B<offset_day> and B<offset_sec> after the time_t value B<t>.
|
||||
The values of B<offset_day> or B<offset_sec> can be negative to set a
|
||||
time before B<t>. The B<offset_sec> value can also exceed the number of
|
||||
seconds in a day. If B<s> is NULL a new structure is allocated
|
||||
functions set the time structure I<s> to the time represented
|
||||
by the time I<offset_day> and I<offset_sec> after the time_t value I<t>.
|
||||
The values of I<offset_day> or I<offset_sec> can be negative to set a
|
||||
time before I<t>. The I<offset_sec> value can also exceed the number of
|
||||
seconds in a day. If I<s> is NULL a new structure is allocated
|
||||
and returned.
|
||||
|
||||
The ASN1_TIME_set_string(), ASN1_UTCTIME_set_string() and
|
||||
ASN1_GENERALIZEDTIME_set_string() functions set the time structure B<s>
|
||||
to the time represented by string B<str> which must be in appropriate ASN.1
|
||||
time format (for example YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ). If B<s> is NULL
|
||||
this function performs a format check on B<str> only. The string B<str>
|
||||
is copied into B<s>.
|
||||
ASN1_GENERALIZEDTIME_set_string() functions set the time structure I<s>
|
||||
to the time represented by string I<str> which must be in appropriate ASN.1
|
||||
time format (for example YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ). If I<s> is NULL
|
||||
this function performs a format check on I<str> only. The string I<str>
|
||||
is copied into I<s>.
|
||||
|
||||
ASN1_TIME_set_string_X509() sets ASN1_TIME structure B<s> to the time
|
||||
represented by string B<str> which must be in appropriate time format
|
||||
ASN1_TIME_set_string_X509() sets B<ASN1_TIME> structure I<s> to the time
|
||||
represented by string I<str> which must be in appropriate time format
|
||||
that RFC 5280 requires, which means it only allows YYMMDDHHMMSSZ and
|
||||
YYYYMMDDHHMMSSZ (leap second is rejected), all other ASN.1 time format
|
||||
are not allowed. If B<s> is NULL this function performs a format check
|
||||
on B<str> only.
|
||||
are not allowed. If I<s> is NULL this function performs a format check
|
||||
on I<str> only.
|
||||
|
||||
The ASN1_TIME_normalize() function converts an ASN1_GENERALIZEDTIME or
|
||||
ASN1_UTCTIME into a time value that can be used in a certificate. It
|
||||
The ASN1_TIME_normalize() function converts an B<ASN1_GENERALIZEDTIME> or
|
||||
B<ASN1_UTCTIME> into a time value that can be used in a certificate. It
|
||||
should be used after the ASN1_TIME_set_string() functions and before
|
||||
ASN1_TIME_print() functions to get consistent (i.e. GMT) results.
|
||||
|
||||
The ASN1_TIME_check(), ASN1_UTCTIME_check() and ASN1_GENERALIZEDTIME_check()
|
||||
functions check the syntax of the time structure B<s>.
|
||||
functions check the syntax of the time structure I<s>.
|
||||
|
||||
The ASN1_TIME_print(), ASN1_UTCTIME_print() and ASN1_GENERALIZEDTIME_print()
|
||||
functions print the time structure B<s> to BIO B<b> in human readable
|
||||
functions print the time structure I<s> to BIO I<b> in human readable
|
||||
format. It will be of the format MMM DD HH:MM:SS YYYY [GMT], for example
|
||||
"Feb 3 00:55:52 2015 GMT" it does not include a newline. If the time
|
||||
structure has invalid format it prints out "Bad time value" and returns
|
||||
an error. The output for generalized time may include a fractional part
|
||||
following the second.
|
||||
|
||||
ASN1_TIME_to_tm() converts the time B<s> to the standard B<tm> structure.
|
||||
If B<s> is NULL, then the current time is converted. The output time is GMT.
|
||||
The B<tm_sec>, B<tm_min>, B<tm_hour>, B<tm_mday>, B<tm_wday>, B<tm_yday>,
|
||||
B<tm_mon> and B<tm_year> fields of B<tm> structure are set to proper values,
|
||||
whereas all other fields are set to 0. If B<tm> is NULL this function performs
|
||||
a format check on B<s> only. If B<s> is in Generalized format with fractional
|
||||
ASN1_TIME_to_tm() converts the time I<s> to the standard I<tm> structure.
|
||||
If I<s> is NULL, then the current time is converted. The output time is GMT.
|
||||
The I<tm_sec>, I<tm_min>, I<tm_hour>, I<tm_mday>, I<tm_wday>, I<tm_yday>,
|
||||
I<tm_mon> and I<tm_year> fields of I<tm> structure are set to proper values,
|
||||
whereas all other fields are set to 0. If I<tm> is NULL this function performs
|
||||
a format check on I<s> only. If I<s> is in Generalized format with fractional
|
||||
seconds, e.g. YYYYMMDDHHMMSS.SSSZ, the fractional seconds will be lost while
|
||||
converting B<s> to B<tm> structure.
|
||||
converting I<s> to I<tm> structure.
|
||||
|
||||
ASN1_TIME_diff() sets B<*pday> and B<*psec> to the time difference between
|
||||
B<from> and B<to>. If B<to> represents a time later than B<from> then
|
||||
one or both (depending on the time difference) of B<*pday> and B<*psec>
|
||||
will be positive. If B<to> represents a time earlier than B<from> then
|
||||
one or both of B<*pday> and B<*psec> will be negative. If B<to> and B<from>
|
||||
represent the same time then B<*pday> and B<*psec> will both be zero.
|
||||
If both B<*pday> and B<*psec> are non-zero they will always have the same
|
||||
sign. The value of B<*psec> will always be less than the number of seconds
|
||||
in a day. If B<from> or B<to> is NULL the current time is used.
|
||||
ASN1_TIME_diff() sets I<*pday> and I<*psec> to the time difference between
|
||||
I<from> and I<to>. If I<to> represents a time later than I<from> then
|
||||
one or both (depending on the time difference) of I<*pday> and I<*psec>
|
||||
will be positive. If I<to> represents a time earlier than I<from> then
|
||||
one or both of I<*pday> and I<*psec> will be negative. If I<to> and I<from>
|
||||
represent the same time then I<*pday> and I<*psec> will both be zero.
|
||||
If both I<*pday> and I<*psec> are nonzero they will always have the same
|
||||
sign. The value of I<*psec> will always be less than the number of seconds
|
||||
in a day. If I<from> or I<to> is NULL the current time is used.
|
||||
|
||||
The ASN1_TIME_cmp_time_t() and ASN1_UTCTIME_cmp_time_t() functions compare
|
||||
the two times represented by the time structure B<s> and the time_t B<t>.
|
||||
the two times represented by the time structure I<s> and the time_t I<t>.
|
||||
|
||||
The ASN1_TIME_compare() function compares the two times represented by the
|
||||
time structures B<a> and B<b>.
|
||||
time structures I<a> and I<b>.
|
||||
|
||||
The ASN1_TIME_to_generalizedtime() function converts an ASN1_TIME to an
|
||||
ASN1_GENERALIZEDTIME, regardless of year. If either B<out> or
|
||||
B<*out> are NULL, then a new object is allocated and must be freed after use.
|
||||
The ASN1_TIME_to_generalizedtime() function converts an B<ASN1_TIME> to an
|
||||
B<ASN1_GENERALIZEDTIME>, regardless of year. If either I<out> or
|
||||
I<*out> are NULL, then a new object is allocated and must be freed after use.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The ASN1_TIME structure corresponds to the ASN.1 structure B<Time>
|
||||
The B<ASN1_TIME> structure corresponds to the ASN.1 structure B<Time>
|
||||
defined in RFC5280 et al. The time setting functions obey the rules outlined
|
||||
in RFC5280: if the date can be represented by UTCTime it is used, else
|
||||
GeneralizedTime is used.
|
||||
|
||||
The ASN1_TIME, ASN1_UTCTIME and ASN1_GENERALIZEDTIME structures are represented
|
||||
as an ASN1_STRING internally and can be freed up using ASN1_STRING_free().
|
||||
The B<ASN1_TIME>, B<ASN1_UTCTIME> and B<ASN1_GENERALIZEDTIME> structures are
|
||||
represented as an B<ASN1_STRING> internally and can be freed up using
|
||||
ASN1_STRING_free().
|
||||
|
||||
The ASN1_TIME structure can represent years from 0000 to 9999 but no attempt
|
||||
The B<ASN1_TIME> structure can represent years from 0000 to 9999 but no attempt
|
||||
is made to correct ancient calendar changes (for example from Julian to
|
||||
Gregorian calendars).
|
||||
|
||||
ASN1_UTCTIME is limited to a year range of 1950 through 2049.
|
||||
B<ASN1_UTCTIME> is limited to a year range of 1950 through 2049.
|
||||
|
||||
Some applications add offset times directly to a time_t value and pass the
|
||||
results to ASN1_TIME_set() (or equivalent). This can cause problems as the
|
||||
time_t value can overflow on some systems resulting in unexpected results.
|
||||
New applications should use ASN1_TIME_adj() instead and pass the offset value
|
||||
in the B<offset_sec> and B<offset_day> parameters instead of directly
|
||||
in the I<offset_sec> and I<offset_day> parameters instead of directly
|
||||
manipulating a time_t value.
|
||||
|
||||
ASN1_TIME_adj() may change the type from ASN1_GENERALIZEDTIME to ASN1_UTCTIME,
|
||||
or vice versa, based on the resulting year. The ASN1_GENERALIZEDTIME_adj() and
|
||||
ASN1_UTCTIME_adj() functions will not modify the type of the return structure.
|
||||
ASN1_TIME_adj() may change the type from B<ASN1_GENERALIZEDTIME> to
|
||||
B<ASN1_UTCTIME>, or vice versa, based on the resulting year.
|
||||
ASN1_GENERALIZEDTIME_adj() and ASN1_UTCTIME_adj() will not modify the type
|
||||
of the return structure.
|
||||
|
||||
It is recommended that functions starting with ASN1_TIME be used instead of
|
||||
those starting with ASN1_UTCTIME or ASN1_GENERALIZEDTIME. The functions
|
||||
starting with ASN1_UTCTIME and ASN1_GENERALIZEDTIME act only on that specific
|
||||
time format. The functions starting with ASN1_TIME will operate on either
|
||||
format.
|
||||
It is recommended that functions starting with B<ASN1_TIME> be used instead of
|
||||
those starting with B<ASN1_UTCTIME> or B<ASN1_GENERALIZEDTIME>. The functions
|
||||
starting with B<ASN1_UTCTIME> and B<ASN1_GENERALIZEDTIME> act only on that
|
||||
specific time format. The functions starting with B<ASN1_TIME> will operate on
|
||||
either format.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
ASN1_TIME_print(), ASN1_UTCTIME_print() and ASN1_GENERALIZEDTIME_print()
|
||||
do not print out the time zone: it either prints out "GMT" or nothing. But all
|
||||
do not print out the timezone: it either prints out "GMT" or nothing. But all
|
||||
certificates complying with RFC5280 et al use GMT anyway.
|
||||
|
||||
Use the ASN1_TIME_normalize() function to normalize the time value before
|
||||
@@ -175,21 +177,22 @@ printing to get GMT results.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ASN1_TIME_set(), ASN1_UTCTIME_set(), ASN1_GENERALIZEDTIME_set(), ASN1_TIME_adj(),
|
||||
ASN1_UTCTIME_adj and ASN1_GENERALIZEDTIME_set return a pointer to a time structure
|
||||
or NULL if an error occurred.
|
||||
ASN1_TIME_set(), ASN1_UTCTIME_set(), ASN1_GENERALIZEDTIME_set(),
|
||||
ASN1_TIME_adj(), ASN1_UTCTIME_adj() and ASN1_GENERALIZEDTIME_set() return
|
||||
a pointer to a time structure or NULL if an error occurred.
|
||||
|
||||
ASN1_TIME_set_string(), ASN1_UTCTIME_set_string(), ASN1_GENERALIZEDTIME_set_string()
|
||||
ASN1_TIME_set_string_X509() return 1 if the time value is successfully set and 0 otherwise.
|
||||
ASN1_TIME_set_string(), ASN1_UTCTIME_set_string(),
|
||||
ASN1_GENERALIZEDTIME_set_string() and ASN1_TIME_set_string_X509() return
|
||||
1 if the time value is successfully set and 0 otherwise.
|
||||
|
||||
ASN1_TIME_normalize() returns 1 on success, and 0 on error.
|
||||
|
||||
ASN1_TIME_check(), ASN1_UTCTIME_check and ASN1_GENERALIZEDTIME_check() return 1
|
||||
if the structure is syntactically correct and 0 otherwise.
|
||||
|
||||
ASN1_TIME_print(), ASN1_UTCTIME_print() and ASN1_GENERALIZEDTIME_print() return 1
|
||||
if the time is successfully printed out and 0 if an error occurred (I/O error or
|
||||
invalid time format).
|
||||
ASN1_TIME_print(), ASN1_UTCTIME_print() and ASN1_GENERALIZEDTIME_print() return
|
||||
1 if the time is successfully printed out and 0 if an error occurred (I/O error
|
||||
or invalid time format).
|
||||
|
||||
ASN1_TIME_to_tm() returns 1 if the time is successfully parsed and 0 if an
|
||||
error occurred (invalid time format).
|
||||
@@ -197,14 +200,15 @@ error occurred (invalid time format).
|
||||
ASN1_TIME_diff() returns 1 for success and 0 for failure. It can fail if the
|
||||
passed-in time structure has invalid syntax, for example.
|
||||
|
||||
ASN1_TIME_cmp_time_t() and ASN1_UTCTIME_cmp_time_t() return -1 if B<s> is
|
||||
before B<t>, 0 if B<s> equals B<t>, or 1 if B<s> is after B<t>. -2 is returned
|
||||
ASN1_TIME_cmp_time_t() and ASN1_UTCTIME_cmp_time_t() return -1 if I<s> is
|
||||
before I<t>, 0 if I<s> equals I<t>, or 1 if I<s> is after I<t>. -2 is returned
|
||||
on error.
|
||||
|
||||
ASN1_TIME_compare() returns -1 if B<a> is before B<b>, 0 if B<a> equals B<b>, or 1 if B<a> is after B<b>. -2 is returned on error.
|
||||
ASN1_TIME_compare() returns -1 if I<a> is before I<b>, 0 if I<a> equals I<b>,
|
||||
or 1 if I<a> is after I<b>. -2 is returned on error.
|
||||
|
||||
ASN1_TIME_to_generalizedtime() returns a pointer to
|
||||
the appropriate time structure on success or NULL if an error occurred.
|
||||
ASN1_TIME_to_generalizedtime() returns a pointer to the appropriate time
|
||||
structure on success or NULL if an error occurred.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
|
||||
+31
-30
@@ -20,53 +20,54 @@ functions
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
These functions allow an ASN1_TYPE structure to be manipulated. The
|
||||
ASN1_TYPE structure can contain any ASN.1 type or constructed type
|
||||
These functions allow an B<ASN1_TYPE> structure to be manipulated. The
|
||||
B<ASN1_TYPE> structure can contain any ASN.1 type or constructed type
|
||||
such as a SEQUENCE: it is effectively equivalent to the ASN.1 ANY type.
|
||||
|
||||
ASN1_TYPE_get() returns the type of B<a>.
|
||||
ASN1_TYPE_get() returns the type of I<a>.
|
||||
|
||||
ASN1_TYPE_set() sets the value of B<a> to B<type> and B<value>. This
|
||||
function uses the pointer B<value> internally so it must B<not> be freed
|
||||
ASN1_TYPE_set() sets the value of I<a> to I<type> and I<value>. This
|
||||
function uses the pointer I<value> internally so it must B<not> be freed
|
||||
up after the call.
|
||||
|
||||
ASN1_TYPE_set1() sets the value of B<a> to B<type> a copy of B<value>.
|
||||
ASN1_TYPE_set1() sets the value of I<a> to I<type> a copy of I<value>.
|
||||
|
||||
ASN1_TYPE_cmp() compares ASN.1 types B<a> and B<b> and returns 0 if
|
||||
they are identical and non-zero otherwise.
|
||||
ASN1_TYPE_cmp() compares ASN.1 types I<a> and I<b> and returns 0 if
|
||||
they are identical and nonzero otherwise.
|
||||
|
||||
ASN1_TYPE_unpack_sequence() attempts to parse the SEQUENCE present in
|
||||
B<t> using the ASN.1 structure B<it>. If successful it returns a pointer
|
||||
to the ASN.1 structure corresponding to B<it> which must be freed by the
|
||||
I<t> using the ASN.1 structure I<it>. If successful it returns a pointer
|
||||
to the ASN.1 structure corresponding to I<it> which must be freed by the
|
||||
caller. If it fails it return NULL.
|
||||
|
||||
ASN1_TYPE_pack_sequence() attempts to encode the ASN.1 structure B<s>
|
||||
corresponding to B<it> into an ASN1_TYPE. If successful the encoded
|
||||
ASN1_TYPE is returned. If B<t> and B<*t> are not NULL the encoded type
|
||||
is written to B<t> overwriting any existing data. If B<t> is not NULL
|
||||
but B<*t> is NULL the returned ASN1_TYPE is written to B<*t>.
|
||||
ASN1_TYPE_pack_sequence() attempts to encode the ASN.1 structure I<s>
|
||||
corresponding to I<it> into an B<ASN1_TYPE>. If successful the encoded
|
||||
B<ASN1_TYPE> is returned. If I<t> and I<*t> are not NULL the encoded type
|
||||
is written to I<t> overwriting any existing data. If I<t> is not NULL
|
||||
but I<*t> is NULL the returned B<ASN1_TYPE> is written to I<*t>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The type and meaning of the B<value> parameter for ASN1_TYPE_set() and
|
||||
ASN1_TYPE_set1() is determined by the B<type> parameter.
|
||||
If B<type> is V_ASN1_NULL B<value> is ignored. If B<type> is V_ASN1_BOOLEAN
|
||||
then the boolean is set to TRUE if B<value> is not NULL. If B<type> is
|
||||
V_ASN1_OBJECT then value is an ASN1_OBJECT structure. Otherwise B<type>
|
||||
is and ASN1_STRING structure. If B<type> corresponds to a primitive type
|
||||
(or a string type) then the contents of the ASN1_STRING contain the content
|
||||
octets of the type. If B<type> corresponds to a constructed type or
|
||||
a tagged type (V_ASN1_SEQUENCE, V_ASN1_SET or V_ASN1_OTHER) then the
|
||||
ASN1_STRING contains the entire ASN.1 encoding verbatim (including tag and
|
||||
The type and meaning of the I<value> parameter for ASN1_TYPE_set() and
|
||||
ASN1_TYPE_set1() is determined by the I<type> parameter.
|
||||
If I<type> is B<V_ASN1_NULL> I<value> is ignored. If I<type> is
|
||||
B<V_ASN1_BOOLEAN>
|
||||
then the boolean is set to TRUE if I<value> is not NULL. If I<type> is
|
||||
B<V_ASN1_OBJECT> then value is an B<ASN1_OBJECT> structure. Otherwise I<type>
|
||||
is and B<ASN1_STRING> structure. If I<type> corresponds to a primitive type
|
||||
(or a string type) then the contents of the B<ASN1_STRING> contain the content
|
||||
octets of the type. If I<type> corresponds to a constructed type or
|
||||
a tagged type (B<V_ASN1_SEQUENCE>, B<V_ASN1_SET> or B<V_ASN1_OTHER>) then the
|
||||
B<ASN1_STRING> contains the entire ASN.1 encoding verbatim (including tag and
|
||||
length octets).
|
||||
|
||||
ASN1_TYPE_cmp() may not return zero if two types are equivalent but have
|
||||
different encodings. For example the single content octet of the boolean TRUE
|
||||
value under BER can have any non-zero encoding but ASN1_TYPE_cmp() will
|
||||
value under BER can have any nonzero encoding but ASN1_TYPE_cmp() will
|
||||
only return zero if the values are the same.
|
||||
|
||||
If either or both of the parameters passed to ASN1_TYPE_cmp() is NULL the
|
||||
return value is non-zero. Technically if both parameters are NULL the two
|
||||
return value is nonzero. Technically if both parameters are NULL the two
|
||||
types could be absent OPTIONAL fields and so should match, however passing
|
||||
NULL values could also indicate a programming error (for example an
|
||||
unparseable type which returns NULL) for types which do B<not> match. So
|
||||
@@ -74,18 +75,18 @@ applications should handle the case of two absent values separately.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ASN1_TYPE_get() returns the type of the ASN1_TYPE argument.
|
||||
ASN1_TYPE_get() returns the type of the B<ASN1_TYPE> argument.
|
||||
|
||||
ASN1_TYPE_set() does not return a value.
|
||||
|
||||
ASN1_TYPE_set1() returns 1 for success and 0 for failure.
|
||||
|
||||
ASN1_TYPE_cmp() returns 0 if the types are identical and non-zero otherwise.
|
||||
ASN1_TYPE_cmp() returns 0 if the types are identical and nonzero otherwise.
|
||||
|
||||
ASN1_TYPE_unpack_sequence() returns a pointer to an ASN.1 structure or
|
||||
NULL on failure.
|
||||
|
||||
ASN1_TYPE_pack_sequence() return an ASN1_TYPE structure if it succeeds or
|
||||
ASN1_TYPE_pack_sequence() return an B<ASN1_TYPE> structure if it succeeds or
|
||||
NULL on failure.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -16,29 +16,29 @@ ASN1_generate_nconf, ASN1_generate_v3 - ASN1 generation functions
|
||||
These functions generate the ASN1 encoding of a string
|
||||
in an B<ASN1_TYPE> structure.
|
||||
|
||||
B<str> contains the string to encode B<nconf> or B<cnf> contains
|
||||
I<str> contains the string to encode I<nconf> or I<cnf> contains
|
||||
the optional configuration information where additional strings
|
||||
will be read from. B<nconf> will typically come from a config
|
||||
file whereas B<cnf> is obtained from an B<X509V3_CTX> structure
|
||||
will be read from. I<nconf> will typically come from a config
|
||||
file whereas I<cnf> is obtained from an B<X509V3_CTX> structure
|
||||
which will typically be used by X509 v3 certificate extension
|
||||
functions. B<cnf> or B<nconf> can be set to B<NULL> if no additional
|
||||
functions. I<cnf> or I<nconf> can be set to NULL if no additional
|
||||
configuration will be used.
|
||||
|
||||
=head1 GENERATION STRING FORMAT
|
||||
|
||||
The actual data encoded is determined by the string B<str> and
|
||||
The actual data encoded is determined by the string I<str> and
|
||||
the configuration information. The general format of the string
|
||||
is:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<[modifier,]type[:value]>
|
||||
=item [I<modifier>,]I<type>[:I<value>]
|
||||
|
||||
=back
|
||||
|
||||
That is zero or more comma separated modifiers followed by a type
|
||||
followed by an optional colon and a value. The formats of B<type>,
|
||||
B<value> and B<modifier> are explained below.
|
||||
followed by an optional colon and a value. The formats of I<type>,
|
||||
I<value> and I<modifier> are explained below.
|
||||
|
||||
=head2 Supported Types
|
||||
|
||||
@@ -49,18 +49,18 @@ only the B<ASCII> format is permissible.
|
||||
|
||||
=item B<BOOLEAN>, B<BOOL>
|
||||
|
||||
This encodes a boolean type. The B<value> string is mandatory and
|
||||
This encodes a boolean type. The I<value> string is mandatory and
|
||||
should be B<TRUE> or B<FALSE>. Additionally B<TRUE>, B<true>, B<Y>,
|
||||
B<y>, B<YES>, B<yes>, B<FALSE>, B<false>, B<N>, B<n>, B<NO> and B<no>
|
||||
are acceptable.
|
||||
|
||||
=item B<NULL>
|
||||
|
||||
Encode the B<NULL> type, the B<value> string must not be present.
|
||||
Encode the B<NULL> type, the I<value> string must not be present.
|
||||
|
||||
=item B<INTEGER>, B<INT>
|
||||
|
||||
Encodes an ASN1 B<INTEGER> type. The B<value> string represents
|
||||
Encodes an ASN1 B<INTEGER> type. The I<value> string represents
|
||||
the value of the integer, it can be prefaced by a minus sign and
|
||||
is normally interpreted as a decimal value unless the prefix B<0x>
|
||||
is included.
|
||||
@@ -72,7 +72,7 @@ B<INTEGER>.
|
||||
|
||||
=item B<OBJECT>, B<OID>
|
||||
|
||||
Encodes an ASN1 B<OBJECT IDENTIFIER>, the B<value> string can be
|
||||
Encodes an ASN1 B<OBJECT IDENTIFIER>, the I<value> string can be
|
||||
a short name, a long name or numerical format.
|
||||
|
||||
=item B<UTCTIME>, B<UTC>
|
||||
@@ -87,15 +87,15 @@ the format B<YYYYMMDDHHMMSSZ>.
|
||||
|
||||
=item B<OCTETSTRING>, B<OCT>
|
||||
|
||||
Encodes an ASN1 B<OCTET STRING>. B<value> represents the contents
|
||||
Encodes an ASN1 B<OCTET STRING>. I<value> represents the contents
|
||||
of this structure, the format strings B<ASCII> and B<HEX> can be
|
||||
used to specify the format of B<value>.
|
||||
used to specify the format of I<value>.
|
||||
|
||||
=item B<BITSTRING>, B<BITSTR>
|
||||
|
||||
Encodes an ASN1 B<BIT STRING>. B<value> represents the contents
|
||||
Encodes an ASN1 B<BIT STRING>. I<value> represents the contents
|
||||
of this structure, the format strings B<ASCII>, B<HEX> and B<BITLIST>
|
||||
can be used to specify the format of B<value>.
|
||||
can be used to specify the format of I<value>.
|
||||
|
||||
If the format is anything other than B<BITLIST> the number of unused
|
||||
bits is set to zero.
|
||||
@@ -106,15 +106,15 @@ B<VISIBLE>, B<PRINTABLESTRING>, B<PRINTABLE>, B<T61>,
|
||||
B<T61STRING>, B<TELETEXSTRING>, B<GeneralString>, B<NUMERICSTRING>,
|
||||
B<NUMERIC>
|
||||
|
||||
These encode the corresponding string types. B<value> represents the
|
||||
These encode the corresponding string types. I<value> represents the
|
||||
contents of this structure. The format can be B<ASCII> or B<UTF8>.
|
||||
|
||||
=item B<SEQUENCE>, B<SEQ>, B<SET>
|
||||
|
||||
Formats the result as an ASN1 B<SEQUENCE> or B<SET> type. B<value>
|
||||
Formats the result as an ASN1 B<SEQUENCE> or B<SET> type. I<value>
|
||||
should be a section name which will contain the contents. The
|
||||
field names in the section are ignored and the values are in the
|
||||
generated string format. If B<value> is absent then an empty SEQUENCE
|
||||
generated string format. If I<value> is absent then an empty SEQUENCE
|
||||
will be encoded.
|
||||
|
||||
=back
|
||||
@@ -165,7 +165,7 @@ bits are zero.
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ASN1_generate_nconf() and ASN1_generate_v3() return the encoded
|
||||
data as an B<ASN1_TYPE> structure or B<NULL> if an error occurred.
|
||||
data as an B<ASN1_TYPE> structure or NULL if an error occurred.
|
||||
|
||||
The error codes that can be obtained by L<ERR_get_error(3)>.
|
||||
|
||||
|
||||
@@ -48,45 +48,45 @@ ASYNC_STATUS_EAGAIN
|
||||
=head1 DESCRIPTION
|
||||
|
||||
For an overview of how asynchronous operations are implemented in OpenSSL see
|
||||
L<ASYNC_start_job(3)>. An ASYNC_WAIT_CTX object represents an asynchronous
|
||||
L<ASYNC_start_job(3)>. An B<ASYNC_WAIT_CTX> object represents an asynchronous
|
||||
"session", i.e. a related set of crypto operations. For example in SSL terms
|
||||
this would have a one-to-one correspondence with an SSL connection.
|
||||
|
||||
Application code must create an ASYNC_WAIT_CTX using the ASYNC_WAIT_CTX_new()
|
||||
Application code must create an B<ASYNC_WAIT_CTX> using the ASYNC_WAIT_CTX_new()
|
||||
function prior to calling ASYNC_start_job() (see L<ASYNC_start_job(3)>). When
|
||||
the job is started it is associated with the ASYNC_WAIT_CTX for the duration of
|
||||
that job. An ASYNC_WAIT_CTX should only be used for one ASYNC_JOB at any one
|
||||
time, but can be reused after an ASYNC_JOB has finished for a subsequent
|
||||
ASYNC_JOB. When the session is complete (e.g. the SSL connection is closed),
|
||||
application code cleans up with ASYNC_WAIT_CTX_free().
|
||||
the job is started it is associated with the B<ASYNC_WAIT_CTX> for the duration
|
||||
of that job. An B<ASYNC_WAIT_CTX> should only be used for one B<ASYNC_JOB> at
|
||||
any one time, but can be reused after an B<ASYNC_JOB> has finished for a
|
||||
subsequent B<ASYNC_JOB>. When the session is complete (e.g. the SSL connection
|
||||
is closed), application code cleans up with ASYNC_WAIT_CTX_free().
|
||||
|
||||
ASYNC_WAIT_CTXs can have "wait" file descriptors associated with them. Calling
|
||||
ASYNC_WAIT_CTX_get_all_fds() and passing in a pointer to an ASYNC_WAIT_CTX in
|
||||
the B<ctx> parameter will return the wait file descriptors associated with that
|
||||
job in B<*fd>. The number of file descriptors returned will be stored in
|
||||
B<*numfds>. It is the caller's responsibility to ensure that sufficient memory
|
||||
has been allocated in B<*fd> to receive all the file descriptors. Calling
|
||||
ASYNC_WAIT_CTX_get_all_fds() with a NULL B<fd> value will return no file
|
||||
descriptors but will still populate B<*numfds>. Therefore application code is
|
||||
typically expected to call this function twice: once to get the number of fds,
|
||||
and then again when sufficient memory has been allocated. If only one
|
||||
asynchronous engine is being used then normally this call will only ever return
|
||||
one fd. If multiple asynchronous engines are being used then more could be
|
||||
returned.
|
||||
B<ASYNC_WAIT_CTX>s can have "wait" file descriptors associated with them.
|
||||
Calling ASYNC_WAIT_CTX_get_all_fds() and passing in a pointer to an
|
||||
B<ASYNC_WAIT_CTX> in the I<ctx> parameter will return the wait file descriptors
|
||||
associated with that job in I<*fd>. The number of file descriptors returned will
|
||||
be stored in I<*numfds>. It is the caller's responsibility to ensure that
|
||||
sufficient memory has been allocated in I<*fd> to receive all the file
|
||||
descriptors. Calling ASYNC_WAIT_CTX_get_all_fds() with a NULL I<fd> value will
|
||||
return no file descriptors but will still populate I<*numfds>. Therefore
|
||||
application code is typically expected to call this function twice: once to get
|
||||
the number of fds, and then again when sufficient memory has been allocated. If
|
||||
only one asynchronous engine is being used then normally this call will only
|
||||
ever return one fd. If multiple asynchronous engines are being used then more
|
||||
could be returned.
|
||||
|
||||
The function ASYNC_WAIT_CTX_get_changed_fds() can be used to detect if any fds
|
||||
have changed since the last call time ASYNC_start_job() returned an ASYNC_PAUSE
|
||||
result (or since the ASYNC_WAIT_CTX was created if no ASYNC_PAUSE result has
|
||||
been received). The B<numaddfds> and B<numdelfds> parameters will be populated
|
||||
with the number of fds added or deleted respectively. B<*addfd> and B<*delfd>
|
||||
have changed since the last call time ASYNC_start_job() returned B<ASYNC_PAUSE>
|
||||
(or since the B<ASYNC_WAIT_CTX> was created if no B<ASYNC_PAUSE> result has
|
||||
been received). The I<numaddfds> and I<numdelfds> parameters will be populated
|
||||
with the number of fds added or deleted respectively. I<*addfd> and I<*delfd>
|
||||
will be populated with the list of added and deleted fds respectively. Similarly
|
||||
to ASYNC_WAIT_CTX_get_all_fds() either of these can be NULL, but if they are not
|
||||
NULL then the caller is responsible for ensuring sufficient memory is allocated.
|
||||
|
||||
Implementors of async aware code (e.g. engines) are encouraged to return a
|
||||
stable fd for the lifetime of the ASYNC_WAIT_CTX in order to reduce the "churn"
|
||||
of regularly changing fds - although no guarantees of this are provided to
|
||||
applications.
|
||||
stable fd for the lifetime of the B<ASYNC_WAIT_CTX> in order to reduce the
|
||||
"churn" of regularly changing fds - although no guarantees of this are provided
|
||||
to applications.
|
||||
|
||||
Applications can wait for the file descriptor to be ready for "read" using a
|
||||
system function call such as select or poll (being ready for "read" indicates
|
||||
@@ -94,21 +94,21 @@ that the job should be resumed). If no file descriptor is made available then an
|
||||
application will have to periodically "poll" the job by attempting to restart it
|
||||
to see if it is ready to continue.
|
||||
|
||||
Async aware code (e.g. engines) can get the current ASYNC_WAIT_CTX from the job
|
||||
via L<ASYNC_get_wait_ctx(3)> and provide a file descriptor to use for waiting
|
||||
on by calling ASYNC_WAIT_CTX_set_wait_fd(). Typically this would be done by an
|
||||
engine immediately prior to calling ASYNC_pause_job() and not by end user code.
|
||||
An existing association with a file descriptor can be obtained using
|
||||
Async aware code (e.g. engines) can get the current B<ASYNC_WAIT_CTX> from the
|
||||
job via L<ASYNC_get_wait_ctx(3)> and provide a file descriptor to use for
|
||||
waiting on by calling ASYNC_WAIT_CTX_set_wait_fd(). Typically this would be done
|
||||
by an engine immediately prior to calling ASYNC_pause_job() and not by end user
|
||||
code. An existing association with a file descriptor can be obtained using
|
||||
ASYNC_WAIT_CTX_get_fd() and cleared using ASYNC_WAIT_CTX_clear_fd(). Both of
|
||||
these functions requires a B<key> value which is unique to the async aware
|
||||
these functions requires a I<key> value which is unique to the async aware
|
||||
code. This could be any unique value but a good candidate might be the
|
||||
B<ENGINE *> for the engine. The B<custom_data> parameter can be any value, and
|
||||
B<ENGINE *> for the engine. The I<custom_data> parameter can be any value, and
|
||||
will be returned in a subsequent call to ASYNC_WAIT_CTX_get_fd(). The
|
||||
ASYNC_WAIT_CTX_set_wait_fd() function also expects a pointer to a "cleanup"
|
||||
routine. This can be NULL but if provided will automatically get called when
|
||||
the ASYNC_WAIT_CTX is freed, and gives the engine the opportunity to close the
|
||||
fd or any other resources. Note: The "cleanup" routine does not get called if
|
||||
the fd is cleared directly via a call to ASYNC_WAIT_CTX_clear_fd().
|
||||
the B<ASYNC_WAIT_CTX> is freed, and gives the engine the opportunity to close
|
||||
the fd or any other resources. Note: The "cleanup" routine does not get called
|
||||
if the fd is cleared directly via a call to ASYNC_WAIT_CTX_clear_fd().
|
||||
|
||||
An example of typical usage might be an async capable engine. User code would
|
||||
initiate cryptographic operations. The engine would initiate those operations
|
||||
@@ -121,7 +121,7 @@ code that the job should be resumed by making the wait file descriptor
|
||||
file descriptor.
|
||||
|
||||
As well as a file descriptor, user code may also be notified via a callback. The
|
||||
callback and data pointers are stored within the ASYNC_WAIT_CTX along with an
|
||||
callback and data pointers are stored within the B<ASYNC_WAIT_CTX> along with an
|
||||
additional status field that can be used for the notification of retries from an
|
||||
engine. This additional method can be used when the user thinks that a file
|
||||
descriptor is too costly in terms of CPU cycles or in some context where a file
|
||||
@@ -133,24 +133,41 @@ cryptography operation. It is a requirement that the callback function is small
|
||||
and non-blocking as it will be run in the context of a polling mechanism or an
|
||||
interrupt.
|
||||
|
||||
ASYNC_WAIT_CTX_get_callback() returns the callback set in the ASYNC_WAIT_CTX
|
||||
ASYNC_WAIT_CTX_get_callback() returns the callback set in the B<ASYNC_WAIT_CTX>
|
||||
structure.
|
||||
|
||||
ASYNC_WAIT_CTX_set_status() allows an engine to set the current engine status.
|
||||
The possible status values are the following:
|
||||
ASYNC_STATUS_UNSUPPORTED: The engine does not support the callback mechanism.
|
||||
This is the default value. The engine must call ASYNC_WAIT_CTX_set_status() to
|
||||
set the status to some value other than ASYNC_STATUS_UNSUPPORTED if it intends
|
||||
to enable the callback mechanism.
|
||||
ASYNC_STATUS_ERR: The engine has a fatal problem with this request. The user
|
||||
code should clean up this session.
|
||||
ASYNC_STATUS_OK: The request has been successfully submitted.
|
||||
ASYNC_STATUS_EAGAIN: The engine has some problem which will be recovered soon,
|
||||
such as a buffer is full, so user code should resume the job.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<ASYNC_STATUS_UNSUPPORTED>
|
||||
|
||||
The engine does not support the callback mechanism. This is the default value.
|
||||
The engine must call ASYNC_WAIT_CTX_set_status() to set the status to some value
|
||||
other than B<ASYNC_STATUS_UNSUPPORTED> if it intends to enable the callback
|
||||
mechanism.
|
||||
|
||||
=item B<ASYNC_STATUS_ERR>
|
||||
|
||||
The engine has a fatal problem with this request. The user code should clean up
|
||||
this session.
|
||||
|
||||
=item B<ASYNC_STATUS_OK>
|
||||
|
||||
The request has been successfully submitted.
|
||||
|
||||
=item B<ASYNC_STATUS_EAGAIN>
|
||||
|
||||
The engine has some problem which will be recovered soon, such as a buffer is
|
||||
full, so user code should resume the job.
|
||||
|
||||
=back
|
||||
|
||||
ASYNC_WAIT_CTX_get_status() allows user code to obtain the current status value.
|
||||
If the status is any value other than ASYNC_STATUS_OK then the user code should
|
||||
not expect to receive a callback from the engine even if one has been set.
|
||||
If the status is any value other than B<ASYNC_STATUS_OK> then the user code
|
||||
should not expect to receive a callback from the engine even if one has been
|
||||
set.
|
||||
|
||||
An example of the usage of the callback method might be the following. User
|
||||
code would initiate cryptographic operations, and the engine code would dispatch
|
||||
@@ -163,8 +180,8 @@ then the registered callback will be called.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ASYNC_WAIT_CTX_new() returns a pointer to the newly allocated ASYNC_WAIT_CTX or
|
||||
NULL on error.
|
||||
ASYNC_WAIT_CTX_new() returns a pointer to the newly allocated B<ASYNC_WAIT_CTX>
|
||||
or NULL on error.
|
||||
|
||||
ASYNC_WAIT_CTX_set_wait_fd, ASYNC_WAIT_CTX_get_fd, ASYNC_WAIT_CTX_get_all_fds,
|
||||
ASYNC_WAIT_CTX_get_changed_fds, ASYNC_WAIT_CTX_clear_fd,
|
||||
|
||||
@@ -27,40 +27,40 @@ ASYNC_get_current_job, ASYNC_block_pause, ASYNC_unblock_pause, ASYNC_is_capable
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
OpenSSL implements asynchronous capabilities through an ASYNC_JOB. This
|
||||
OpenSSL implements asynchronous capabilities through an B<ASYNC_JOB>. This
|
||||
represents code that can be started and executes until some event occurs. At
|
||||
that point the code can be paused and control returns to user code until some
|
||||
subsequent event indicates that the job can be resumed.
|
||||
|
||||
The creation of an ASYNC_JOB is a relatively expensive operation. Therefore, for
|
||||
efficiency reasons, jobs can be created up front and reused many times. They are
|
||||
held in a pool until they are needed, at which point they are removed from the
|
||||
pool, used, and then returned to the pool when the job completes. If the user
|
||||
application is multi-threaded, then ASYNC_init_thread() may be called for each
|
||||
thread that will initiate asynchronous jobs. Before
|
||||
The creation of an B<ASYNC_JOB> is a relatively expensive operation. Therefore,
|
||||
for efficiency reasons, jobs can be created up front and reused many times. They
|
||||
are held in a pool until they are needed, at which point they are removed from
|
||||
the pool, used, and then returned to the pool when the job completes. If the
|
||||
user application is multi-threaded, then ASYNC_init_thread() may be called for
|
||||
each thread that will initiate asynchronous jobs. Before
|
||||
user code exits per-thread resources need to be cleaned up. This will normally
|
||||
occur automatically (see L<OPENSSL_init_crypto(3)>) but may be explicitly
|
||||
initiated by using ASYNC_cleanup_thread(). No asynchronous jobs must be
|
||||
outstanding for the thread when ASYNC_cleanup_thread() is called. Failing to
|
||||
ensure this will result in memory leaks.
|
||||
|
||||
The B<max_size> argument limits the number of ASYNC_JOBs that will be held in
|
||||
the pool. If B<max_size> is set to 0 then no upper limit is set. When an
|
||||
ASYNC_JOB is needed but there are none available in the pool already then one
|
||||
will be automatically created, as long as the total of ASYNC_JOBs managed by the
|
||||
pool does not exceed B<max_size>. When the pool is first initialised
|
||||
B<init_size> ASYNC_JOBs will be created immediately. If ASYNC_init_thread() is
|
||||
not called before the pool is first used then it will be called automatically
|
||||
with a B<max_size> of 0 (no upper limit) and an B<init_size> of 0 (no ASYNC_JOBs
|
||||
created up front).
|
||||
The I<max_size> argument limits the number of B<ASYNC_JOB>s that will be held in
|
||||
the pool. If I<max_size> is set to 0 then no upper limit is set. When an
|
||||
B<ASYNC_JOB> is needed but there are none available in the pool already then one
|
||||
will be automatically created, as long as the total of B<ASYNC_JOB>s managed by
|
||||
the pool does not exceed I<max_size>. When the pool is first initialised
|
||||
I<init_size> B<ASYNC_JOB>s will be created immediately. If ASYNC_init_thread()
|
||||
is not called before the pool is first used then it will be called automatically
|
||||
with a I<max_size> of 0 (no upper limit) and an I<init_size> of 0 (no
|
||||
B<ASYNC_JOB>s created up front).
|
||||
|
||||
An asynchronous job is started by calling the ASYNC_start_job() function.
|
||||
Initially B<*job> should be NULL. B<ctx> should point to an ASYNC_WAIT_CTX
|
||||
object created through the L<ASYNC_WAIT_CTX_new(3)> function. B<ret> should
|
||||
Initially I<*job> should be NULL. I<ctx> should point to an B<ASYNC_WAIT_CTX>
|
||||
object created through the L<ASYNC_WAIT_CTX_new(3)> function. I<ret> should
|
||||
point to a location where the return value of the asynchronous function should
|
||||
be stored on completion of the job. B<func> represents the function that should
|
||||
be started asynchronously. The data pointed to by B<args> and of size B<size>
|
||||
will be copied and then passed as an argument to B<func> when the job starts.
|
||||
be stored on completion of the job. I<func> represents the function that should
|
||||
be started asynchronously. The data pointed to by I<args> and of size I<size>
|
||||
will be copied and then passed as an argument to I<func> when the job starts.
|
||||
ASYNC_start_job will return one of the following values:
|
||||
|
||||
=over 4
|
||||
@@ -78,47 +78,47 @@ again at a later time.
|
||||
=item B<ASYNC_PAUSE>
|
||||
|
||||
The job was successfully started but was "paused" before it completed (see
|
||||
ASYNC_pause_job() below). A handle to the job is placed in B<*job>. Other work
|
||||
ASYNC_pause_job() below). A handle to the job is placed in I<*job>. Other work
|
||||
can be performed (if desired) and the job restarted at a later time. To restart
|
||||
a job call ASYNC_start_job() again passing the job handle in B<*job>. The
|
||||
B<func>, B<args> and B<size> parameters will be ignored when restarting a job.
|
||||
a job call ASYNC_start_job() again passing the job handle in I<*job>. The
|
||||
I<func>, I<args> and I<size> parameters will be ignored when restarting a job.
|
||||
When restarting a job ASYNC_start_job() B<must> be called from the same thread
|
||||
that the job was originally started from.
|
||||
|
||||
=item B<ASYNC_FINISH>
|
||||
|
||||
The job completed. B<*job> will be NULL and the return value from B<func> will
|
||||
be placed in B<*ret>.
|
||||
The job completed. I<*job> will be NULL and the return value from I<func> will
|
||||
be placed in I<*ret>.
|
||||
|
||||
=back
|
||||
|
||||
At any one time there can be a maximum of one job actively running per thread
|
||||
(you can have many that are paused). ASYNC_get_current_job() can be used to get
|
||||
a pointer to the currently executing ASYNC_JOB. If no job is currently executing
|
||||
then this will return NULL.
|
||||
a pointer to the currently executing B<ASYNC_JOB>. If no job is currently
|
||||
executing then this will return NULL.
|
||||
|
||||
If executing within the context of a job (i.e. having been called directly or
|
||||
indirectly by the function "func" passed as an argument to ASYNC_start_job())
|
||||
then ASYNC_pause_job() will immediately return control to the calling
|
||||
application with ASYNC_PAUSE returned from the ASYNC_start_job() call. A
|
||||
subsequent call to ASYNC_start_job passing in the relevant ASYNC_JOB in the
|
||||
B<*job> parameter will resume execution from the ASYNC_pause_job() call. If
|
||||
application with B<ASYNC_PAUSE> returned from the ASYNC_start_job() call. A
|
||||
subsequent call to ASYNC_start_job passing in the relevant B<ASYNC_JOB> in the
|
||||
I<*job> parameter will resume execution from the ASYNC_pause_job() call. If
|
||||
ASYNC_pause_job() is called whilst not within the context of a job then no
|
||||
action is taken and ASYNC_pause_job() returns immediately.
|
||||
|
||||
ASYNC_get_wait_ctx() can be used to get a pointer to the ASYNC_WAIT_CTX
|
||||
for the B<job>. ASYNC_WAIT_CTXs contain two different ways to notify
|
||||
ASYNC_get_wait_ctx() can be used to get a pointer to the B<ASYNC_WAIT_CTX>
|
||||
for the I<job>. B<ASYNC_WAIT_CTX>s contain two different ways to notify
|
||||
applications that a job is ready to be resumed. One is a "wait" file
|
||||
descriptor, and the other is a "callback" mechanism.
|
||||
|
||||
The "wait" file descriptor associated with ASYNC_WAIT_CTX is used for
|
||||
The "wait" file descriptor associated with B<ASYNC_WAIT_CTX> is used for
|
||||
applications to wait for the file descriptor to be ready for "read" using a
|
||||
system function call such as select or poll (being ready for "read" indicates
|
||||
that the job should be resumed). If no file descriptor is made available then
|
||||
an application will have to periodically "poll" the job by attempting to restart
|
||||
it to see if it is ready to continue.
|
||||
|
||||
ASYNC_WAIT_CTXs also have a "callback" mechanism to notify applications. The
|
||||
B<ASYNC_WAIT_CTX>s also have a "callback" mechanism to notify applications. The
|
||||
callback is set by an application, and it will be automatically called when an
|
||||
engine completes a cryptography operation, so that the application can resume
|
||||
the paused work flow without polling. An engine could be written to look whether
|
||||
@@ -134,10 +134,10 @@ ASYNC_unblock_pause(). These functions can be nested, e.g. if you call
|
||||
ASYNC_block_pause() twice then you must call ASYNC_unblock_pause() twice in
|
||||
order to re-enable pausing. If these functions are called while there is no
|
||||
currently active job then they have no effect. This functionality can be useful
|
||||
to avoid deadlock scenarios. For example during the execution of an ASYNC_JOB an
|
||||
application acquires a lock. It then calls some cryptographic function which
|
||||
to avoid deadlock scenarios. For example during the execution of an B<ASYNC_JOB>
|
||||
an application acquires a lock. It then calls some cryptographic function which
|
||||
invokes ASYNC_pause_job(). This returns control back to the code that created
|
||||
the ASYNC_JOB. If that code then attempts to acquire the same lock before
|
||||
the B<ASYNC_JOB>. If that code then attempts to acquire the same lock before
|
||||
resuming the original job then a deadlock can occur. By calling
|
||||
ASYNC_block_pause() immediately after acquiring the lock and
|
||||
ASYNC_unblock_pause() immediately before releasing it then this situation cannot
|
||||
@@ -150,17 +150,17 @@ can be used to detect whether the current platform is async capable or not.
|
||||
|
||||
ASYNC_init_thread returns 1 on success or 0 otherwise.
|
||||
|
||||
ASYNC_start_job returns one of ASYNC_ERR, ASYNC_NO_JOBS, ASYNC_PAUSE or
|
||||
ASYNC_FINISH as described above.
|
||||
ASYNC_start_job returns one of B<ASYNC_ERR>, B<ASYNC_NO_JOBS>, B<ASYNC_PAUSE> or
|
||||
B<ASYNC_FINISH> as described above.
|
||||
|
||||
ASYNC_pause_job returns 0 if an error occurred or 1 on success. If called when
|
||||
not within the context of an ASYNC_JOB then this is counted as success so 1 is
|
||||
returned.
|
||||
not within the context of an B<ASYNC_JOB> then this is counted as success so 1
|
||||
is returned.
|
||||
|
||||
ASYNC_get_current_job returns a pointer to the currently executing ASYNC_JOB or
|
||||
NULL if not within the context of a job.
|
||||
ASYNC_get_current_job returns a pointer to the currently executing B<ASYNC_JOB>
|
||||
or NULL if not within the context of a job.
|
||||
|
||||
ASYNC_get_wait_ctx() returns a pointer to the ASYNC_WAIT_CTX for the job.
|
||||
ASYNC_get_wait_ctx() returns a pointer to the B<ASYNC_WAIT_CTX> for the job.
|
||||
|
||||
ASYNC_is_capable() returns 1 if the current platform is async capable or 0
|
||||
otherwise.
|
||||
|
||||
@@ -50,7 +50,7 @@ therefore ignored) and populates the given B<BIO_ADDR> with them.
|
||||
In case this creates a B<AF_UNIX> B<BIO_ADDR>, B<wherelen> is expected
|
||||
to be the length of the path string (not including the terminating
|
||||
NUL, such as the result of a call to strlen()).
|
||||
I<Read on about the addresses in L</RAW ADDRESSES> below>.
|
||||
Read on about the addresses in L</RAW ADDRESSES> below.
|
||||
|
||||
BIO_ADDR_family() returns the protocol family of the given
|
||||
B<BIO_ADDR>. The possible non-error results are one of the
|
||||
@@ -67,7 +67,7 @@ order, most significant byte first.
|
||||
In case this is a B<AF_UNIX> B<BIO_ADDR>, B<l> gets the length of the
|
||||
path string (not including the terminating NUL, such as the result of
|
||||
a call to strlen()).
|
||||
I<Read on about the addresses in L</RAW ADDRESSES> below>.
|
||||
Read on about the addresses in L</RAW ADDRESSES> below.
|
||||
|
||||
BIO_ADDR_rawport() returns the raw port of the given B<BIO_ADDR>.
|
||||
The raw port will be in network byte order.
|
||||
|
||||
@@ -6,7 +6,7 @@ BIO_f_base64 - base64 BIO filter
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment multiple includes
|
||||
=for openssl multiple includes
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
@@ -6,7 +6,7 @@ BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment multiple includes
|
||||
=for openssl multiple includes
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
@@ -6,7 +6,7 @@ BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx - message digest BIO filter
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment multiple includes
|
||||
=for openssl multiple includes
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
@@ -11,7 +11,7 @@ BIO_ssl_shutdown - SSL BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment multiple includes
|
||||
=for openssl multiple includes
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
@@ -25,7 +25,7 @@ the BIO. This data can subsequently be retrieved via a call to BIO_get_data().
|
||||
This can be used by custom BIOs for storing implementation specific information.
|
||||
|
||||
The BIO_set_init() function sets the value of the BIO's "init" flag to indicate
|
||||
whether initialisation has been completed for this BIO or not. A non-zero value
|
||||
whether initialisation has been completed for this BIO or not. A nonzero value
|
||||
indicates that initialisation is complete, whilst zero indicates that it is not.
|
||||
Often initialisation will complete during initial construction of the BIO. For
|
||||
some BIOs however, initialisation may not complete until after additional steps
|
||||
|
||||
@@ -17,7 +17,7 @@ RSA_get_ex_new_index, RSA_set_ex_data, RSA_get_ex_data
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for comment generic
|
||||
=for openssl generic
|
||||
|
||||
#include <openssl/x509.h>
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ BIO_parse_hostserv
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_parse_hostserv() will parse the information given in B<hostserv>,
|
||||
create strings with the host name and service name and give those
|
||||
create strings with the hostname and service name and give those
|
||||
back via B<host> and B<service>. Those will need to be freed after
|
||||
they are used. B<hostserv_prio> helps determine if B<hostserv> shall
|
||||
be interpreted primarily as a host name or a service name in ambiguous
|
||||
be interpreted primarily as a hostname or a service name in ambiguous
|
||||
cases.
|
||||
|
||||
The syntax the BIO_parse_hostserv() recognises is:
|
||||
|
||||
@@ -106,7 +106,7 @@ If blocking I/O is set then a non positive return value from any
|
||||
I/O call is caused by an error condition, although a zero return
|
||||
will normally mean that the connection was closed.
|
||||
|
||||
If the port name is supplied as part of the host name then this will
|
||||
If the port name is supplied as part of the hostname then this will
|
||||
override any value set with BIO_set_conn_port(). This may be undesirable
|
||||
if the application does not wish to allow connection to arbitrary
|
||||
ports. This can be avoided by checking for the presence of the ':'
|
||||
|
||||
@@ -78,7 +78,7 @@ in stdio behaviour will be mirrored by the corresponding BIO.
|
||||
|
||||
On Windows BIO_new_files reserves for the filename argument to be
|
||||
UTF-8 encoded. In other words if you have to make it work in multi-
|
||||
lingual environment, encode file names in UTF-8.
|
||||
lingual environment, encode filenames in UTF-8.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ memory.
|
||||
|
||||
BN_bn2binpad() also converts the absolute value of B<a> into big-endian form
|
||||
and stores it at B<to>. B<tolen> indicates the length of the output buffer
|
||||
B<to>. The result is padded with zeroes if necessary. If B<tolen> is less than
|
||||
B<to>. The result is padded with zeros if necessary. If B<tolen> is less than
|
||||
BN_num_bytes(B<a>) an error is returned.
|
||||
|
||||
BN_bin2bn() converts the positive integer in big-endian form of length
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BN_generate_prime_ex2, BN_generate_prime_ex, BN_is_prime_ex,
|
||||
BN_generate_prime_ex2, BN_generate_prime_ex, BN_is_prime_ex, BN_check_prime,
|
||||
BN_is_prime_fasttest_ex, BN_GENCB_call, BN_GENCB_new, BN_GENCB_free,
|
||||
BN_GENCB_set_old, BN_GENCB_set, BN_GENCB_get_arg, BN_generate_prime,
|
||||
BN_is_prime, BN_is_prime_fasttest - generate primes and test for primality
|
||||
@@ -18,10 +18,7 @@ BN_is_prime, BN_is_prime_fasttest - generate primes and test for primality
|
||||
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
||||
const BIGNUM *rem, BN_GENCB *cb);
|
||||
|
||||
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
||||
|
||||
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
int do_trial_division, BN_GENCB *cb);
|
||||
int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
|
||||
|
||||
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
|
||||
|
||||
@@ -45,19 +42,32 @@ L<openssl_user_macros(7)>:
|
||||
BIGNUM *rem, void (*callback)(int, int, void *),
|
||||
void *cb_arg);
|
||||
|
||||
int BN_is_prime(const BIGNUM *a, int checks,
|
||||
int BN_is_prime(const BIGNUM *p, int nchecks,
|
||||
void (*callback)(int, int, void *), BN_CTX *ctx, void *cb_arg);
|
||||
|
||||
int BN_is_prime_fasttest(const BIGNUM *a, int checks,
|
||||
int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
|
||||
void (*callback)(int, int, void *), BN_CTX *ctx,
|
||||
void *cb_arg, int do_trial_division);
|
||||
|
||||
Deprecated since OpenSSL 3.0:
|
||||
|
||||
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
||||
|
||||
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
int do_trial_division, BN_GENCB *cb);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BN_generate_prime_ex2() generates a pseudo-random prime number of
|
||||
at least bit length B<bits> using the BN_CTX provided in B<ctx>. The value of
|
||||
B<ctx> must not be NULL.
|
||||
|
||||
The returned number is probably prime with a negligible error.
|
||||
The maximum error rate is 2^-128.
|
||||
It's 2^-287 for a 512 bit prime, 2^-435 for a 1024 bit prime,
|
||||
2^-648 for a 2048 bit prime, and lower than 2^-882 for primes larger
|
||||
than 2048 bit.
|
||||
|
||||
If B<add> is B<NULL> the returned prime number will have exact bit
|
||||
length B<bits> with the top most two bits set.
|
||||
|
||||
@@ -111,37 +121,43 @@ B<ctx> parameter is passed.
|
||||
In this case the random number generator associated with the default OPENSSL_CTX
|
||||
will be used.
|
||||
|
||||
BN_is_prime_ex() and BN_is_prime_fasttest_ex() test if the number B<p> is
|
||||
prime. The following tests are performed until one of them shows that
|
||||
B<p> is composite; if B<p> passes all these tests, it is considered
|
||||
prime.
|
||||
BN_check_prime(), BN_is_prime_ex(), BN_is_prime_fasttest_ex(), BN_is_prime()
|
||||
and BN_is_prime_fasttest() test if the number B<p> is prime.
|
||||
The functions tests until one of the tests shows that B<p> is composite,
|
||||
or all the tests passed.
|
||||
If B<p> passes all these tests, it is considered a probable prime.
|
||||
|
||||
BN_is_prime_fasttest_ex(), when called with B<do_trial_division == 1>,
|
||||
first attempts trial division by a number of small primes;
|
||||
if no divisors are found by this test and B<cb> is not B<NULL>,
|
||||
B<BN_GENCB_call(cb, 1, -1)> is called.
|
||||
If B<do_trial_division == 0>, this test is skipped.
|
||||
The test performed on B<p> are trial division by a number of small primes
|
||||
and rounds of the of the Miller-Rabin probabilistic primality test.
|
||||
|
||||
Both BN_is_prime_ex() and BN_is_prime_fasttest_ex() perform a Miller-Rabin
|
||||
probabilistic primality test with B<nchecks> iterations. If
|
||||
B<nchecks == BN_prime_checks>, a number of iterations is used that
|
||||
yields a false positive rate of at most 2^-64 for random input.
|
||||
The error rate depends on the size of the prime and goes down for bigger primes.
|
||||
The rate is 2^-80 starting at 308 bits, 2^-112 at 852 bits, 2^-128 at 1080 bits,
|
||||
2^-192 at 3747 bits and 2^-256 at 6394 bits.
|
||||
The functions do at least 64 rounds of the Miller-Rabin test giving a maximum
|
||||
false positive rate of 2^-128.
|
||||
If the size of B<p> is more than 2048 bits, they do at least 128 rounds
|
||||
giving a maximum false positive rate of 2^-256.
|
||||
|
||||
When the source of the prime is not random or not trusted, the number
|
||||
of checks needs to be much higher to reach the same level of assurance:
|
||||
It should equal half of the targeted security level in bits (rounded up to the
|
||||
next integer if necessary).
|
||||
For instance, to reach the 128 bit security level, B<nchecks> should be set to
|
||||
64.
|
||||
If B<nchecks> is larger than the minimum above (64 or 128), B<nchecks>
|
||||
rounds of the Miller-Rabin test will be done.
|
||||
|
||||
If B<cb> is not B<NULL>, B<BN_GENCB_call(cb, 1, j)> is called
|
||||
after the j-th iteration (j = 0, 1, ...). B<ctx> is a
|
||||
pre-allocated B<BN_CTX> (to save the overhead of allocating and
|
||||
If B<do_trial_division> set to B<0>, the trial division will be skipped.
|
||||
BN_is_prime_ex() and BN_is_prime() always skip the trial division.
|
||||
|
||||
BN_is_prime_ex(), BN_is_prime_fasttest_ex(), BN_is_prime()
|
||||
and BN_is_prime_fasttest() are deprecated.
|
||||
|
||||
BN_is_prime_fasttest() and BN_is_prime() behave just like
|
||||
BN_is_prime_fasttest_ex() and BN_is_prime_ex() respectively, but with the old
|
||||
style call back.
|
||||
|
||||
B<ctx> is a pre-allocated B<BN_CTX> (to save the overhead of allocating and
|
||||
freeing the structure in a loop), or B<NULL>.
|
||||
|
||||
If the trial division is done, and no divisors are found and B<cb>
|
||||
is not B<NULL>, B<BN_GENCB_call(cb, 1, -1)> is called.
|
||||
|
||||
After each round of the Miller-Rabin probabilistic primality test,
|
||||
if B<cb> is not B<NULL>, B<BN_GENCB_call(cb, 1, j)> is called
|
||||
with B<j> the iteration (j = 0, 1, ...).
|
||||
|
||||
BN_GENCB_call() calls the callback function held in the B<BN_GENCB> structure
|
||||
and passes the ints B<a> and B<b> as arguments. There are two types of
|
||||
B<BN_GENCB> structure that are supported: "new" style and "old" style. New
|
||||
@@ -176,9 +192,9 @@ BN_is_prime_fasttest_ex(), respectively.
|
||||
|
||||
BN_generate_prime_ex() return 1 on success or 0 on error.
|
||||
|
||||
BN_is_prime_ex(), BN_is_prime_fasttest_ex(), BN_is_prime() and
|
||||
BN_is_prime_fasttest() return 0 if the number is composite, 1 if it is
|
||||
prime with an error probability of less than 0.25^B<nchecks>, and
|
||||
BN_is_prime_ex(), BN_is_prime_fasttest_ex(), BN_is_prime(),
|
||||
BN_is_prime_fasttest() and BN_check_prime return 0 if the number is composite,
|
||||
1 if it is prime with an error probability of less than 0.25^B<nchecks>, and
|
||||
-1 on error.
|
||||
|
||||
BN_generate_prime() returns the prime number on success, B<NULL> otherwise.
|
||||
@@ -220,6 +236,8 @@ L<RAND(7)>
|
||||
The BN_GENCB_new(), BN_GENCB_free(),
|
||||
and BN_GENCB_get_arg() functions were added in OpenSSL 1.1.0.
|
||||
|
||||
BN_check_prime() was added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user