Latest update.
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
evp_keymgmt_export_to_provider,
|
||||
evp_keymgmt_clear_pkey_cache
|
||||
- key material provider export for EVP
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#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);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
evp_keymgmt_export_to_provider() exports the key material from the
|
||||
given key I<pk> to a provider via a B<EVP_KEYMGMT> interface, if this
|
||||
hasn't already been done.
|
||||
It maintains a cache of provider key references in I<pk> to keep track
|
||||
of all such exports.
|
||||
|
||||
If I<pk> has an assigned legacy key, a check is done to see if any of
|
||||
its key material has changed since last export, i.e. the legacy key's
|
||||
is_dirty() method returns 1.
|
||||
If it has, the cache of already exported keys is cleared, and a new
|
||||
export is made with the new key material.
|
||||
|
||||
evp_keymgmt_clear_pkey_cache() can be used to explicitly clear the
|
||||
cache of provider key references.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
evp_keymgmt_export_to_provider() returns a pointer to the appropriate
|
||||
provider side key (created or found again), or NULL on error.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
"Legacy key" is the term used for any key that has been assigned to an
|
||||
B<EVP_PKEY> with EVP_PKEY_assign_RSA() and similar functions.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_PKEY_ASN1_METHOD(3)>, L<EVP_PKEY_assign_RSA(3)>
|
||||
|
||||
=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
|
||||
@@ -1,109 +0,0 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
evp_keymgmt_importdomparams, evp_keymgmt_gendomparams,
|
||||
evp_keymgmt_freedomparams,
|
||||
evp_keymgmt_exportdomparams,
|
||||
evp_keymgmt_importdomparams_types, evp_keymgmt_exportdomparams_types,
|
||||
evp_keymgmt_importkey, evp_keymgmt_genkey, evp_keymgmt_loadkey,
|
||||
evp_keymgmt_freekey,
|
||||
evp_keymgmt_exportkey,
|
||||
evp_keymgmt_importkey_types, evp_keymgmt_exportkey_types
|
||||
- internal KEYMGMT support functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "crypto/evp.h"
|
||||
|
||||
void *evp_keymgmt_importdomparams(const EVP_KEYMGMT *keymgmt,
|
||||
const OSSL_PARAM params[]);
|
||||
void *evp_keymgmt_gendomparams(const EVP_KEYMGMT *keymgmt,
|
||||
const OSSL_PARAM params[]);
|
||||
void evp_keymgmt_freedomparams(const EVP_KEYMGMT *keymgmt, void *provdomparams);
|
||||
int evp_keymgmt_exportdomparams(const EVP_KEYMGMT *keymgmt,
|
||||
void *provdomparams, OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *evp_keymgmt_importdomparams_types(const EVP_KEYMGMT *keymgmt);
|
||||
const OSSL_PARAM *evp_keymgmt_exportdomparams_types(const EVP_KEYMGMT *keymgmt);
|
||||
|
||||
void *evp_keymgmt_importkey(const EVP_KEYMGMT *keymgmt,
|
||||
const OSSL_PARAM params[]);
|
||||
void *evp_keymgmt_genkey(const EVP_KEYMGMT *keymgmt, void *domparams,
|
||||
const OSSL_PARAM params[]);
|
||||
void *evp_keymgmt_loadkey(const EVP_KEYMGMT *keymgmt,
|
||||
void *id, size_t idlen);
|
||||
void evp_keymgmt_freekey(const EVP_KEYMGMT *keymgmt, void *provkey);
|
||||
int evp_keymgmt_exportkey(const EVP_KEYMGMT *keymgmt, void *provkey,
|
||||
OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *evp_keymgmt_importkey_types(const EVP_KEYMGMT *keymgmt);
|
||||
const OSSL_PARAM *evp_keymgmt_exportkey_types(const EVP_KEYMGMT *keymgmt);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All these functions are helpers to call the provider's corresponding
|
||||
function.
|
||||
|
||||
evp_keymgmt_importdomparams() calls the method's importdomparams() function.
|
||||
|
||||
evp_keymgmt_gendomparams() calls the method's gendomparams() function.
|
||||
|
||||
evp_keymgmt_freedomparams() calls the method's freedomparams() function.
|
||||
|
||||
evp_keymgmt_exportdomparams() calls the method's exportdomparams()
|
||||
function.
|
||||
|
||||
evp_keymgmt_importdomparams_types() calls the method's
|
||||
importdomparams_types() function.
|
||||
|
||||
evp_keymgmt_exportdomparams_types() calls the method's
|
||||
exportdomparams_types() function.
|
||||
|
||||
evp_keymgmt_importkey() calls the method's importkey()
|
||||
function.
|
||||
|
||||
evp_keymgmt_genkey() calls the method's genkey() function.
|
||||
|
||||
evp_keymgmt_loadkey() calls the method's loadkey() function.
|
||||
|
||||
evp_keymgmt_freekey() calls the method's freekey() function.
|
||||
|
||||
evp_keymgmt_exportkey() calls the method's exportkey()
|
||||
function.
|
||||
|
||||
evp_keymgmt_importkey_types() calls the method's importkey_types() function.
|
||||
|
||||
evp_keymgmt_exportkey_types() calls the method's exportkey_types() function.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
evp_keymgmt_importdomparams(), evp_keymgmt_gendomparams() return a pointer
|
||||
to a provider owned set of domparams parameters, or NULL on error.
|
||||
|
||||
evp_keymgmt_importkey(), evp_keymgmt_genkey(), evp_keymgmt_loadkey() return
|
||||
a pointer to a provider owned key, or NULL on error.
|
||||
|
||||
evp_keymgmt_exportdomparams() and evp_keymgmt_exportkey() return 1 on success,
|
||||
or 0 on error.
|
||||
|
||||
evp_keymgmt_importdomparams_types(), evp_keymgmt_exportdomparams_types()
|
||||
return parameter descriptor for importing and exporting domparams
|
||||
parameters, or NULL if there are no such descriptors.
|
||||
|
||||
evp_keymgmt_importkey_types() and evp_keymgmt_exportkey_types()
|
||||
return parameter descriptor for importing and exporting keys, or NULL
|
||||
if there are no such descriptors.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The functions described here were all added in OpenSSL 3.0.
|
||||
|
||||
=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
|
||||
@@ -0,0 +1,93 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
evp_keymgmt_newdata, evp_keymgmt_freedata,
|
||||
evp_keymgmt_get_params, evp_keymgmt_gettable_params,
|
||||
evp_keymgmt_has, evp_keymgmt_validate,
|
||||
evp_keymgmt_import, evp_keymgmt_import_types,
|
||||
evp_keymgmt_export, evp_keymgmt_export_types
|
||||
- internal KEYMGMT interface functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "crypto/evp.h"
|
||||
|
||||
void *evp_keymgmt_newdata(const EVP_KEYMGMT *keymgmt);
|
||||
void evp_keymgmt_freedata(const EVP_KEYMGMT *keymgmt, void *keyddata);
|
||||
int evp_keymgmt_get_params(const EVP_KEYMGMT *keymgmt,
|
||||
void *keydata, OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *evp_keymgmt_gettable_params(const EVP_KEYMGMT *keymgmt);
|
||||
|
||||
|
||||
int evp_keymgmt_has(const EVP_KEYMGMT *keymgmt, void *keyddata, int selection);
|
||||
int evp_keymgmt_validate(const EVP_KEYMGMT *keymgmt, void *keydata,
|
||||
int selection);
|
||||
|
||||
int evp_keymgmt_import(const EVP_KEYMGMT *keymgmt, void *keydata,
|
||||
int selection, const OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *evp_keymgmt_import_types(const EVP_KEYMGMT *keymgmt,
|
||||
int selection);
|
||||
int evp_keymgmt_export(const EVP_KEYMGMT *keymgmt, void *keydata,
|
||||
int selection, OSSL_CALLBACK *param_cb, void *cbarg);
|
||||
const OSSL_PARAM *evp_keymgmt_export_types(const EVP_KEYMGMT *keymgmt,
|
||||
int selection);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All these functions are helpers to call the provider's corresponding
|
||||
function. They all have in common that they take a B<EVP_KEYMGMT> as
|
||||
first argument, which they also retrieve a provider context from when
|
||||
needed. The rest of the arguments are simply passed on to the
|
||||
function they wrap around.
|
||||
|
||||
evp_keymgmt_newdata() calls the method's new() function.
|
||||
|
||||
evp_keymgmt_freedata() calls the method's free() function.
|
||||
|
||||
(the name evp_keymgmt_freedata() was chosen to avoid a clash with
|
||||
EVP_KEYMGMT_free() on case insensitive systems, the name
|
||||
evp_keymgmt_newdata() was chosen for consistency)
|
||||
|
||||
evp_keymgmt_get_params() calls the method's get_params() function.
|
||||
|
||||
evp_keymgmt_gettable_params() calls the method's gettable_params()
|
||||
function.
|
||||
|
||||
evp_keymgmt_has() calls the method's has() function.
|
||||
|
||||
evp_keymgmt_validate() calls the method's validate() function.
|
||||
|
||||
evp_keymgmt_import() calls the method's import() function.
|
||||
|
||||
evp_keymgmt_import_types() calls the method's import_types() function.
|
||||
|
||||
evp_keymgmt_export() calls the method's export() function.
|
||||
|
||||
evp_keymgmt_export_types() calls the method's export_types() function.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
evp_keymgmt_newdata() returns a pointer to a provider side key object,
|
||||
or NULL on error.
|
||||
|
||||
evp_keymgmt_gettable_params(), evp_keymgmt_import_types(), and
|
||||
evp_keymgmt_export_types() return parameter descriptor for importing
|
||||
and exporting key data, or NULL if there are no such descriptors.
|
||||
|
||||
All other functions return 1 on success and 0 on error.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The functions described here were all added in OpenSSL 3.0.
|
||||
|
||||
=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
|
||||
@@ -0,0 +1,71 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
evp_keymgmt_util_export_to_provider,
|
||||
evp_keymgmt_util_clear_pkey_cache,
|
||||
evp_keymgmt_util_cache_pkey,
|
||||
evp_keymgmt_util_fromdata
|
||||
- internal KEYMGMT utility functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include "crypto/evp.h"
|
||||
|
||||
void *evp_keymgmt_util_export_to_provider(EVP_PKEY *pk, EVP_KEYMGMT *keymgmt);
|
||||
void evp_keymgmt_util_clear_pkey_cache(EVP_PKEY *pk);
|
||||
void evp_keymgmt_util_cache_pkey(EVP_PKEY *pk, size_t index,
|
||||
EVP_KEYMGMT *keymgmt, void *keydata);
|
||||
void *evp_keymgmt_util_fromdata(EVP_PKEY *target, EVP_KEYMGMT *keymgmt,
|
||||
int selection, const OSSL_PARAM params[]);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
evp_keymgmt_util_export_to_provider() exports the key material from
|
||||
the given key I<pk> to a provider via a B<EVP_KEYMGMT> interface, if
|
||||
this hasn't already been done.
|
||||
It maintains a cache of provider key references in I<pk> to keep track
|
||||
of all such exports.
|
||||
|
||||
If I<pk> has an assigned legacy key, a check is done to see if any of
|
||||
its key material has changed since last export, i.e. the legacy key's
|
||||
is_dirty() method returns 1.
|
||||
If it has, the cache of already exported keys is cleared, and a new
|
||||
export is made with the new key material.
|
||||
|
||||
evp_keymgmt_util_clear_pkey_cache() can be used to explicitly clear
|
||||
the cache of provider key references.
|
||||
|
||||
evp_keymgmt_util_cache_pkey() can be used to assign a provider key
|
||||
object to a specific cache slot in the given I<target>.
|
||||
I<Use with extreme care>.
|
||||
|
||||
evp_keymgmt_util_fromdata() can be used to add key object data to a
|
||||
given key I<target> via a B<EVP_KEYMGMT> interface. This is used as a
|
||||
helper for L<EVP_PKEY_fromdata(3)>.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
evp_keymgmt_export_to_provider() and evp_keymgmt_util_fromdata()
|
||||
return a pointer to the appropriate provider side key (created or
|
||||
found again), or NULL on error.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
"Legacy key" is the term used for any key that has been assigned to an
|
||||
B<EVP_PKEY> with EVP_PKEY_assign_RSA() and similar functions.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_PKEY_ASN1_METHOD(3)>, L<EVP_PKEY_assign_RSA(3)>
|
||||
|
||||
=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
|
||||
@@ -10,8 +10,7 @@ evp_pkey_make_provided - internal EVP_PKEY support functions for providers
|
||||
#include "evp_local.h"
|
||||
|
||||
void *evp_pkey_make_provided(EVP_PKEY *pk, OPENSSL_CTX *libctx,
|
||||
EVP_KEYMGMT **keymgmt, const char *propquery,
|
||||
int domainparams);
|
||||
EVP_KEYMGMT **keymgmt, const char *propquery);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -24,8 +23,6 @@ used for exporting. If not (I<*keymgmt> is NULL), then this function will
|
||||
fetch an B<EVP_KEYMGMT> implicitly, using I<propquery> as property query string.
|
||||
As output from this function, I<*keymgmt> will be assigned the B<EVP_KEYMGMT>
|
||||
that was used, if the export was successful, otherwise it will be assigned NULL.
|
||||
I<domainparams> decides if I<pk> should be considered domain parameters or the
|
||||
actual key.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ See the individual functions above.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<OSSL_CMP_CTX_new(3)>, L<ossl_cmp_certreq_new(3)>
|
||||
L<OSSL_CMP_CTX_new(3)>, L<ossl_cmp_certReq_new(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
+56
-27
@@ -1,84 +1,113 @@
|
||||
|
||||
# Keep this in sync with .gitignore!
|
||||
DEPEND[]= \
|
||||
openssl-ca.pod \
|
||||
openssl-cms.pod \
|
||||
openssl-crl.pod \
|
||||
openssl-dgst.pod \
|
||||
openssl-dhparam.pod \
|
||||
openssl-dsa.pod \
|
||||
openssl-dsaparam.pod \
|
||||
openssl-ec.pod \
|
||||
openssl-ecparam.pod \
|
||||
openssl-enc.pod \
|
||||
openssl-gendsa.pod \
|
||||
openssl-genpkey.pod \
|
||||
openssl-genrsa.pod \
|
||||
openssl-ocsp.pod \
|
||||
openssl-passwd.pod \
|
||||
openssl-pkcs12.pod \
|
||||
openssl-pkcs7.pod \
|
||||
openssl-pkcs8.pod \
|
||||
openssl-pkey.pod \
|
||||
openssl-pkeyparam.pod \
|
||||
openssl-pkeyutl.pod \
|
||||
openssl-rand.pod \
|
||||
openssl-req.pod \
|
||||
openssl-rsa.pod \
|
||||
openssl-rsautl.pod \
|
||||
openssl-s_client.pod \
|
||||
openssl-s_server.pod \
|
||||
openssl-s_time.pod \
|
||||
openssl-smime.pod \
|
||||
openssl-speed.pod \
|
||||
openssl-spkac.pod \
|
||||
openssl-srp.pod \
|
||||
openssl-storeutl.pod \
|
||||
openssl-ts.pod \
|
||||
openssl-verify.pod \
|
||||
openssl-x509.pod
|
||||
|
||||
DEPEND[openssl-ca.pod]=../perlvars.pm
|
||||
GENERATE[openssl-ca.pod]=openssl-ca.pod.in
|
||||
DEPEND[openssl-cms.pod]=../perlvars.pm
|
||||
GENERATE[openssl-cms.pod]=openssl-cms.pod.in
|
||||
DEPEND[openssl-crl.pod]=../perlvars.pm
|
||||
GENERATE[openssl-crl.pod]=openssl-crl.pod.in
|
||||
DEPEND[openssl-dgst.pod]=../perlvars.pm
|
||||
GENERATE[openssl-dgst.pod]=openssl-dgst.pod.in
|
||||
DEPEND[openssl-dhparam.pod]=../perlvars.pm
|
||||
GENERATE[openssl-dhparam.pod]=openssl-dhparam.pod.in
|
||||
DEPEND[openssl-dsa.pod]=../perlvars.pm
|
||||
DEPEND[openssl-dsaparam.pod]=../perlvars.pm
|
||||
GENERATE[openssl-dsaparam.pod]=openssl-dsaparam.pod.in
|
||||
DEPEND[openssl-ec.pod]=../perlvars.pm
|
||||
DEPEND[openssl-ecparam.pod]=../perlvars.pm
|
||||
GENERATE[openssl-ecparam.pod]=openssl-ecparam.pod.in
|
||||
DEPEND[openssl-enc.pod]=../perlvars.pm
|
||||
GENERATE[openssl-enc.pod]=openssl-enc.pod.in
|
||||
DEPEND[openssl-gendsa.pod]=../perlvars.pm
|
||||
GENERATE[openssl-gendsa.pod]=openssl-gendsa.pod.in
|
||||
DEPEND[openssl-genpkey.pod]=../perlvars.pm
|
||||
DEPEND[openssl-genrsa.pod]=../perlvars.pm
|
||||
GENERATE[openssl-genrsa.pod]=openssl-genrsa.pod.in
|
||||
DEPEND[openssl-ocsp.pod]=../perlvars.pm
|
||||
GENERATE[openssl-ocsp.pod]=openssl-ocsp.pod.in
|
||||
DEPEND[openssl-passwd.pod]=../perlvars.pm
|
||||
GENERATE[openssl-passwd.pod]=openssl-passwd.pod.in
|
||||
DEPEND[openssl-pkcs8.pod]=../perlvars.pm
|
||||
GENERATE[openssl-pkcs8.pod]=openssl-pkcs8.pod.in
|
||||
DEPEND[openssl-pkcs12.pod]=../perlvars.pm
|
||||
GENERATE[openssl-pkcs12.pod]=openssl-pkcs12.pod.in
|
||||
DEPEND[openssl-pkcs7.pod]=../perlvars.pm
|
||||
DEPEND[openssl-pkcs8.pod]=../perlvars.pm
|
||||
DEPEND[openssl-pkey.pod]=../perlvars.pm
|
||||
DEPEND[openssl-pkeyparam.pod]=../perlvars.pm
|
||||
DEPEND[openssl-pkeyutl.pod]=../perlvars.pm
|
||||
GENERATE[openssl-pkeyutl.pod]=openssl-pkeyutl.pod.in
|
||||
DEPEND[openssl-rand.pod]=../perlvars.pm
|
||||
GENERATE[openssl-rand.pod]=openssl-rand.pod.in
|
||||
DEPEND[openssl-req.pod]=../perlvars.pm
|
||||
GENERATE[openssl-req.pod]=openssl-req.pod.in
|
||||
DEPEND[openssl-rsa.pod]=../perlvars.pm
|
||||
DEPEND[openssl-rsautl.pod]=../perlvars.pm
|
||||
GENERATE[openssl-rsautl.pod]=openssl-rsautl.pod.in
|
||||
DEPEND[openssl-s_client.pod]=../perlvars.pm
|
||||
GENERATE[openssl-s_client.pod]=openssl-s_client.pod.in
|
||||
DEPEND[openssl-s_server.pod]=../perlvars.pm
|
||||
GENERATE[openssl-s_server.pod]=openssl-s_server.pod.in
|
||||
DEPEND[openssl-s_time.pod]=../perlvars.pm
|
||||
GENERATE[openssl-s_time.pod]=openssl-s_time.pod.in
|
||||
DEPEND[openssl-smime.pod]=../perlvars.pm
|
||||
GENERATE[openssl-smime.pod]=openssl-smime.pod.in
|
||||
DEPEND[openssl-speed.pod]=../perlvars.pm
|
||||
GENERATE[openssl-speed.pod]=openssl-speed.pod.in
|
||||
DEPEND[openssl-spkac.pod]=../perlvars.pm
|
||||
DEPEND[openssl-srp.pod]=../perlvars.pm
|
||||
GENERATE[openssl-srp.pod]=openssl-srp.pod.in
|
||||
DEPEND[openssl-storeutl.pod]=../perlvars.pm
|
||||
DEPEND[openssl-ts.pod]=../perlvars.pm
|
||||
GENERATE[openssl-ts.pod]=openssl-ts.pod.in
|
||||
DEPEND[openssl-verify.pod]=../perlvars.pm
|
||||
GENERATE[openssl-verify.pod]=openssl-verify.pod.in
|
||||
DEPEND[openssl-x509.pod]=../perlvars.pm
|
||||
|
||||
GENERATE[openssl-ca.pod]=openssl-ca.pod.in
|
||||
GENERATE[openssl-cms.pod]=openssl-cms.pod.in
|
||||
GENERATE[openssl-crl.pod]=openssl-crl.pod.in
|
||||
GENERATE[openssl-dgst.pod]=openssl-dgst.pod.in
|
||||
GENERATE[openssl-dhparam.pod]=openssl-dhparam.pod.in
|
||||
GENERATE[openssl-dsa.pod]=openssl-dsa.pod.in
|
||||
GENERATE[openssl-dsaparam.pod]=openssl-dsaparam.pod.in
|
||||
GENERATE[openssl-ec.pod]=openssl-ec.pod.in
|
||||
GENERATE[openssl-ecparam.pod]=openssl-ecparam.pod.in
|
||||
GENERATE[openssl-enc.pod]=openssl-enc.pod.in
|
||||
GENERATE[openssl-gendsa.pod]=openssl-gendsa.pod.in
|
||||
GENERATE[openssl-genpkey.pod]=openssl-genpkey.pod.in
|
||||
GENERATE[openssl-genrsa.pod]=openssl-genrsa.pod.in
|
||||
GENERATE[openssl-ocsp.pod]=openssl-ocsp.pod.in
|
||||
GENERATE[openssl-passwd.pod]=openssl-passwd.pod.in
|
||||
GENERATE[openssl-pkcs12.pod]=openssl-pkcs12.pod.in
|
||||
GENERATE[openssl-pkcs7.pod]=openssl-pkcs7.pod.in
|
||||
GENERATE[openssl-pkcs8.pod]=openssl-pkcs8.pod.in
|
||||
GENERATE[openssl-pkey.pod]=openssl-pkey.pod.in
|
||||
GENERATE[openssl-pkeyparam.pod]=openssl-pkeyparam.pod.in
|
||||
GENERATE[openssl-pkeyutl.pod]=openssl-pkeyutl.pod.in
|
||||
GENERATE[openssl-rand.pod]=openssl-rand.pod.in
|
||||
GENERATE[openssl-req.pod]=openssl-req.pod.in
|
||||
GENERATE[openssl-rsa.pod]=openssl-rsa.pod.in
|
||||
GENERATE[openssl-rsautl.pod]=openssl-rsautl.pod.in
|
||||
GENERATE[openssl-s_client.pod]=openssl-s_client.pod.in
|
||||
GENERATE[openssl-s_server.pod]=openssl-s_server.pod.in
|
||||
GENERATE[openssl-s_time.pod]=openssl-s_time.pod.in
|
||||
GENERATE[openssl-smime.pod]=openssl-smime.pod.in
|
||||
GENERATE[openssl-speed.pod]=openssl-speed.pod.in
|
||||
GENERATE[openssl-spkac.pod]=openssl-spkac.pod.in
|
||||
GENERATE[openssl-srp.pod]=openssl-srp.pod.in
|
||||
GENERATE[openssl-storeutl.pod]=openssl-storeutl.pod.in
|
||||
GENERATE[openssl-ts.pod]=openssl-ts.pod.in
|
||||
GENERATE[openssl-verify.pod]=openssl-verify.pod.in
|
||||
GENERATE[openssl-x509.pod]=openssl-x509.pod.in
|
||||
@@ -23,6 +23,7 @@ B<openssl> B<ca>
|
||||
[B<-crl_CA_compromise> I<time>]
|
||||
[B<-crldays> I<days>]
|
||||
[B<-crlhours> I<hours>]
|
||||
[B<-crlsec> I<seconds>]
|
||||
[B<-crlexts> I<section>]
|
||||
[B<-startdate> I<date>]
|
||||
[B<-enddate> I<date>]
|
||||
@@ -149,6 +150,8 @@ Names and values of these options are algorithm-specific.
|
||||
|
||||
=item B<-key> I<password>
|
||||
|
||||
=for openssl foreign manual ps(1)
|
||||
|
||||
The password used to encrypt the private key. Since on some
|
||||
systems the command line arguments are visible (e.g. Unix with
|
||||
the L<ps(1)> utility) this option should be used with caution.
|
||||
@@ -324,6 +327,10 @@ now to place in the CRL nextUpdate field.
|
||||
|
||||
The number of hours before the next CRL is due.
|
||||
|
||||
=item B<-crlsec> I<num>
|
||||
|
||||
The number of seconds before the next CRL is due.
|
||||
|
||||
=item B<-revoke> I<filename>
|
||||
|
||||
A filename containing a certificate to revoke.
|
||||
|
||||
@@ -1,781 +0,0 @@
|
||||
=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(3)> 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,7 +55,7 @@ version,
|
||||
x509
|
||||
- OpenSSL application commands
|
||||
|
||||
=for comment foreign manuals: apropos(1)
|
||||
=for openssl foreign manual apropos(1)
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -136,6 +136,8 @@ L<openssl-x509(1)>,
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
=for openssl foreign manual apropos(1)
|
||||
|
||||
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
|
||||
|
||||
+39
-39
@@ -11,8 +11,13 @@ B<openssl> B<cms>
|
||||
[B<-help>]
|
||||
[B<-encrypt>]
|
||||
[B<-decrypt>]
|
||||
[B<-debug_decrypt>]
|
||||
[B<-sign>]
|
||||
[B<-verify>]
|
||||
[B<-verify_retcode>]
|
||||
[B<-no_attr_verify>]
|
||||
[B<-nosigs>]
|
||||
[B<-no_content_verify>]
|
||||
[B<-cmsout>]
|
||||
[B<-resign>]
|
||||
[B<-cades>]
|
||||
@@ -22,6 +27,7 @@ B<openssl> B<cms>
|
||||
[B<-digest_verify>]
|
||||
[B<-compress>]
|
||||
[B<-uncompress>]
|
||||
[B<-EncryptedData_decrypt>]
|
||||
[B<-EncryptedData_encrypt>]
|
||||
[B<-sign_receipt>]
|
||||
[B<-verify_receipt> I<receipt>]
|
||||
@@ -34,39 +40,10 @@ B<openssl> B<cms>
|
||||
[B<-stream>]
|
||||
[B<-indef>]
|
||||
[B<-noindef>]
|
||||
[B<-noindef>]
|
||||
[B<-content> I<filename>]
|
||||
[B<-text>]
|
||||
[B<-noout>]
|
||||
[B<-print>]
|
||||
[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<-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<-no_alt_chains>]
|
||||
[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>]
|
||||
[B<-md> I<digest>]
|
||||
[B<-I<cipher>>]
|
||||
[B<-nointern>]
|
||||
@@ -88,6 +65,7 @@ B<openssl> B<cms>
|
||||
[B<-receipt_request_from> I<emailaddress>]
|
||||
[B<-receipt_request_to> I<emailaddress>]
|
||||
[B<-receipt_request_print>]
|
||||
[B<-pwri_password> I<password>]
|
||||
[B<-secretkey> I<key>]
|
||||
[B<-secretkeyid> I<id>]
|
||||
[B<-econtent_type> I<type>]
|
||||
@@ -97,8 +75,10 @@ B<openssl> B<cms>
|
||||
[B<-to> I<addr>]
|
||||
[B<-from> I<addr>]
|
||||
[B<-subject> I<subj>]
|
||||
{- $OpenSSL::safe::opt_v_synopsis -}
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
[I<cert.pem> ...]
|
||||
|
||||
=for openssl ifdef des-wrap engine
|
||||
@@ -151,6 +131,22 @@ to the output file.
|
||||
Verify signed mail. Expects a signed mail message on input and outputs
|
||||
the signed data. Both clear text and opaque signing is supported.
|
||||
|
||||
=item B<-verify_retcode>
|
||||
|
||||
Exit nonzero on verification failure.
|
||||
|
||||
=item B<-no_attr_verify>
|
||||
|
||||
Do not verify signed attribute signatures.
|
||||
|
||||
=item B<-no_content_verify>
|
||||
|
||||
Do not verify signed content signatures.
|
||||
|
||||
=item B<-nosigs>
|
||||
|
||||
Don't verify message signature.
|
||||
|
||||
=item B<-cmsout>
|
||||
|
||||
Takes an input message and writes out a PEM encoded CMS structure.
|
||||
@@ -192,6 +188,11 @@ Uncompress a CMS B<CompressedData> type and output the content. OpenSSL must be
|
||||
compiled with B<zlib> support for this option to work, otherwise it will
|
||||
output an error.
|
||||
|
||||
=item B<-EncryptedData_decrypt>
|
||||
|
||||
Decrypt content using supplied symmetric key and algorithm using a CMS
|
||||
B<EncryptedData> type and output the content.
|
||||
|
||||
=item B<-EncryptedData_encrypt>
|
||||
|
||||
Encrypt content using supplied symmetric key and algorithm using a CMS
|
||||
@@ -242,7 +243,7 @@ The signed receipt format for use with the B<-receipt_verify>; the default
|
||||
is B<SMIME>.
|
||||
See L<openssl(1)/Format Options> for details.
|
||||
|
||||
=item B<-stream>, B<-indef>, B<-noindef>
|
||||
=item B<-stream>, B<-indef>
|
||||
|
||||
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
|
||||
@@ -413,6 +414,10 @@ 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<-pwri_password> I<password>
|
||||
|
||||
Specify password for recipient.
|
||||
|
||||
=item B<-secretkey> I<key>
|
||||
|
||||
Specify symmetric key to use. The key must be supplied in hex format and be
|
||||
@@ -462,21 +467,16 @@ portion of a message so they may be included manually. If signing
|
||||
then many S/MIME mail clients check the signers certificate's email
|
||||
address matches that specified in the From: address.
|
||||
|
||||
=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>,
|
||||
B<-inhibit_map>, B<-no_alt_chains>, B<-no_check_time>, B<-partial_chain>, B<-policy>,
|
||||
B<-policy_check>, 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>, B<-x509_strict>
|
||||
{- $OpenSSL::safe::opt_v_item -}
|
||||
|
||||
Set various certificate chain validation options. See the
|
||||
L<openssl-verify(1)> manual page for details.
|
||||
Any verification errors cause the command to exit.
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
=item I<cert.pem> ...
|
||||
|
||||
One or more certificates of message recipients: used when encrypting
|
||||
|
||||
@@ -11,12 +11,19 @@ B<openssl> B<crl>
|
||||
[B<-help>]
|
||||
[B<-inform> B<DER>|B<PEM>]
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-key> I<filename>]
|
||||
[B<-keyform> B<DER>|B<PEM>|B<ENGINE>]
|
||||
[B<-text>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-gendelta> I<filename>]
|
||||
[B<-badsig>]
|
||||
[B<-verify>]
|
||||
[B<-noout>]
|
||||
[B<-hash>]
|
||||
[B<-hash_old>]
|
||||
[B<-fingerprint>]
|
||||
[B<-crlnumber>]
|
||||
[B<-issuer>]
|
||||
[B<-lastupdate>]
|
||||
[B<-nextupdate>]
|
||||
@@ -42,6 +49,10 @@ Print out a usage message.
|
||||
The input and output formats of the CRL; the default is B<PEM>.
|
||||
See L<openssl(1)/Format Options> for details.
|
||||
|
||||
=item B<-key> I<filename>
|
||||
|
||||
The private key to be used to sign the CRL.
|
||||
|
||||
=item B<-keyform> B<DER>|B<PEM>|B<ENGINE>
|
||||
|
||||
The format of the private key file; the default is B<PEM>.
|
||||
@@ -57,14 +68,35 @@ option is not specified.
|
||||
Specifies the output filename to write to or standard output by
|
||||
default.
|
||||
|
||||
=item B<-gendelta> I<filename>
|
||||
|
||||
Output a comparison of the main CRL and the one specified here.
|
||||
|
||||
=item B<-badsig>
|
||||
|
||||
Corrupt the signature before writing it; this can be useful
|
||||
for testing.
|
||||
|
||||
=item B<-text>
|
||||
|
||||
Print out the CRL in text form.
|
||||
|
||||
=item B<-verify>
|
||||
|
||||
Verify the signature in the CRL.
|
||||
|
||||
=item B<-noout>
|
||||
|
||||
Don't output the encoded version of the CRL.
|
||||
|
||||
=item B<-fingerprint>
|
||||
|
||||
Output the fingerprint of the CRL.
|
||||
|
||||
=item B<-crlnumber>
|
||||
|
||||
Output the number of the CRL.
|
||||
|
||||
=item B<-hash>
|
||||
|
||||
Output a hash of the issuer name. This can be use to lookup CRLs in
|
||||
|
||||
@@ -12,6 +12,7 @@ B<openssl> B<dgst>|I<digest>
|
||||
[B<-help>]
|
||||
[B<-c>]
|
||||
[B<-d>]
|
||||
[B<-debug>]
|
||||
[B<-list>]
|
||||
[B<-hex>]
|
||||
[B<-binary>]
|
||||
@@ -25,9 +26,11 @@ B<openssl> B<dgst>|I<digest>
|
||||
[B<-signature> I<filename>]
|
||||
[B<-sigopt> I<nm>:I<v>]
|
||||
[B<-hmac> I<key>]
|
||||
[B<-mac> I<alg>]
|
||||
[B<-macopt> I<nm>:I<v>]
|
||||
[B<-fips-fingerprint>]
|
||||
[B<-engine> I<id>]
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
[B<-engine_impl> I<id>]
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
[I<file> ...]
|
||||
|
||||
@@ -61,7 +64,7 @@ supported digests, use the command C<list --digest-commands>.
|
||||
Print out the digest in two digit groups separated by colons, only relevant if
|
||||
the B<-hex> option is given as well.
|
||||
|
||||
=item B<-d>
|
||||
=item B<-d>, B<-debug>
|
||||
|
||||
Print out BIO debugging information.
|
||||
|
||||
@@ -81,6 +84,8 @@ Output the digest or signature in binary form.
|
||||
|
||||
=item B<-r>
|
||||
|
||||
=for openssl foreign manual sha1sum(1)
|
||||
|
||||
Output the digest in the "coreutils" format, including newlines.
|
||||
Used by programs like L<sha1sum(1)>.
|
||||
|
||||
@@ -168,17 +173,17 @@ option.
|
||||
|
||||
Compute HMAC using a specific key for certain OpenSSL-FIPS operations.
|
||||
|
||||
=item B<-engine_impl>
|
||||
|
||||
When used with the B<-engine> option, it specifies to also use
|
||||
engine I<id> for digest operations.
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
The engine is not used for digests unless the B<-engine_impl> option is
|
||||
used or it is configured to do so, see L<config(5)/Engine Configuration Module>.
|
||||
|
||||
=item B<-engine_impl> I<id>
|
||||
|
||||
When used with the B<-engine> option, it specifies to also use
|
||||
engine I<id> for digest operations.
|
||||
|
||||
=item I<file> ...
|
||||
|
||||
File or files to digest. If no files are specified then standard input is
|
||||
|
||||
@@ -108,19 +108,15 @@ be loaded by calling the get_dhNNNN() function.
|
||||
|
||||
=back
|
||||
|
||||
=head1 WARNINGS
|
||||
|
||||
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
|
||||
|
||||
This command replaces the B<dh> and B<gendh> commands of previous
|
||||
releases.
|
||||
|
||||
OpenSSL currently only supports the older PKCS#3 DH, not the newer X9.42
|
||||
DH.
|
||||
|
||||
This program manipulates DH parameters not keys.
|
||||
This command manipulates DH parameters not keys.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
|
||||
@@ -35,12 +35,13 @@ B<openssl> B<enc>|I<cipher>
|
||||
[B<-P>]
|
||||
[B<-bufsize> I<number>]
|
||||
[B<-nopad>]
|
||||
[B<-v>]
|
||||
[B<-debug>]
|
||||
[B<-none>]
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
|
||||
=for openssl ifdef z engine
|
||||
=for openssl ifdef z engine ciphers
|
||||
|
||||
B<openssl> I<cipher> [B<...>]
|
||||
|
||||
@@ -176,6 +177,10 @@ Set the buffer size for I/O.
|
||||
|
||||
Disable standard block padding.
|
||||
|
||||
=item B<-v>
|
||||
|
||||
Verbose print; display some statistics about I/O and buffer sizes.
|
||||
|
||||
=item B<-debug>
|
||||
|
||||
Debug the BIOs used for I/O.
|
||||
|
||||
@@ -7,6 +7,7 @@ openssl-engine - load and query engines
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl engine>
|
||||
[B<-help>]
|
||||
[B<-v>]
|
||||
[B<-vv>]
|
||||
[B<-vvv>]
|
||||
@@ -29,6 +30,10 @@ Only those specified are queried.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-help>
|
||||
|
||||
Display an option summary.
|
||||
|
||||
=item B<-v> B<-vv> B<-vvv> B<-vvvv>
|
||||
|
||||
Provides information about each specified engine. The first flag lists
|
||||
|
||||
@@ -6,24 +6,32 @@ openssl-errstr - lookup error codes
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl errstr> I<error_code>
|
||||
B<openssl errstr>
|
||||
[B<-help>]
|
||||
I<error_code...>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Sometimes an application will not load error message and only
|
||||
Sometimes an application will not load error message texts and only
|
||||
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
|
||||
|
||||
None.
|
||||
=over 4
|
||||
|
||||
=item B<-help>
|
||||
|
||||
Display a usage message.
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
The error code:
|
||||
|
||||
27594:error:2006D080:lib(32):func(109):reason(128):bss_file.c:107:
|
||||
27594:error:2006D080:lib(32)::reason(128)::107:
|
||||
|
||||
can be displayed with:
|
||||
|
||||
@@ -31,7 +39,7 @@ can be displayed with:
|
||||
|
||||
to produce the error message:
|
||||
|
||||
error:2006D080:BIO routines:BIO_new_file:no such file
|
||||
error:2006D080:BIO routines::no such file
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ openssl-gendsa - generate a DSA private key from a set of parameters
|
||||
B<openssl> B<gendsa>
|
||||
[B<-help>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-aes128>]
|
||||
[B<-aes192>]
|
||||
[B<-aes256>]
|
||||
@@ -47,6 +48,11 @@ Print out a usage message.
|
||||
Output the key to the specified file. If this argument is not specified then
|
||||
standard output is used.
|
||||
|
||||
=item B<-passout> I<arg>
|
||||
|
||||
The passphrase used for the output file.
|
||||
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 specified
|
||||
|
||||
@@ -23,7 +23,9 @@ B<openssl> B<genrsa>
|
||||
[B<-des>]
|
||||
[B<-des3>]
|
||||
[B<-idea>]
|
||||
[B<-f4>|B<-3>]
|
||||
[B<-F4>]
|
||||
[B<-f4>]
|
||||
[B<-3>]
|
||||
[B<-primes> I<num>]
|
||||
[B<-verbose>]
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
@@ -61,7 +63,7 @@ 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>|B<-3>
|
||||
=item B<-F4>, B<-f4>, B<-3>
|
||||
|
||||
The public exponent to use, either 65537 or 3. The default is 65537.
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ B<openssl list>
|
||||
[B<-public-key-methods>]
|
||||
[B<-engines>]
|
||||
[B<-disabled>]
|
||||
[B<-objects>]
|
||||
[B<-options> I<command>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -92,6 +94,14 @@ of the installation.
|
||||
Display a list of built in objects, i.e. OIDs with names. They're listed in the
|
||||
format described in L<config(5)/ASN1 Object Configuration Module>.
|
||||
|
||||
=item B<-options> I<command>
|
||||
|
||||
Output a two-column list of the options accepted by the specified I<command>.
|
||||
The first is the option name, and the second is a one-character indication
|
||||
of what type of parameter it takes, if any.
|
||||
This is an internal option, used for checking that the documentation
|
||||
is complete.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Display of algorithm names
|
||||
|
||||
@@ -30,35 +30,8 @@ B<openssl> B<ocsp>
|
||||
[B<-host> I<host>:I<port>]
|
||||
[B<-multi> I<process-count>]
|
||||
[B<-header>]
|
||||
[B<-timeout> I<seconds>]
|
||||
[B<-path>]
|
||||
[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<-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<-no_alt_chains>]
|
||||
[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>]
|
||||
[B<-VAfile> I<file>]
|
||||
[B<-validity_period> I<n>]
|
||||
[B<-status_age> I<n>]
|
||||
@@ -80,6 +53,8 @@ B<openssl> B<ocsp>
|
||||
[B<-passin> I<arg>]
|
||||
[B<-rother> I<file>]
|
||||
[B<-rsigopt> I<nm>:I<v>]
|
||||
[B<-rmd> I<digest>]
|
||||
[B<-badsig>]
|
||||
[B<-resp_no_certs>]
|
||||
[B<-nmin> I<n>]
|
||||
[B<-ndays> I<n>]
|
||||
@@ -88,6 +63,7 @@ B<openssl> B<ocsp>
|
||||
[B<-rcid> I<digest>]
|
||||
[B<-I<digest>>]
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
{- $OpenSSL::safe::opt_v_synopsis -}
|
||||
|
||||
=for openssl ifdef multi
|
||||
|
||||
@@ -206,17 +182,6 @@ 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<-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<-no_alt_chains>, B<-no_check_time>, B<-partial_chain>, B<-policy>,
|
||||
B<-policy_check>, 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>, B<-x509_strict>
|
||||
|
||||
Set different certificate verification options.
|
||||
See L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=item B<-verify_other> I<file>
|
||||
|
||||
File containing additional certificates to search when attempting to locate
|
||||
@@ -307,6 +272,8 @@ digest used by subsequent certificate identifiers.
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_v_item -}
|
||||
|
||||
=back
|
||||
|
||||
=head2 OCSP Server Options
|
||||
@@ -364,6 +331,15 @@ see L<openssl(1)/Pass Phrase Options>.
|
||||
Pass options to the signature algorithm when signing OCSP responses.
|
||||
Names and values of these options are algorithm-specific.
|
||||
|
||||
=item B<-rmd> I<digest>
|
||||
|
||||
The digest to use when signing the response.
|
||||
|
||||
=item B<-badsig>
|
||||
|
||||
Corrupt the response signature before writing it; this can be useful
|
||||
for testing.
|
||||
|
||||
=item B<-port> I<portnum>
|
||||
|
||||
Port to listen for OCSP requests on. The port may also be specified
|
||||
|
||||
@@ -21,6 +21,7 @@ B<openssl passwd>
|
||||
[B<-noverify>]
|
||||
[B<-quiet>]
|
||||
[B<-table>]
|
||||
[B<-reverse>]
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
[I<password>]
|
||||
|
||||
@@ -93,6 +94,10 @@ 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<-reverse>
|
||||
|
||||
When the B<-table> option is used, reverse the order of cleartext and hash.
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
=back
|
||||
|
||||
@@ -24,8 +24,22 @@ B<openssl> B<pkcs12>
|
||||
[B<-cacerts>]
|
||||
[B<-nokeys>]
|
||||
[B<-info>]
|
||||
[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<-iter> I<count> | B<-noiter> | B<-nomaciter>]
|
||||
[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<-iter> I<count>]
|
||||
[B<-noiter>]
|
||||
[B<-nomaciter>]
|
||||
[B<-maciter>]
|
||||
[B<-nomac>]
|
||||
[B<-twopass>]
|
||||
@@ -38,6 +52,7 @@ B<openssl> B<pkcs12>
|
||||
[B<-password> I<arg>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-passout> I<arg>]
|
||||
[B<-LMK>]
|
||||
[B<-CSP> I<name>]
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
@@ -264,6 +279,10 @@ 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<-LMK>
|
||||
|
||||
Add the "Local Key Set" identifier to the attributes.
|
||||
|
||||
=item B<-CSP> I<name>
|
||||
|
||||
Write I<name> as a Microsoft CSP name.
|
||||
|
||||
@@ -17,6 +17,7 @@ B<openssl> B<pkcs7>
|
||||
[B<-outform> B<DER>|B<PEM>]
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-print>]
|
||||
[B<-print_certs>]
|
||||
[B<-text>]
|
||||
[B<-noout>]
|
||||
@@ -30,8 +31,6 @@ This command processes PKCS#7 files. Note that it only understands PKCS#7
|
||||
v 1.5 as specified in IETF RFC 2315. It cannot currently parse CMS as
|
||||
described in IETF RFC 2630.
|
||||
|
||||
There is no option to print out all the fields of a PKCS#7 file.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
@@ -57,6 +56,10 @@ option is not specified.
|
||||
Specifies the output filename to write to or standard output by
|
||||
default.
|
||||
|
||||
=item B<-print>
|
||||
|
||||
Print out the full PKCS7 object.
|
||||
|
||||
=item B<-print_certs>
|
||||
|
||||
Prints out any certificates or CRLs contained in the file. They are
|
||||
@@ -64,13 +67,13 @@ preceded by their subject and issuer names in one line format.
|
||||
|
||||
=item B<-text>
|
||||
|
||||
Prints out certificates details in full rather than just subject and
|
||||
Prints out certificate details in full rather than just subject and
|
||||
issuer names.
|
||||
|
||||
=item B<-noout>
|
||||
|
||||
Don't output the encoded version of the PKCS#7 structure (or certificates
|
||||
is B<-print_certs> is set).
|
||||
if B<-print_certs> is set).
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ B<openssl rand>
|
||||
[B<-out> I<file>]
|
||||
[B<-base64>]
|
||||
[B<-hex>]
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
I<num>
|
||||
|
||||
@@ -42,6 +43,8 @@ Perform base64 encoding on the output.
|
||||
|
||||
Show the output as a hex string.
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
=back
|
||||
|
||||
@@ -15,6 +15,7 @@ B<rehash>
|
||||
[B<-h>]
|
||||
[B<-help>]
|
||||
[B<-old>]
|
||||
[B<-compat>]
|
||||
[B<-n>]
|
||||
[B<-v>]
|
||||
[I<directory>] ...
|
||||
@@ -29,9 +30,9 @@ B<c_rehash>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
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.
|
||||
This command is generally equivalent to the external
|
||||
script B<c_rehash>,
|
||||
except for minor differences noted below.
|
||||
|
||||
B<openssl rehash> scans directories and calculates a hash value of
|
||||
each F<.pem>, F<.crt>, F<.cer>, or F<.crl>
|
||||
|
||||
@@ -22,6 +22,7 @@ B<openssl> B<req>
|
||||
[B<-modulus>]
|
||||
[B<-new>]
|
||||
[B<-newkey> I<arg>]
|
||||
[B<-pkeyopt> I<opt>:I<value>]
|
||||
[B<-nodes>]
|
||||
[B<-key> I<filename>]
|
||||
[B<-keyform> B<DER>|B<PEM>]
|
||||
|
||||
@@ -10,6 +10,8 @@ openssl-rsautl - RSA utility
|
||||
B<openssl> B<rsautl>
|
||||
[B<-help>]
|
||||
[B<-in> I<file>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-rev>]
|
||||
[B<-out> I<file>]
|
||||
[B<-inkey> I<file>]
|
||||
[B<-keyform> B<DER>|B<PEM>|B<ENGINE>]
|
||||
@@ -20,10 +22,16 @@ B<openssl> B<rsautl>
|
||||
[B<-encrypt>]
|
||||
[B<-decrypt>]
|
||||
[B<-pkcs>]
|
||||
[B<-x931>]
|
||||
[B<-oaep>]
|
||||
[B<-ssl>]
|
||||
[B<-raw>]
|
||||
[B<-pkcs>]
|
||||
[B<-ssl>]
|
||||
[B<-raw>]
|
||||
[B<-hexdump>]
|
||||
[B<-asn1parse>]
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
|
||||
=for openssl ifdef engine
|
||||
@@ -46,6 +54,15 @@ Print out a usage message.
|
||||
This specifies the input filename to read data from or standard input
|
||||
if this option is not specified.
|
||||
|
||||
=item B<-passin> I<arg>
|
||||
|
||||
The passphrase used in the output file.
|
||||
See see L<openssl(1)/Pass Phrase Options>.
|
||||
|
||||
=item B<-rev>
|
||||
|
||||
Reverse the order of the input.
|
||||
|
||||
=item B<-out> I<filename>
|
||||
|
||||
Specifies the output filename to write to or standard output by
|
||||
@@ -85,9 +102,10 @@ Encrypt the input data using an RSA public key.
|
||||
|
||||
Decrypt the input data using an RSA private key.
|
||||
|
||||
=item B<-pkcs>, B<-oaep>, B<-ssl>, B<-raw>
|
||||
=item B<-pkcs>, B<-oaep>, B<-x931> B<-ssl>, B<-raw>
|
||||
|
||||
The padding to use: PKCS#1 v1.5 (the default), PKCS#1 OAEP,
|
||||
ANSI X9.31,
|
||||
special padding used in SSL v2 backwards compatible handshakes,
|
||||
or no padding, respectively.
|
||||
For signatures, only B<-pkcs> and B<-raw> can be used.
|
||||
@@ -101,6 +119,8 @@ Hex dump the output data.
|
||||
Parse the ASN.1 output data, this is useful when combined with the
|
||||
B<-verify> option.
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
=back
|
||||
|
||||
@@ -9,7 +9,10 @@ openssl-s_client - SSL/TLS client program
|
||||
|
||||
B<openssl> B<s_client>
|
||||
[B<-help>]
|
||||
[B<-ssl_config> I<section>]
|
||||
[B<-connect> I<host:port>]
|
||||
[B<-host> I<hostname>]
|
||||
[B<-port> I<port>]
|
||||
[B<-bind> I<host:port>]
|
||||
[B<-proxy> I<host:port>]
|
||||
[B<-proxy_user> I<userid>]
|
||||
@@ -21,9 +24,15 @@ B<openssl> B<s_client>
|
||||
[B<-noservername>]
|
||||
[B<-verify> I<depth>]
|
||||
[B<-verify_return_error>]
|
||||
[B<-verify_quiet>]
|
||||
[B<-verifyCAfile> I<filename>]
|
||||
[B<-verifyCApath> I<dir>]
|
||||
[B<-verifyCAstore> I<uri>]
|
||||
[B<-cert> I<filename>]
|
||||
[B<-certform> B<DER>|B<PEM>]
|
||||
[B<-CRL> I<filename>]
|
||||
[B<-CRLform> B<DER>|B<PEM>]
|
||||
[B<-crl_download>]
|
||||
[B<-key> I<filename>]
|
||||
[B<-keyform> B<DER>|B<PEM>]
|
||||
[B<-cert_chain> I<filename>]
|
||||
@@ -36,39 +45,21 @@ B<openssl> B<s_client>
|
||||
[B<-dane_tlsa_domain> I<domain>]
|
||||
[B<-dane_tlsa_rrdata> I<rrdata>]
|
||||
[B<-dane_ee_no_namechecks>]
|
||||
[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<-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<-no_alt_chains>]
|
||||
[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<-build_chain>]
|
||||
[B<-x509_strict>]
|
||||
[B<-reconnect>]
|
||||
[B<-showcerts>]
|
||||
[B<-prexit>]
|
||||
[B<-debug>]
|
||||
[B<-trace>]
|
||||
[B<-nocommands>]
|
||||
[B<-security_debug>]
|
||||
[B<-security_debug_verbose>]
|
||||
[B<-msg>]
|
||||
[B<-timeout>]
|
||||
[B<-mtu> I<size>]
|
||||
[B<-keymatexport> I<label>]
|
||||
[B<-keymatexportlen> I<len>]
|
||||
[B<-msgfile> I<filename>]
|
||||
[B<-nbio_test>]
|
||||
[B<-state>]
|
||||
[B<-nbio>]
|
||||
@@ -83,6 +74,7 @@ B<openssl> B<s_client>
|
||||
[B<-sctp_label_bug>]
|
||||
[B<-fallback_scsv>]
|
||||
[B<-async>]
|
||||
[B<-maxfraglen> I<len>]
|
||||
[B<-max_send_frag>]
|
||||
[B<-split_send_frag>]
|
||||
[B<-max_pipelines>]
|
||||
@@ -90,6 +82,7 @@ B<openssl> B<s_client>
|
||||
[B<-bugs>]
|
||||
[B<-comp>]
|
||||
[B<-no_comp>]
|
||||
[B<-brief>]
|
||||
[B<-allow_no_dhe_kex>]
|
||||
[B<-sigalgs> I<sigalglist>]
|
||||
[B<-curves> I<curvelist>]
|
||||
@@ -97,11 +90,13 @@ B<openssl> B<s_client>
|
||||
[B<-ciphersuites> I<val>]
|
||||
[B<-serverpref>]
|
||||
[B<-starttls> I<protocol>]
|
||||
[B<-name> I<hostname>]
|
||||
[B<-xmpphost> I<hostname>]
|
||||
[B<-name> I<hostname>]
|
||||
[B<-tlsextdebug>]
|
||||
[B<-no_ticket>]
|
||||
[B<-sess_out> I<filename>]
|
||||
[B<-serverinfo> I<types>]
|
||||
[B<-sess_in> I<filename>]
|
||||
[B<-serverinfo> I<types>]
|
||||
[B<-status>]
|
||||
@@ -113,12 +108,21 @@ B<openssl> B<s_client>
|
||||
[B<-keylogfile> I<file>]
|
||||
[B<-early_data> I<file>]
|
||||
[B<-enable_pha>]
|
||||
[B<-use_srtp> I<value>]
|
||||
[B<-srpuser> I<value>]
|
||||
[B<-srppass> I<value>]
|
||||
[B<-srp_lateuser>]
|
||||
[B<-srp_moregroups>]
|
||||
[B<-srp_strength> I<number>]
|
||||
{- $OpenSSL::safe::opt_name_synopsis -}
|
||||
{- $OpenSSL::safe::opt_version_synopsis -}
|
||||
{- $OpenSSL::safe::opt_x_synopsis -}
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
{- $OpenSSL::safe::opt_s_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
[B<-ssl_client_engine> I<id>]
|
||||
{- $OpenSSL::safe::opt_v_synopsis -}
|
||||
[I<host>:I<port>]
|
||||
|
||||
=for openssl ifdef engine ssl_client_engine ct noct ctlogfile
|
||||
@@ -150,6 +154,10 @@ manual page.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-ssl_config> I<section>
|
||||
|
||||
Use the specified section of the configuration file to configure the B<SSL_CTX> object.
|
||||
|
||||
=item B<-connect> I<host>:I<port>
|
||||
|
||||
This specifies the host and optional port to connect to. It is possible to
|
||||
@@ -157,6 +165,14 @@ 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<-host> I<hostname>
|
||||
|
||||
Host to connect to; use B<-connect> instead.
|
||||
|
||||
=item B<-port> I<port>
|
||||
|
||||
Connect to the specified port; use B<-connect> instead.
|
||||
|
||||
=item B<-bind> I<host:port>
|
||||
|
||||
This specifies the host address and or port to bind as the source for the
|
||||
@@ -226,11 +242,19 @@ not to use a certificate.
|
||||
|
||||
The certificate format to use: DER or PEM. PEM is the default.
|
||||
|
||||
=item B<-CRL> I<filename>
|
||||
|
||||
CRL file to use to check the server's certificate.
|
||||
|
||||
=item B<-CRLform> B<DER>|B<PEM>
|
||||
|
||||
The CRL format; the default is B<PEM>.
|
||||
See L<openssl(1)/Format Options> for details.
|
||||
|
||||
=item B<-crl_download>
|
||||
|
||||
Download CRL from distribution points in the certificate.
|
||||
|
||||
=item B<-key> I<keyfile>
|
||||
|
||||
The private key to use. If not specified then the certificate file will
|
||||
@@ -270,6 +294,24 @@ 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<-verify_quiet>
|
||||
|
||||
Limit verify output to only errors.
|
||||
|
||||
=item B<-verifyCAfile> I<filename>
|
||||
|
||||
CA file for verifying the server's certificate, in PEM format.
|
||||
|
||||
=item B<-verifyCApath> I<dir>
|
||||
|
||||
Use the specified directory as a certificate store path to verify
|
||||
the server's CA certificate.
|
||||
|
||||
=item B<-verifyCAstore> I<uri>
|
||||
|
||||
Use the specified URI as a store URI to verify the server's certificate.
|
||||
|
||||
|
||||
=item B<-chainCApath> I<directory>
|
||||
|
||||
The directory to use for building the chain provided to the server. This
|
||||
@@ -311,7 +353,7 @@ at a positive depth or else "matched EE certificate" at depth 0.
|
||||
|
||||
Use one or more times to specify the RRDATA fields of the DANE TLSA
|
||||
RRset associated with the target service. The I<rrdata> value is
|
||||
specied in "presentation form", that is four whitespace separated
|
||||
specified 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
|
||||
whitespace is ignored in the associated data field. For example:
|
||||
@@ -347,17 +389,6 @@ records already make it possible for a remote domain to redirect client
|
||||
connections to any server of its choice, and in any case SMTP and XMPP clients
|
||||
do not execute scripts downloaded from remote servers.
|
||||
|
||||
=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>,
|
||||
B<-inhibit_map>, B<-no_alt_chains>, B<-no_check_time>, B<-partial_chain>, B<-policy>,
|
||||
B<-policy_check>, 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>, B<-x509_strict>
|
||||
|
||||
Set various certificate chain validation options. See the
|
||||
L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=item B<-reconnect>
|
||||
|
||||
Reconnects to the same server 5 times using the same session ID, this can
|
||||
@@ -388,8 +419,38 @@ Prints out the SSL session states.
|
||||
|
||||
Print extensive debugging information including a hex dump of all traffic.
|
||||
|
||||
=item B<-nocommands>
|
||||
|
||||
Do not use interactive command letters.
|
||||
|
||||
=item B<-security_debug>
|
||||
|
||||
Enable security debug messages.
|
||||
|
||||
=item B<-security_debug_verbose>
|
||||
|
||||
Output more security debug output.
|
||||
|
||||
=item B<-msg>
|
||||
|
||||
Show protocol messages.
|
||||
|
||||
=item B<-timeout>
|
||||
|
||||
Enable send/receive timeout on DTLS connections.
|
||||
|
||||
=item B<-mtu> I<size>
|
||||
|
||||
Set MTU of the link layer to the specified size.
|
||||
|
||||
=item B<-keymatexport> I<label>
|
||||
|
||||
Export keying material using the specified label.
|
||||
|
||||
=item B<-keymatexportlen> I<len>
|
||||
|
||||
Export the specified number of bytes of keying material; default is 20.
|
||||
|
||||
Show all protocol messages with hex dump.
|
||||
|
||||
=item B<-trace>
|
||||
@@ -397,7 +458,7 @@ Show all protocol messages with hex dump.
|
||||
Show verbose trace output of protocol messages. OpenSSL needs to be compiled
|
||||
with B<enable-ssl-trace> for this option to work.
|
||||
|
||||
=item B<-msgfile>
|
||||
=item B<-msgfile> I<filename>
|
||||
|
||||
File to send output of B<-msg> or B<-trace> to, default standard output.
|
||||
|
||||
@@ -471,6 +532,11 @@ 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<-maxfraglen> I<len>
|
||||
|
||||
Enable Maximum Fragment Length Negotiation; allowed values are
|
||||
C<512>, C<1024>, C<2048>, and C<4096>.
|
||||
|
||||
=item B<-max_send_frag> I<int>
|
||||
|
||||
The maximum size of data fragment to send.
|
||||
@@ -656,6 +722,30 @@ 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<-use_srtp> I<value>
|
||||
|
||||
Offer SRTP key management, where B<value> is a colon-separated profile list.
|
||||
|
||||
=item B<-srpuser> I<value>
|
||||
|
||||
Set the SRP username to the specified value.
|
||||
|
||||
=item B<-srppass> I<value>
|
||||
|
||||
Set the SRP password to the specified value.
|
||||
|
||||
=item B<-srp_lateuser>
|
||||
|
||||
SRP username for the second ClientHello message.
|
||||
|
||||
=item B<-srp_moregroups>
|
||||
|
||||
Tolerate other than the known B<g> and B<N> values.
|
||||
|
||||
=item B<-srp_strength> I<number>
|
||||
|
||||
Set the minimal acceptable length, in bits, for B<N>.
|
||||
|
||||
{- $OpenSSL::safe::opt_version_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_name_item -}
|
||||
@@ -664,10 +754,21 @@ happen whether or not a certificate has been provided via B<-cert>.
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_s_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
=item B<-ssl_client_engine> I<id>
|
||||
|
||||
Specify engine to be used for client certificate operations.
|
||||
|
||||
{- $OpenSSL::safe::opt_v_item -}
|
||||
|
||||
Verification errors are displayed, for debugging, but the command will
|
||||
proceed unless the B<-verify_return_error> option is used.
|
||||
|
||||
=item I<host>:I<port>
|
||||
|
||||
Rather than providing B<-connect>, the target hostname and optional port may
|
||||
|
||||
@@ -41,6 +41,7 @@ B<openssl> B<s_server>
|
||||
[B<-no_resume_ephemeral>]
|
||||
[B<-www>]
|
||||
[B<-WWW>]
|
||||
[B<-http_server_binmode>]
|
||||
[B<-servername>]
|
||||
[B<-servername_fatal>]
|
||||
[B<-cert2> I<infile>]
|
||||
@@ -50,6 +51,7 @@ B<openssl> B<s_server>
|
||||
[B<-id_prefix> I<val>]
|
||||
[B<-keymatexport> I<val>]
|
||||
[B<-keymatexportlen> I<+int>]
|
||||
[B<-CRLform> B<DER>|B<PEM>]
|
||||
[B<-CRL> I<infile>]
|
||||
[B<-crl_download>]
|
||||
[B<-cert_chain> I<infile>]
|
||||
@@ -87,7 +89,6 @@ B<openssl> B<s_server>
|
||||
[B<-no_comp>]
|
||||
[B<-comp>]
|
||||
[B<-no_ticket>]
|
||||
[B<-num_tickets>]
|
||||
[B<-serverpref>]
|
||||
[B<-legacy_renegotiation>]
|
||||
[B<-no_renegotiation>]
|
||||
@@ -107,36 +108,6 @@ B<openssl> B<s_server>
|
||||
[B<-dhparam> I<infile>]
|
||||
[B<-record_padding> I<val>]
|
||||
[B<-debug_broken_protocol>]
|
||||
[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>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
[B<-policy_check>]
|
||||
[B<-explicit_policy>]
|
||||
[B<-inhibit_any>]
|
||||
[B<-inhibit_map>]
|
||||
[B<-x509_strict>]
|
||||
[B<-extended_crl>]
|
||||
[B<-use_deltas>]
|
||||
[B<-policy_print>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-trusted_first>]
|
||||
[B<-suiteB_128_only>]
|
||||
[B<-suiteB_128>]
|
||||
[B<-suiteB_192>]
|
||||
[B<-partial_chain>]
|
||||
[B<-no_alt_chains>]
|
||||
[B<-no_check_time>]
|
||||
[B<-allow_proxy_certs>]
|
||||
[B<-nbio>]
|
||||
[B<-psk_identity> I<val>]
|
||||
[B<-psk_hint> I<val>]
|
||||
@@ -154,13 +125,17 @@ B<openssl> B<s_server>
|
||||
[B<-use_srtp> I<val>]
|
||||
[B<-alpn> I<val>]
|
||||
[B<-keylogfile> I<outfile>]
|
||||
[B<-recv_max_early_data> I<int>]
|
||||
[B<-max_early_data> I<int>]
|
||||
[B<-early_data>]
|
||||
[B<-stateless>]
|
||||
[B<-anti_replay>]
|
||||
[B<-no_anti_replay>]
|
||||
[B<-http_server_binmode>]
|
||||
[B<-num_tickets>]
|
||||
{- $OpenSSL::safe::opt_name_synopsis -}
|
||||
{- $OpenSSL::safe::opt_version_synopsis -}
|
||||
{- $OpenSSL::safe::opt_v_synopsis -}
|
||||
{- $OpenSSL::safe::opt_s_synopsis -}
|
||||
{- $OpenSSL::safe::opt_x_synopsis -}
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
@@ -397,6 +372,11 @@ In addition, the special URL C</stats> will return status
|
||||
information like the B<-www> option.
|
||||
Neither of these options can be used in conjunction with B<-early_data>.
|
||||
|
||||
=item B<-http_server_binmode>
|
||||
|
||||
When acting as web-server (using option B<-WWW> or B<-HTTP>) open files requested
|
||||
by the client in binary mode.
|
||||
|
||||
=item B<-id_prefix> I<val>
|
||||
|
||||
Generate SSL/TLS session IDs prefixed by I<val>. This is mostly useful
|
||||
@@ -565,23 +545,6 @@ load the parameters from the server certificate file.
|
||||
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>,
|
||||
B<-inhibit_map>, B<-no_alt_chains>, B<-no_check_time>, B<-partial_chain>, B<-policy>,
|
||||
B<-policy_check>, 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>, B<-x509_strict>
|
||||
|
||||
Set different peer certificate verification options.
|
||||
See the L<openssl-verify(1)> manual page for details.
|
||||
|
||||
=item B<-crl_check>, B<-crl_check_all>
|
||||
|
||||
Check the peer certificate has not been revoked by its CA.
|
||||
The CRL(s) are appended to the certificate file. With the B<-crl_check_all>
|
||||
option all CRLs of all CAs in the chain are checked.
|
||||
|
||||
=item B<-nbio>
|
||||
|
||||
Turns on non blocking I/O.
|
||||
@@ -661,11 +624,20 @@ and any incoming early data (when used in conjunction with the B<-early_data>
|
||||
flag). The default value is approximately 16k. The argument must be an integer
|
||||
greater than or equal to 0.
|
||||
|
||||
=item B<-recv_max_early_data> I<int>
|
||||
|
||||
Specify the hard limit on the maximum number of early data bytes that will
|
||||
be accepted.
|
||||
|
||||
=item B<-early_data>
|
||||
|
||||
Accept early data where possible. Cannot be used in conjunction with B<-www>,
|
||||
B<-WWW>, B<-HTTP> or B<-rev>.
|
||||
|
||||
=item B<-stateless>
|
||||
|
||||
Require TLSv1.3 cookies.
|
||||
|
||||
=item B<-anti_replay>, B<-no_anti_replay>
|
||||
|
||||
Switches replay protection on or off, respectively. Replay protection is on by
|
||||
@@ -675,15 +647,12 @@ has been negotiated, and early data is enabled on the server. A full handshake
|
||||
is forced if a session ticket is used a second or subsequent time. Any early
|
||||
data that was sent will be rejected.
|
||||
|
||||
=item B<-http_server_binmode>
|
||||
|
||||
When acting as web-server (using option B<-WWW> or B<-HTTP>) open files requested
|
||||
by the client in binary mode.
|
||||
|
||||
{- $OpenSSL::safe::opt_name_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_version_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_s_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_x_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
@@ -692,6 +661,12 @@ by the client in binary mode.
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_v_item -}
|
||||
|
||||
If the server requests a client certificate, then
|
||||
verification errors are displayed, for debugging, but the command will
|
||||
proceed unless the B<-verify_return_error> option is used.
|
||||
|
||||
=back
|
||||
|
||||
=head1 CONNECTED COMMANDS
|
||||
|
||||
@@ -17,11 +17,16 @@ B<openssl> B<s_time>
|
||||
[B<-new>]
|
||||
[B<-verify> I<depth>]
|
||||
[B<-time> I<seconds>]
|
||||
{- $OpenSSL::safe::opt_versiontls_synopsis -}
|
||||
[B<-ssl3>]
|
||||
[B<-tls1>]
|
||||
[B<-tls1_1>]
|
||||
[B<-tls1_2>]
|
||||
[B<-tls1_3>]
|
||||
[B<-bugs>]
|
||||
[B<-cipher> I<cipherlist>]
|
||||
[B<-ciphersuites> I<val>]
|
||||
{- $OpenSSL::safe::opt_name_synopsis -}
|
||||
[B<-cafile> I<file>]
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
|
||||
=for openssl ifdef ssl3 tls1 tls1_1 tls1_2 tls1_3
|
||||
@@ -72,12 +77,6 @@ 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<-CApath> I<directory>
|
||||
|
||||
The directory to use for server certificate verification. This directory
|
||||
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<-new>
|
||||
|
||||
Performs the timing test using a new session ID for each connection.
|
||||
@@ -123,7 +122,13 @@ can establish.
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_versiontls_item -}
|
||||
=item B<-cafile> I<file>
|
||||
|
||||
This is an obsolete synonym for B<-CAfile>.
|
||||
|
||||
=item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>
|
||||
|
||||
See L<openssl(1)/TLS Version Options>.
|
||||
|
||||
=back
|
||||
|
||||
@@ -168,6 +173,10 @@ be able to measure the performance of all protocols with all servers.
|
||||
The B<-verify> option should really exit if the server verification
|
||||
fails.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The B<-cafile> option was deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<openssl(1)>,
|
||||
|
||||
@@ -13,6 +13,7 @@ B<openssl> B<sess_id>
|
||||
[B<-in> I<filename>]
|
||||
[B<-out> I<filename>]
|
||||
[B<-text>]
|
||||
[B<-cert>]
|
||||
[B<-noout>]
|
||||
[B<-context> I<ID>]
|
||||
|
||||
@@ -90,7 +91,7 @@ Typical output:
|
||||
Timeout : 300 (sec)
|
||||
Verify return code 0 (ok)
|
||||
|
||||
Theses are described below in more detail.
|
||||
These are described below in more detail.
|
||||
|
||||
=over 4
|
||||
|
||||
|
||||
@@ -19,35 +19,16 @@ B<openssl> B<smime>
|
||||
[B<-crlfeol>]
|
||||
[B<-I<cipher>>]
|
||||
[B<-in> I<file>]
|
||||
[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<-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<-no_alt_chains>]
|
||||
[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>]
|
||||
[B<-certfile> I<file>]
|
||||
[B<-signer> I<file>]
|
||||
[B<-nointern>]
|
||||
[B<-noverify>]
|
||||
[B<-nochain>]
|
||||
[B<-nosigs>]
|
||||
[B<-nocerts>]
|
||||
[B<-noattr>]
|
||||
[B<-nodetach>]
|
||||
[B<-nosmimecap>]
|
||||
[B<-recip> I< file>]
|
||||
[B<-inform> B<DER>|B<PEM>|B<SMIME>]
|
||||
[B<-outform> B<DER>|B<PEM>|B<SMIME>]
|
||||
@@ -65,7 +46,9 @@ B<openssl> B<smime>
|
||||
[B<-stream>]
|
||||
[B<-md> I<digest>]
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
{- $OpenSSL::safe::opt_v_synopsis -}
|
||||
I<cert.pem> ...
|
||||
|
||||
=for openssl ifdef engine
|
||||
@@ -204,7 +187,7 @@ Do not verify the signers certificate of a signed message.
|
||||
|
||||
=item B<-nochain>
|
||||
|
||||
Do not do chain verification of signers certificates: that is don't
|
||||
Do not do chain verification of signers certificates; that is, do not
|
||||
use the certificates in the signed message as untrusted CAs.
|
||||
|
||||
=item B<-nosigs>
|
||||
@@ -224,6 +207,17 @@ Normally when a message is signed a set of attributes are included which
|
||||
include the signing time and supported symmetric algorithms. With this
|
||||
option they are not included.
|
||||
|
||||
=item B<-nodetach>
|
||||
|
||||
When signing a message use opaque signing. This form is more resistant
|
||||
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<-nosmimecap>
|
||||
|
||||
When signing a message, do not include the B<SMIMECapabilities> attribute.
|
||||
|
||||
=item B<-binary>
|
||||
|
||||
Normally the input message is converted to "canonical" format which is
|
||||
@@ -236,13 +230,6 @@ is useful when handling binary data which may not be in MIME format.
|
||||
Normally the output file uses a single B<LF> as end of line. When this
|
||||
option is present B<CRLF> is used instead.
|
||||
|
||||
=item B<-nodetach>
|
||||
|
||||
When signing a message use opaque signing: this form is more resistant
|
||||
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> I<file>
|
||||
|
||||
Allows additional certificates to be specified. When signing these will
|
||||
@@ -256,6 +243,14 @@ 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<-nocerts>
|
||||
|
||||
Don't include signers certificate when signing.
|
||||
|
||||
=item B<-noattr>
|
||||
|
||||
Don't include any signed attributes when signing.
|
||||
|
||||
=item B<-recip> I<file>
|
||||
|
||||
The recipients certificate when decrypting a message. This certificate
|
||||
@@ -283,19 +278,14 @@ portion of a message so they may be included manually. If signing
|
||||
then many S/MIME mail clients check the signers certificate's email
|
||||
address matches that specified in the From: address.
|
||||
|
||||
=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>,
|
||||
B<-inhibit_map>, B<-no_alt_chains>, B<-partial_chain>, B<-policy>,
|
||||
B<-policy_check>, 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>, B<-x509_strict>
|
||||
{- $OpenSSL::safe::opt_v_item -}
|
||||
|
||||
Set various options of certificate chain verification. See
|
||||
L<openssl-verify(1)> manual page for details.
|
||||
Any verification errors cause the command to exit.
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
=item I<cert.pem> ...
|
||||
|
||||
@@ -13,15 +13,21 @@ B<openssl speed>
|
||||
[B<-evp> I<algo>]
|
||||
[B<-hmac> I<algo>]
|
||||
[B<-cmac> I<algo>]
|
||||
[B<-mb>]
|
||||
[B<-aead>]
|
||||
[B<-multi> I<num>]
|
||||
[B<-async_jobs> I<num>]
|
||||
[B<-misalign> I<num>]
|
||||
[B<-decrypt>]
|
||||
[B<-primes> I<num>]
|
||||
[B<-seconds> I<num>]
|
||||
[B<-bytes> I<num>]
|
||||
[B<-mr>]
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
[I<algorithm> ...]
|
||||
|
||||
=for openssl ifdef cmac multi async_jobs engine
|
||||
=for openssl ifdef hmac cmac multi async_jobs engine
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -51,6 +57,18 @@ 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<-multi> I<num>
|
||||
|
||||
Run multiple operations in parallel.
|
||||
|
||||
=item B<-async_jobs> I<num>
|
||||
|
||||
Enable async mode and start specified number of jobs.
|
||||
|
||||
=item B<-misalign> I<num>
|
||||
|
||||
Misalign the buffers by the specified number of bytes.
|
||||
|
||||
=item B<-hmac> I<digest>
|
||||
|
||||
Time the HMAC algorithm using the specified message digest.
|
||||
@@ -77,6 +95,10 @@ Run benchmarks for I<num> seconds.
|
||||
|
||||
Run benchmarks on I<num>-byte buffers. Affects ciphers, digests and the CSPRNG.
|
||||
|
||||
=item B<-mr>
|
||||
|
||||
Produce the summary in a mechanical, machine-readable, format.
|
||||
|
||||
{- $OpenSSL::safe::opt_r_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
@@ -21,6 +21,7 @@ B<openssl srp>
|
||||
[B<-userinfo> I<text>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-passout> I<arg>]
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
[I<user> ...]
|
||||
|
||||
@@ -71,6 +72,8 @@ 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>.
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_r_synopsis -}
|
||||
|
||||
=back
|
||||
|
||||
+25
-54
@@ -7,6 +7,9 @@ openssl-ts - Time Stamping Authority tool (client/server)
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<openssl> B<ts>
|
||||
B<-help>
|
||||
|
||||
B<openssl> B<ts>
|
||||
B<-query>
|
||||
[B<-config> I<configfile>]
|
||||
@@ -33,6 +36,7 @@ B<-reply>
|
||||
[B<-chain> I<certs_file.pem>]
|
||||
[B<-tspolicy> I<object_id>]
|
||||
[B<-in> I<response.tsr>]
|
||||
[B<-untrusted> I<file>]
|
||||
[B<-token_in>]
|
||||
[B<-out> I<response.tsr>]
|
||||
[B<-token_out>]
|
||||
@@ -46,42 +50,10 @@ B<-verify>
|
||||
[B<-queryfile> I<request.tsq>]
|
||||
[B<-in> I<response.tsr>]
|
||||
[B<-token_in>]
|
||||
[B<-CApath> I<trusted_cert_path>]
|
||||
[B<-CAfile> I<trusted_certs.pem>]
|
||||
[B<-CAstore> I<trusted_certs_uri>]
|
||||
[B<-untrusted> I<cert_file.pem>]
|
||||
[I<verify options>]
|
||||
|
||||
I<verify options:>
|
||||
[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>]
|
||||
[B<-CAfile> I<file>]
|
||||
[B<-CApath> I<dir>]
|
||||
[B<-CAstore> I<uri>]
|
||||
{- $OpenSSL::safe::opt_v_synopsis -}
|
||||
|
||||
=for openssl ifdef engine
|
||||
|
||||
@@ -128,6 +100,14 @@ requests either by ftp or e-mail.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-help>
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Timestamp Request generation
|
||||
|
||||
The B<-query> switch can be used for creating and printing a timestamp
|
||||
@@ -344,12 +324,6 @@ This flag can be used together with the B<-in> option and indicates
|
||||
that the input is a DER encoded timestamp token (ContentInfo) instead
|
||||
of a timestamp response (TimeStampResp). (Optional)
|
||||
|
||||
=item B<-CAfile> I<file>, B<-CApath> I<dir>, B<-CAstore> I<uri>
|
||||
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
At least one of B<-CApath>, B<-CAfile> or B<-CAstore> must be specified.
|
||||
|
||||
=item B<-untrusted> I<cert_file.pem>
|
||||
|
||||
Set of additional untrusted certificates in PEM format which may be
|
||||
@@ -358,17 +332,14 @@ certificate. This file must contain the TSA signing certificate and
|
||||
all intermediate CA certificates unless the response includes them.
|
||||
(Optional)
|
||||
|
||||
=item I<verify options>
|
||||
=item B<-CAfile> I<file>, B<-CApath> I<dir>, B<-CAstore> I<uri>
|
||||
|
||||
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>,
|
||||
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<openssl-verify(1)>.
|
||||
See L<openssl(1)/Trusted Certificate Options> for details.
|
||||
At least one of B<-CApath>, B<-CAfile> or B<-CAstore> must be specified.
|
||||
|
||||
{- $OpenSSL::safe::opt_v_item -}
|
||||
|
||||
Any verification errors cause the command to exit.
|
||||
|
||||
=back
|
||||
|
||||
@@ -608,7 +579,7 @@ You could also look at the 'test' directory for more examples.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
=for openssl foreign manuals: procmail(1), perl(1)
|
||||
=for openssl foreign manual procmail(1) perl(1)
|
||||
|
||||
=over 2
|
||||
|
||||
@@ -653,7 +624,7 @@ retained mainly for compatibility reasons.
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<openssl(1)>,
|
||||
L<openssl-tsget(1)>,
|
||||
L<tsget(1)>,
|
||||
L<openssl-req(1)>,
|
||||
L<openssl-x509(1)>,
|
||||
L<openssl-ca(1)>,
|
||||
|
||||
+33
-631
@@ -9,46 +9,18 @@ openssl-verify - Utility to verify certificates
|
||||
|
||||
B<openssl> B<verify>
|
||||
[B<-help>]
|
||||
[B<-allow_proxy_certs>]
|
||||
[B<-attime> I<timestamp>]
|
||||
[B<-check_ss_sig>]
|
||||
[B<-CRLfile> I<file>]
|
||||
[B<-crl_download>]
|
||||
[B<-crl_check>]
|
||||
[B<-crl_check_all>]
|
||||
[B<-explicit_policy>]
|
||||
[B<-extended_crl>]
|
||||
[B<-ignore_critical>]
|
||||
[B<-inhibit_any>]
|
||||
[B<-inhibit_map>]
|
||||
[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<-no_alt_chains>]
|
||||
[B<-untrusted> I<file>]
|
||||
[B<-trusted> I<file>]
|
||||
[B<-use_deltas>]
|
||||
[B<-verbose>]
|
||||
[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> I<string>]
|
||||
[B<-sm2-hex-id> I<hex-string>]
|
||||
[B<-sm2-id> I<hexstring>]
|
||||
[B<-sm2-hex-id> I<hexstring>]
|
||||
[B<-verbose>]
|
||||
[B<-trusted> I<file>]
|
||||
[B<-untrusted> I<file>]
|
||||
{- $OpenSSL::safe::opt_name_synopsis -}
|
||||
{- $OpenSSL::safe::opt_trust_synopsis -}
|
||||
{- $OpenSSL::safe::opt_engine_synopsis -}
|
||||
{- $OpenSSL::safe::opt_v_synopsis -}
|
||||
[B<-->]
|
||||
[I<certificate> ...]
|
||||
|
||||
@@ -66,20 +38,9 @@ This command verifies certificate chains.
|
||||
|
||||
Print out a usage message.
|
||||
|
||||
=item B<-allow_proxy_certs>
|
||||
=item B<-CAfile> I<file>, B<-no-CAfile>, B<-CApath> I<dir>, B<-no-CApath>
|
||||
|
||||
Allow the verification of proxy certificates.
|
||||
|
||||
=item B<-attime> I<timestamp>
|
||||
|
||||
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>
|
||||
|
||||
Verify the signature on the self-signed root CA. This is disabled by default
|
||||
because it doesn't add any security.
|
||||
See L<openssl(1)/Trusted Certificate Options> for more information.
|
||||
|
||||
=item B<-CRLfile> I<file>
|
||||
|
||||
@@ -91,285 +52,61 @@ I<file>s.
|
||||
|
||||
Attempt to download CRL information for this certificate.
|
||||
|
||||
=item B<-crl_check>
|
||||
|
||||
Checks end entity certificate validity by attempting to look up a valid CRL.
|
||||
If a valid CRL cannot be found an error occurs.
|
||||
|
||||
=item B<-crl_check_all>
|
||||
|
||||
Checks the validity of B<all> certificates in the chain by attempting
|
||||
to look up valid CRLs.
|
||||
|
||||
=item B<-explicit_policy>
|
||||
|
||||
Set policy variable require-explicit-policy (see RFC5280).
|
||||
|
||||
=item B<-extended_crl>
|
||||
|
||||
Enable extended CRL features such as indirect CRLs and alternate CRL
|
||||
signing keys.
|
||||
|
||||
=item B<-ignore_critical>
|
||||
|
||||
Normally if an unhandled critical extension is present which is not
|
||||
supported by OpenSSL the certificate is rejected (as required by RFC5280).
|
||||
If this option is set critical extensions are ignored.
|
||||
|
||||
=item B<-inhibit_any>
|
||||
|
||||
Set policy variable inhibit-any-policy (see RFC5280).
|
||||
|
||||
=item B<-inhibit_map>
|
||||
|
||||
Set policy variable inhibit-policy-mapping (see RFC5280).
|
||||
|
||||
=item B<-no_check_time>
|
||||
|
||||
This option suppresses checking the validity period of certificates and CRLs
|
||||
against the current time. If option B<-attime> is used to specify
|
||||
a verification time, the check is not suppressed.
|
||||
|
||||
=item B<-partial_chain>
|
||||
|
||||
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> I<arg>
|
||||
|
||||
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>
|
||||
|
||||
Enables certificate policy processing.
|
||||
|
||||
=item B<-policy_print>
|
||||
|
||||
Print out diagnostics related to policy processing.
|
||||
|
||||
=item B<-purpose> I<purpose>
|
||||
|
||||
The intended use for the certificate. If this option is not specified,
|
||||
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 L</VERIFY OPERATION> section for more
|
||||
information.
|
||||
|
||||
=item B<-suiteB_128_only>, B<-suiteB_128>, B<-suiteB_192>
|
||||
|
||||
Enable the Suite B mode operation at 128 bit Level of Security, 128 bit or
|
||||
192 bit, or only 192 bit Level of Security respectively.
|
||||
See RFC6460 for details. In particular the supported signature algorithms are
|
||||
reduced to support only ECDSA and SHA256 or SHA384 and only the elliptic curves
|
||||
P-256 and P-384.
|
||||
|
||||
=item B<-trusted_first>
|
||||
|
||||
When constructing the certificate chain, use the trusted certificates specified
|
||||
via B<-CAfile>, B<-CApath>, B<-CAstore> or B<-trusted> before any certificates
|
||||
specified via B<-untrusted>.
|
||||
This can be useful in environments with Bridge or Cross-Certified CAs.
|
||||
As of OpenSSL 1.1.0 this option is on by default and cannot be disabled.
|
||||
|
||||
=item B<-no_alt_chains>
|
||||
|
||||
By default, unless B<-trusted_first> is specified, when building a certificate
|
||||
chain, if the first certificate chain found is not trusted, then OpenSSL will
|
||||
attempt to replace untrusted issuer certificates with certificates from the
|
||||
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> I<file>
|
||||
|
||||
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 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 I<file>s.
|
||||
|
||||
=item B<-trusted> I<file>
|
||||
|
||||
A I<file> of trusted certificates, which must be self-signed, unless the
|
||||
B<-partial_chain> option is specified.
|
||||
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 I<file>.
|
||||
This option can be specified more than once to include trusted certificates
|
||||
from multiple I<file>s.
|
||||
This option implies the B<-no-CAfile>, B<-no-CApath> and B<-no-CAstore> options.
|
||||
This option cannot be used in combination with any of the B<-CAfile>,
|
||||
B<-CApath> or B<-CAstore> options.
|
||||
|
||||
=item B<-use_deltas>
|
||||
|
||||
Enable support for delta CRLs.
|
||||
|
||||
=item B<-verbose>
|
||||
|
||||
Print extra information about the operations being performed.
|
||||
|
||||
=item B<-auth_level> I<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 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.
|
||||
See L<SSL_CTX_set_security_level(3)> for the definitions of the available
|
||||
levels.
|
||||
The default security level is -1, or "not set".
|
||||
At security level 0 or lower all algorithms are acceptable.
|
||||
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> I<num>
|
||||
|
||||
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> I<email>
|
||||
|
||||
Verify if I<email> matches the email address in Subject Alternative Name or
|
||||
the email in the subject Distinguished Name.
|
||||
|
||||
=item B<-verify_hostname> I<hostname>
|
||||
|
||||
Verify if I<hostname> matches DNS name in Subject Alternative Name or
|
||||
Common Name in the subject certificate.
|
||||
|
||||
=item B<-verify_ip> I<ip>
|
||||
|
||||
Verify if I<ip> matches the IP address in Subject Alternative Name of
|
||||
the subject certificate.
|
||||
|
||||
=item B<-verify_name> I<name>
|
||||
|
||||
Use default verification policies like trust model and required certificate
|
||||
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 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
|
||||
and S/MIME.
|
||||
As of OpenSSL 1.1.0, the trust model is inferred from the purpose when not
|
||||
specified, so the B<-verify_name> options are functionally equivalent to the
|
||||
corresponding B<-purpose> settings.
|
||||
|
||||
=item B<-x509_strict>
|
||||
|
||||
For strict X.509 compliance, disable non-compliant workarounds for broken
|
||||
certificates.
|
||||
|
||||
=item B<-show_chain>
|
||||
|
||||
Display information about the certificate chain that has been built (if
|
||||
successful). Certificates in the chain that came from the untrusted list will be
|
||||
flagged as "untrusted".
|
||||
|
||||
=item B<-sm2-id>
|
||||
=item B<-sm2-id> I<hexstring>
|
||||
|
||||
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<hexstring>
|
||||
|
||||
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.
|
||||
|
||||
{- $OpenSSL::safe::opt_name_item -}
|
||||
=item B<-verbose>
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
Print extra information about the operations being performed.
|
||||
|
||||
=item B<-trusted> I<file>
|
||||
|
||||
A file of trusted certificates.
|
||||
|
||||
=item B<-untrusted> I<file>
|
||||
|
||||
A file of untrusted certificates.
|
||||
|
||||
{- $OpenSSL::safe::opt_name_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_engine_item -}
|
||||
To load certificates or CRLs that require engine support, specify the
|
||||
B<-engine> option before any of the
|
||||
B<-trusted>, B<-untrusted> or B<-CRLfile> options.
|
||||
|
||||
{- $OpenSSL::safe::opt_trust_item -}
|
||||
|
||||
{- $OpenSSL::safe::opt_v_item -}
|
||||
|
||||
=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 I<certificate> ...
|
||||
|
||||
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.
|
||||
If a certificate chain has multiple problems, this program tries to
|
||||
display all of them.
|
||||
|
||||
=back
|
||||
|
||||
=head1 VERIFY OPERATION
|
||||
|
||||
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 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.
|
||||
|
||||
Firstly a certificate chain is built up starting from the supplied certificate
|
||||
and ending in the root CA.
|
||||
It is an error if the whole chain cannot be built up.
|
||||
The chain is built up by looking up the issuers certificate of the current
|
||||
certificate.
|
||||
If a certificate is found which is its own issuer it is assumed to be the root
|
||||
CA.
|
||||
|
||||
The process of 'looking up the issuers certificate' itself involves a number of
|
||||
steps.
|
||||
After all certificates whose subject name matches the issuer name of the current
|
||||
certificate are subject to further tests.
|
||||
The relevant authority key identifier components of the current certificate (if
|
||||
present) must match the subject key identifier (if present) and issuer and
|
||||
serial number of the candidate issuer, in addition the keyUsage extension of
|
||||
the candidate issuer (if present) must permit certificate signing.
|
||||
|
||||
The lookup first looks in the list of untrusted certificates and if no match
|
||||
is found the remaining lookups are from the trusted certificates. The root CA
|
||||
is always looked up in the trusted certificate list: if the certificate to
|
||||
verify is a root certificate then an exact match must be found in the trusted
|
||||
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 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.
|
||||
|
||||
If all operations complete successfully then certificate is considered valid. If
|
||||
any operation fails then the certificate is not valid.
|
||||
|
||||
=head1 DIAGNOSTICS
|
||||
|
||||
When a verify operation fails the output messages can be somewhat cryptic. The
|
||||
@@ -385,344 +122,12 @@ problem was detected starting with zero for the certificate being verified itsel
|
||||
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
|
||||
A list of the error codes and messages can be found in
|
||||
L<X509_STORE_CTX_get_error(3)>; the full list is 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".
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<X509_V_OK>
|
||||
|
||||
The operation was successful.
|
||||
|
||||
=item B<X509_V_ERR_UNSPECIFIED>
|
||||
|
||||
Unspecified error; should not happen.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT>
|
||||
|
||||
The issuer certificate of a looked up certificate could not be found. This
|
||||
normally means the list of trusted certificates is not complete.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_CRL>
|
||||
|
||||
The CRL of a certificate could not be found.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE>
|
||||
|
||||
The certificate signature could not be decrypted. This means that the
|
||||
actual signature value could not be determined rather than it not matching
|
||||
the expected value, this is only meaningful for RSA keys.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE>
|
||||
|
||||
The CRL signature could not be decrypted: this means that the actual
|
||||
signature value could not be determined rather than it not matching the
|
||||
expected value. Unused.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY>
|
||||
|
||||
The public key in the certificate SubjectPublicKeyInfo could not be read.
|
||||
|
||||
=item B<X509_V_ERR_CERT_SIGNATURE_FAILURE>
|
||||
|
||||
The signature of the certificate is invalid.
|
||||
|
||||
=item B<X509_V_ERR_CRL_SIGNATURE_FAILURE>
|
||||
|
||||
The signature of the certificate is invalid.
|
||||
|
||||
=item B<X509_V_ERR_CERT_NOT_YET_VALID>
|
||||
|
||||
The certificate is not yet valid: the notBefore date is after the
|
||||
current time.
|
||||
|
||||
=item B<X509_V_ERR_CERT_HAS_EXPIRED>
|
||||
|
||||
The certificate has expired: that is the notAfter date is before the
|
||||
current time.
|
||||
|
||||
=item B<X509_V_ERR_CRL_NOT_YET_VALID>
|
||||
|
||||
The CRL is not yet valid.
|
||||
|
||||
=item B<X509_V_ERR_CRL_HAS_EXPIRED>
|
||||
|
||||
The CRL has expired.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD>
|
||||
|
||||
The certificate notBefore field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD>
|
||||
|
||||
The certificate notAfter field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD>
|
||||
|
||||
The CRL lastUpdate field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD>
|
||||
|
||||
The CRL nextUpdate field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_OUT_OF_MEM>
|
||||
|
||||
An error occurred trying to allocate memory. This should never happen.
|
||||
|
||||
=item B<X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT>
|
||||
|
||||
The passed certificate is self-signed and the same certificate cannot
|
||||
be found in the list of trusted certificates.
|
||||
|
||||
=item B<X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN>
|
||||
|
||||
The certificate chain could be built up using the untrusted certificates
|
||||
but the root could not be found locally.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY>
|
||||
|
||||
The issuer certificate could not be found: this occurs if the issuer
|
||||
certificate of an untrusted certificate cannot be found.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE>
|
||||
|
||||
No signatures could be verified because the chain contains only one
|
||||
certificate and it is not self signed.
|
||||
|
||||
=item B<X509_V_ERR_CERT_CHAIN_TOO_LONG>
|
||||
|
||||
The certificate chain length is greater than the supplied maximum
|
||||
depth. Unused.
|
||||
|
||||
=item B<X509_V_ERR_CERT_REVOKED>
|
||||
|
||||
The certificate has been revoked.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_CA>
|
||||
|
||||
A CA certificate is invalid. Either it is not a CA or its extensions
|
||||
are not consistent with the supplied purpose.
|
||||
|
||||
=item B<X509_V_ERR_PATH_LENGTH_EXCEEDED>
|
||||
|
||||
The basicConstraints pathlength parameter has been exceeded.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_PURPOSE>
|
||||
|
||||
The supplied certificate cannot be used for the specified purpose.
|
||||
|
||||
=item B<X509_V_ERR_CERT_UNTRUSTED>
|
||||
|
||||
The root CA is not marked as trusted for the specified purpose.
|
||||
|
||||
=item B<X509_V_ERR_CERT_REJECTED>
|
||||
|
||||
The root CA is marked to reject the specified purpose.
|
||||
|
||||
=item B<X509_V_ERR_SUBJECT_ISSUER_MISMATCH>
|
||||
|
||||
Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
|
||||
B<-issuer_checks> option.
|
||||
|
||||
=item B<X509_V_ERR_AKID_SKID_MISMATCH>
|
||||
|
||||
Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
|
||||
B<-issuer_checks> option.
|
||||
|
||||
=item B<X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH>
|
||||
|
||||
Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
|
||||
B<-issuer_checks> option.
|
||||
|
||||
=item B<X509_V_ERR_KEYUSAGE_NO_CERTSIGN>
|
||||
|
||||
Not used as of OpenSSL 1.1.0 as a result of the deprecation of the
|
||||
B<-issuer_checks> option.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER>
|
||||
|
||||
Unable to get CRL issuer certificate.
|
||||
|
||||
=item B<X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION>
|
||||
|
||||
Unhandled critical extension.
|
||||
|
||||
=item B<X509_V_ERR_KEYUSAGE_NO_CRL_SIGN>
|
||||
|
||||
Key usage does not include CRL signing.
|
||||
|
||||
=item B<X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION>
|
||||
|
||||
Unhandled critical CRL extension.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_NON_CA>
|
||||
|
||||
Invalid non-CA certificate has CA markings.
|
||||
|
||||
=item B<X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED>
|
||||
|
||||
Proxy path length constraint exceeded.
|
||||
|
||||
=item B<X509_V_ERR_PROXY_SUBJECT_INVALID>
|
||||
|
||||
Proxy certificate subject is invalid. It MUST be the same as the issuer
|
||||
with a single CN component added.
|
||||
|
||||
=item B<X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE>
|
||||
|
||||
Key usage does not include digital signature.
|
||||
|
||||
=item B<X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED>
|
||||
|
||||
Proxy certificates not allowed, please use B<-allow_proxy_certs>.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_EXTENSION>
|
||||
|
||||
Invalid or inconsistent certificate extension.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_POLICY_EXTENSION>
|
||||
|
||||
Invalid or inconsistent certificate policy extension.
|
||||
|
||||
=item B<X509_V_ERR_NO_EXPLICIT_POLICY>
|
||||
|
||||
No explicit policy.
|
||||
|
||||
=item B<X509_V_ERR_DIFFERENT_CRL_SCOPE>
|
||||
|
||||
Different CRL scope.
|
||||
|
||||
=item B<X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE>
|
||||
|
||||
Unsupported extension feature.
|
||||
|
||||
=item B<X509_V_ERR_UNNESTED_RESOURCE>
|
||||
|
||||
RFC 3779 resource not subset of parent's resources.
|
||||
|
||||
=item B<X509_V_ERR_PERMITTED_VIOLATION>
|
||||
|
||||
Permitted subtree violation.
|
||||
|
||||
=item B<X509_V_ERR_EXCLUDED_VIOLATION>
|
||||
|
||||
Excluded subtree violation.
|
||||
|
||||
=item B<X509_V_ERR_SUBTREE_MINMAX>
|
||||
|
||||
Name constraints minimum and maximum not supported.
|
||||
|
||||
=item B<X509_V_ERR_APPLICATION_VERIFICATION>
|
||||
|
||||
Application verification failure. Unused.
|
||||
|
||||
=item B<X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE>
|
||||
|
||||
Unsupported name constraint type.
|
||||
|
||||
=item B<X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX>
|
||||
|
||||
Unsupported or invalid name constraint syntax.
|
||||
|
||||
=item B<X509_V_ERR_UNSUPPORTED_NAME_SYNTAX>
|
||||
|
||||
Unsupported or invalid name syntax.
|
||||
|
||||
=item B<X509_V_ERR_CRL_PATH_VALIDATION_ERROR>
|
||||
|
||||
CRL path validation error.
|
||||
|
||||
=item B<X509_V_ERR_PATH_LOOP>
|
||||
|
||||
Path loop.
|
||||
|
||||
=item B<X509_V_ERR_SUITE_B_INVALID_VERSION>
|
||||
|
||||
Suite B: certificate version invalid.
|
||||
|
||||
=item B<X509_V_ERR_SUITE_B_INVALID_ALGORITHM>
|
||||
|
||||
Suite B: invalid public key algorithm.
|
||||
|
||||
=item B<X509_V_ERR_SUITE_B_INVALID_CURVE>
|
||||
|
||||
Suite B: invalid ECC curve.
|
||||
|
||||
=item B<X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM>
|
||||
|
||||
Suite B: invalid signature algorithm.
|
||||
|
||||
=item B<X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED>
|
||||
|
||||
Suite B: curve not allowed for this LOS.
|
||||
|
||||
=item B<X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256>
|
||||
|
||||
Suite B: cannot sign P-384 with P-256.
|
||||
|
||||
=item B<X509_V_ERR_HOSTNAME_MISMATCH>
|
||||
|
||||
Hostname mismatch.
|
||||
|
||||
=item B<X509_V_ERR_EMAIL_MISMATCH>
|
||||
|
||||
Email address mismatch.
|
||||
|
||||
=item B<X509_V_ERR_IP_ADDRESS_MISMATCH>
|
||||
|
||||
IP address mismatch.
|
||||
|
||||
=item B<X509_V_ERR_DANE_NO_MATCH>
|
||||
|
||||
DANE TLSA authentication is enabled, but no TLSA records matched the
|
||||
certificate chain.
|
||||
This error is only possible in L<openssl-s_client(1)>.
|
||||
|
||||
=item B<X509_V_ERR_EE_KEY_TOO_SMALL>
|
||||
|
||||
EE certificate key too weak.
|
||||
|
||||
=item B<X509_ERR_CA_KEY_TOO_SMALL>
|
||||
|
||||
CA certificate key too weak.
|
||||
|
||||
=item B<X509_ERR_CA_MD_TOO_WEAK>
|
||||
|
||||
CA signature digest algorithm too weak.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_CALL>
|
||||
|
||||
nvalid certificate verification context.
|
||||
|
||||
=item B<X509_V_ERR_STORE_LOOKUP>
|
||||
|
||||
Issuer certificate lookup error.
|
||||
|
||||
=item B<X509_V_ERR_NO_VALID_SCTS>
|
||||
|
||||
Certificate Transparency required, but no valid SCTs found.
|
||||
|
||||
=item B<X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION>
|
||||
|
||||
Proxy subject name violation.
|
||||
|
||||
=item B<X509_V_ERR_OCSP_VERIFY_NEEDED>
|
||||
|
||||
Returned by the verify callback to indicate an OCSP verification is needed.
|
||||
|
||||
=item B<X509_V_ERR_OCSP_VERIFY_FAILED>
|
||||
|
||||
Returned by the verify callback to indicate OCSP verification failed.
|
||||
|
||||
=item B<X509_V_ERR_OCSP_CERT_UNKNOWN>
|
||||
|
||||
Returned by the verify callback to indicate that the certificate is not recognized
|
||||
by the OCSP responder.
|
||||
|
||||
=back
|
||||
This command ignores many errors, in order to allow all the problems with a
|
||||
certificate chain to be determined.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
@@ -751,9 +156,6 @@ L<ossl_store-file(7)>
|
||||
|
||||
The B<-show_chain> option was added in OpenSSL 1.1.0.
|
||||
|
||||
The B<-issuer_checks> option is deprecated as of OpenSSL 1.1.0 and
|
||||
is silently ignored.
|
||||
|
||||
The B<-sm2-id> and B<-sm2-hex-id> options were added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -19,7 +19,9 @@ B<openssl> B<x509>
|
||||
[B<-serial>]
|
||||
[B<-hash>]
|
||||
[B<-subject_hash>]
|
||||
[B<-subject_hash_old>]
|
||||
[B<-issuer_hash>]
|
||||
[B<-issuer_hash_old>]
|
||||
[B<-ocspid>]
|
||||
[B<-subject>]
|
||||
[B<-issuer>]
|
||||
@@ -44,6 +46,7 @@ B<openssl> B<x509>
|
||||
[B<-days> I<arg>]
|
||||
[B<-set_serial> I<n>]
|
||||
[B<-signkey> I<filename>]
|
||||
[B<-badsig>]
|
||||
[B<-passin> I<arg>]
|
||||
[B<-x509toreq>]
|
||||
[B<-req>]
|
||||
@@ -52,11 +55,16 @@ B<openssl> B<x509>
|
||||
[B<-CAcreateserial>]
|
||||
[B<-CAserial> I<filename>]
|
||||
[B<-new>]
|
||||
[B<-next_serial>]
|
||||
[B<-nocert>]
|
||||
[B<-force_pubkey> I<filename>]
|
||||
[B<-subj> I<arg>]
|
||||
[B<-text>]
|
||||
[B<-ext> I<extensions>]
|
||||
[B<-certopt> I<option>]
|
||||
[B<-checkhost> I<host>]
|
||||
[B<-checkemail> I<host>]
|
||||
[B<-checkip> I<ipaddr>]
|
||||
[B<-C>]
|
||||
[B<-I<digest>>]
|
||||
[B<-clrext>]
|
||||
@@ -155,6 +163,18 @@ 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 L</Text Options> section for more information.
|
||||
|
||||
=item B<-checkhost> I<host>
|
||||
|
||||
Check that the certificate matches the specified host.
|
||||
|
||||
=item B<-checkemail> I<email>
|
||||
|
||||
Check that the certificate matches the specified email address.
|
||||
|
||||
=item B<-checkip> I<ipaddr>
|
||||
|
||||
Check that the certificate matches the specified IP address.
|
||||
|
||||
=item B<-noout>
|
||||
|
||||
This option prevents output of the encoded version of the certificate.
|
||||
@@ -340,6 +360,11 @@ 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<-badsig>
|
||||
|
||||
Corrupt the signature before writing it; this can be useful
|
||||
for testing.
|
||||
|
||||
=item B<-sigopt> I<nm>:I<v>
|
||||
|
||||
Pass options to the signature algorithm during sign or verify operations.
|
||||
@@ -449,6 +474,14 @@ 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<-next_serial>
|
||||
|
||||
Set the serial to be one more than the number in the certificate.
|
||||
|
||||
=item B<-nocert>
|
||||
|
||||
Do not generate or output a certificate.
|
||||
|
||||
=item B<-force_pubkey> I<filename>
|
||||
|
||||
When a certificate is created set its public key to the key in I<filename>
|
||||
|
||||
+269
-8
@@ -119,11 +119,6 @@ CRL to PKCS#7 Conversion.
|
||||
Message Digest calculation. MAC calculations are superseded by
|
||||
L<openssl-mac(1)>.
|
||||
|
||||
=item B<dh>
|
||||
|
||||
Diffie-Hellman Parameter Management.
|
||||
Obsoleted by L<openssl-dhparam(1)>.
|
||||
|
||||
=item B<dhparam>
|
||||
|
||||
Generation and Management of Diffie-Hellman Parameters. Superseded by
|
||||
@@ -158,10 +153,9 @@ Engine (loadable module) information and manipulation.
|
||||
|
||||
Error Number to Error String Conversion.
|
||||
|
||||
=item B<gendh>
|
||||
=item B<fipsinstall>
|
||||
|
||||
Generation of Diffie-Hellman Parameters.
|
||||
Obsoleted by L<openssl-dhparam(1)>.
|
||||
FIPS configuration installation.
|
||||
|
||||
=item B<gendsa>
|
||||
|
||||
@@ -176,6 +170,10 @@ Generation of Private Key or Parameters.
|
||||
|
||||
Generation of RSA Private Key. Superseded by L<openssl-genpkey(1)>.
|
||||
|
||||
=item B<help>
|
||||
|
||||
Display information about a command's options.
|
||||
|
||||
=item B<info>
|
||||
|
||||
Display diverse information built into the OpenSSL libraries.
|
||||
@@ -184,6 +182,10 @@ Display diverse information built into the OpenSSL libraries.
|
||||
|
||||
Key Derivation Functions.
|
||||
|
||||
=item B<list>
|
||||
|
||||
List algorithms and features.
|
||||
|
||||
=item B<mac>
|
||||
|
||||
Message Authentication Code Calculation.
|
||||
@@ -228,6 +230,10 @@ Public key algorithm cryptographic operation utility.
|
||||
|
||||
Compute prime numbers.
|
||||
|
||||
=item B<provider>
|
||||
|
||||
Load and query providers.
|
||||
|
||||
=item B<rand>
|
||||
|
||||
Generate pseudo-random bytes.
|
||||
@@ -781,6 +787,258 @@ client.
|
||||
The input format for the extra certificate and key, respectively.
|
||||
See L<openssl(1)/Format Options> for details.
|
||||
|
||||
=item B<-xchain_build>
|
||||
|
||||
Specify whether the application should build the certificate chain to be
|
||||
provided to the server for the extra certificates via the B<-xkey>,
|
||||
B<-xcert>, and B<-xchain> options.
|
||||
|
||||
=item B<-xcertform> B<DER>|B<PEM>, B<-xkeyform> B<DER>|B<PEM>
|
||||
|
||||
The input format for the extra certifcate and key, respectively.
|
||||
See L<openssl(1)/Format Options> for details.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Verification Options
|
||||
|
||||
Many OpenSSL commands verify certificates. The details of how each
|
||||
command handles errors are documented on the specific command page.
|
||||
|
||||
Verification is a complicated process, consisting of a number of separate
|
||||
steps that are detailed in the following paragraphs.
|
||||
|
||||
First, a certificate chain is built up starting from the supplied certificate
|
||||
and ending in a root CA. It is an error if the whole chain cannot be
|
||||
built up. The chain is built up by looking up the certificate that
|
||||
signed (or issued) the certificate. It then repeats the process, until
|
||||
it gets to a certificate that is self-issued.
|
||||
|
||||
The process of looking up the issuer's certificate itself involves a number
|
||||
of steps. After all certificates whose subject name matches the issuer
|
||||
name of the current certificate are subject to further tests. The relevant
|
||||
authority key identifier components of the current certificate (if present)
|
||||
must match the subject key identifier (if present) and issuer and serial
|
||||
number of the candidate issuer, in addition the keyUsage extension of the
|
||||
candidate issuer (if present) must permit certificate signing.
|
||||
|
||||
The lookup first looks in the list of untrusted certificates and if no match
|
||||
is found the remaining lookups are from the trusted certificates. The root CA
|
||||
is always looked up in the trusted certificate list: if the certificate to
|
||||
verify is a root certificate then an exact match must be found in the trusted
|
||||
list.
|
||||
|
||||
The second step 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
|
||||
L<openssl-x509(1)/CERTIFICATE EXTENSIONS>.
|
||||
|
||||
The third step 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 fourth, and final, step is to check the validity of the certificate
|
||||
chain. The validity period is checked against the system time
|
||||
and the C<notBefore> and C<notAfter> dates in the certificate. The certificate
|
||||
signatures are also checked at this point. The B<-attime> flag may be
|
||||
used to specify a time other than "now."
|
||||
|
||||
If all operations complete successfully then certificate is considered
|
||||
valid. If any operation fails then the certificate is not valid.
|
||||
|
||||
The details of the processing steps can be fine-tuned with the
|
||||
following flags.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-verbose>
|
||||
|
||||
Print extra information about the operations being performed.
|
||||
|
||||
=item B<-attime> I<timestamp>
|
||||
|
||||
Perform validation checks using time specified by I<timestamp> and not
|
||||
current system time. I<timestamp> is the number of seconds since
|
||||
January 1, 1970 (i.e., the Unix Epoch).
|
||||
|
||||
=item B<-no_check_time>
|
||||
|
||||
This option suppresses checking the validity period of certificates and CRLs
|
||||
against the current time. If option B<-attime> is used to specify
|
||||
a verification time, the check is not suppressed.
|
||||
|
||||
=item B<-x509_strict>
|
||||
|
||||
This disables non-compliant workarounds for broken certificates.
|
||||
|
||||
=item B<-ignore_critical>
|
||||
|
||||
Normally if an unhandled critical extension is present which is not
|
||||
supported by OpenSSL the certificate is rejected (as required by RFC5280).
|
||||
If this option is set critical extensions are ignored.
|
||||
|
||||
=item B<-issuer_checks>
|
||||
|
||||
Ignored.
|
||||
|
||||
=item B<-crl_check>
|
||||
|
||||
Checks end entity certificate validity by attempting to look up a valid CRL.
|
||||
If a valid CRL cannot be found an error occurs.
|
||||
|
||||
=item B<-crl_check_all>
|
||||
|
||||
Checks the validity of B<all> certificates in the chain by attempting
|
||||
to look up valid CRLs.
|
||||
|
||||
=item B<-use_deltas>
|
||||
|
||||
Enable support for delta CRLs.
|
||||
|
||||
=item B<-extended_crl>
|
||||
|
||||
Enable extended CRL features such as indirect CRLs and alternate CRL
|
||||
signing keys.
|
||||
|
||||
=item B<-suiteB_128_only>, B<-suiteB_128>, B<-suiteB_192>
|
||||
|
||||
Enable the Suite B mode operation at 128 bit Level of Security, 128 bit or
|
||||
192 bit, or only 192 bit Level of Security respectively.
|
||||
See RFC6460 for details. In particular the supported signature algorithms are
|
||||
reduced to support only ECDSA and SHA256 or SHA384 and only the elliptic curves
|
||||
P-256 and P-384.
|
||||
|
||||
=item B<-auth_level> I<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 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. See L<SSL_CTX_set_security_level(3)> for the
|
||||
definitions of the available levels. The default security level is -1,
|
||||
or "not set". At security level 0 or lower all algorithms are acceptable.
|
||||
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<-partial_chain>
|
||||
|
||||
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<-check_ss_sig>
|
||||
|
||||
Verify the signature on the self-signed root CA. This is disabled by default
|
||||
because it doesn't add any security.
|
||||
|
||||
=item B<-allow_proxy_certs>
|
||||
|
||||
Allow the verification of proxy certificates.
|
||||
|
||||
=item B<-trusted_first>
|
||||
|
||||
As of OpenSSL 1.1.0 this option is on by default and cannot be disabled.
|
||||
|
||||
=item B<-no_alt_chains>
|
||||
|
||||
As of OpenSSL 1.1.0, since B<-trusted_first> always on, this option has no
|
||||
effect.
|
||||
|
||||
=item B<-trusted> I<file>
|
||||
|
||||
Parse I<file> as a set of one or more certificates in PEM format.
|
||||
All certificates must be self-signed, unless the
|
||||
B<-partial_chain> option is specified.
|
||||
This option implies the B<-no-CAfile> and B<-no-CApath> options and it
|
||||
cannot be used with either the B<-CAfile> or B<-CApath> options, so
|
||||
only certificates in the file are trust anchors.
|
||||
This option may be used multiple times.
|
||||
|
||||
=item B<-untrusted> I<file>
|
||||
|
||||
Parse I<file> as a set of one or more certificates in PEM format.
|
||||
All certificates are untrusted certificates that may be used to
|
||||
construct a certificate chain from the subject certificate to a trust anchor.
|
||||
This option may be used multiple times.
|
||||
|
||||
=item B<-policy> I<arg>
|
||||
|
||||
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<-explicit_policy>
|
||||
|
||||
Set policy variable require-explicit-policy (see RFC5280).
|
||||
|
||||
=item B<-policy_check>
|
||||
|
||||
Enables certificate policy processing.
|
||||
|
||||
=item B<-policy_print>
|
||||
|
||||
Print out diagnostics related to policy processing.
|
||||
|
||||
=item B<-inhibit_any>
|
||||
|
||||
Set policy variable inhibit-any-policy (see RFC5280).
|
||||
|
||||
=item B<-inhibit_map>
|
||||
|
||||
Set policy variable inhibit-policy-mapping (see RFC5280).
|
||||
|
||||
=item B<-purpose> I<purpose>
|
||||
|
||||
The intended use for the certificate. If this option is not specified, this
|
||||
command will not consider certificate purpose during chain verification.
|
||||
Currently accepted uses are B<sslclient>, B<sslserver>, B<nssslserver>,
|
||||
B<smimesign>, B<smimeencrypt>.
|
||||
|
||||
=item B<-verify_depth> I<num>
|
||||
|
||||
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> I<email>
|
||||
|
||||
Verify if I<email> matches the email address in Subject Alternative Name or
|
||||
the email in the subject Distinguished Name.
|
||||
|
||||
=item B<-verify_hostname> I<hostname>
|
||||
|
||||
Verify if I<hostname> matches DNS name in Subject Alternative Name or
|
||||
Common Name in the subject certificate.
|
||||
|
||||
=item B<-verify_ip> I<ip>
|
||||
|
||||
Verify if I<ip> matches the IP address in Subject Alternative Name of
|
||||
the subject certificate.
|
||||
|
||||
=item B<-verify_name> I<name>
|
||||
|
||||
Use default verification policies like trust model and required certificate
|
||||
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 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
|
||||
and S/MIME.
|
||||
As of OpenSSL 1.1.0, the trust model is inferred from the purpose when not
|
||||
specified, so the B<-verify_name> options are functionally equivalent to the
|
||||
corresponding B<-purpose> settings.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Name Format Options
|
||||
@@ -1122,6 +1380,9 @@ 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.
|
||||
|
||||
The B<-issuer_checks> option is deprecated as of OpenSSL 1.1.0 and
|
||||
is silently ignored.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
+1
-1
@@ -183,7 +183,7 @@ example:
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=for openssl foreign manuals: WWW::Curl::Easy
|
||||
=for openssl foreign manual WWW::Curl::Easy
|
||||
|
||||
L<openssl(1)>,
|
||||
L<openssl-ts(1)>,
|
||||
|
||||
@@ -70,7 +70,7 @@ If either or both of the parameters passed to ASN1_TYPE_cmp() is NULL the
|
||||
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
|
||||
unparsable type which returns NULL) for types which do B<not> match. So
|
||||
applications should handle the case of two absent values separately.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
@@ -48,7 +48,7 @@ out information relating to each BIO operation. If the callback
|
||||
argument is set it is interpreted as a BIO to send the information
|
||||
to, otherwise stderr is used.
|
||||
|
||||
BIO_callback_fn_ex() is the type of the callback function and BIO_callback_fn()
|
||||
BIO_callback_fn_ex is the type of the callback function and BIO_callback_fn
|
||||
is the type of the old format callback function. The meaning of each argument
|
||||
is described below:
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_socket_wait,
|
||||
BIO_wait,
|
||||
BIO_connect_retry
|
||||
- BIO socket utility functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
||||
int BIO_wait(BIO *bio, time_t max_time);
|
||||
int BIO_connect_retry(BIO *bio, long timeout);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_socket_wait() waits on the socket B<fd> for reading if B<for_read> is not 0,
|
||||
else for writing, at most until B<max_time>.
|
||||
It succeeds immediately if B<max_time> == 0 (which means no timeout given).
|
||||
|
||||
BIO_wait() waits on the socket underlying the given B<bio>, for reading if
|
||||
B<bio> is supposed to read, else for writing, at most until B<max_time>.
|
||||
It succeeds immediately if B<max_time> == 0 (which means no timeout given).
|
||||
|
||||
BIO_connect_retry() connects via the given B<bio>, retrying BIO_do_connect()
|
||||
until success or a timeout or error condition is reached.
|
||||
If the B<timeout> parameter is > 0 this indicates the maximum number of seconds
|
||||
to wait until the connection is established. A value of 0 enables waiting
|
||||
indefinitely, while a value < 0 immediately leads to a timeout condition.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
BIO_socket_wait(), BIO_wait(), and BIO_connect_retry()
|
||||
return -1 on error, 0 on timeout, and 1 on success.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
BIO_socket_wait(), BIO_wait(), and BIO_connect_retry()
|
||||
were added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2019-2020 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
|
||||
@@ -16,6 +16,10 @@ DES_fcrypt, DES_crypt - DES encryption
|
||||
|
||||
#include <openssl/des.h>
|
||||
|
||||
Deprecated since OpenSSL 3.0, can be hidden entirely by defining
|
||||
B<OPENSSL_API_COMPAT> with a suitable version value, see
|
||||
L<openssl_user_macros(7)>:
|
||||
|
||||
void DES_random_key(DES_cblock *ret);
|
||||
|
||||
int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule);
|
||||
@@ -94,6 +98,10 @@ DES_fcrypt, DES_crypt - DES encryption
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated. Applications should
|
||||
instead use L<EVP_EncryptInit_ex(3)>, L<EVP_EncryptUpdate(3)> and
|
||||
L<EVP_EncryptFinal_ex(3)> or the equivalently named decrypt functions.
|
||||
|
||||
This library contains a fast implementation of the DES encryption
|
||||
algorithm.
|
||||
|
||||
@@ -302,6 +310,8 @@ L<EVP_EncryptInit(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
The requirement that the B<salt> parameter to DES_crypt() and DES_fcrypt()
|
||||
be two ASCII characters was first enforced in
|
||||
OpenSSL 1.1.0. Previous versions tried to use the letter uppercase B<A>
|
||||
@@ -310,7 +320,7 @@ on some platforms.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2000-2020 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
|
||||
|
||||
@@ -8,13 +8,16 @@ DH_new_by_nid, DH_get_nid - get or find DH named parameters
|
||||
|
||||
#include <openssl/dh.h>
|
||||
DH *DH_new_by_nid(int nid);
|
||||
int *DH_get_nid(const DH *dh);
|
||||
int *DH_get_nid(DH *dh);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
DH_new_by_nid() creates and returns a DH structure containing named parameters
|
||||
B<nid>. Currently B<nid> must be B<NID_ffdhe2048>, B<NID_ffdhe3072>,
|
||||
B<NID_ffdhe4096>, B<NID_ffdhe6144> or B<NID_ffdhe8192>.
|
||||
B<NID_ffdhe4096>, B<NID_ffdhe6144>, B<NID_ffdhe8192>,
|
||||
B<NID_modp_1536>, B<NID_modp_2048>, B<NID_modp_3072>,
|
||||
B<NID_modp_4096>, B<NID_modp_6144> or B<NID_modp_8192>.
|
||||
|
||||
|
||||
DH_get_nid() determines if the parameters contained in B<dh> match
|
||||
any named set. It returns the NID corresponding to the matching parameters or
|
||||
@@ -29,7 +32,7 @@ B<NID_undef> if there is no match.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2017-2020 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
|
||||
|
||||
@@ -18,6 +18,11 @@ functions
|
||||
const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig);
|
||||
const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig);
|
||||
int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
|
||||
|
||||
Deprecated since OpenSSL 3.0, can be hidden entirely by defining
|
||||
B<OPENSSL_API_COMPAT> with a suitable version value, see
|
||||
L<openssl_user_macros(7)>:
|
||||
|
||||
int ECDSA_size(const EC_KEY *eckey);
|
||||
|
||||
int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
|
||||
@@ -40,10 +45,6 @@ functions
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Note: these functions provide a low level interface to ECDSA. Most
|
||||
applications should use the higher level B<EVP> interface such as
|
||||
L<EVP_DigestSignInit(3)> or L<EVP_DigestVerifyInit(3)> instead.
|
||||
|
||||
B<ECDSA_SIG> is an opaque structure consisting of two BIGNUMs for the
|
||||
B<r> and B<s> value of an ECDSA signature (see X9.62 or FIPS 186-2).
|
||||
|
||||
@@ -69,8 +70,13 @@ after this function has been called.
|
||||
See L<i2d_ECDSA_SIG(3)> and L<d2i_ECDSA_SIG(3)> for information about encoding
|
||||
and decoding ECDSA signatures to/from DER.
|
||||
|
||||
All of the functions described below are deprecated. Applications should
|
||||
use the higher level B<EVP> interface such as L<EVP_DigestSignInit(3)>
|
||||
or L<EVP_DigestVerifyInit(3)> instead.
|
||||
|
||||
ECDSA_size() returns the maximum length of a DER encoded ECDSA signature
|
||||
created with the private EC key B<eckey>.
|
||||
created with the private EC key B<eckey>. To obtain the actual signature
|
||||
size use L<EVP_PKEY_sign(3)> with a NULL B<sig> parameter.
|
||||
|
||||
ECDSA_sign() computes a digital signature of the B<dgstlen> bytes hash value
|
||||
B<dgst> using the private EC key B<eckey>. The DER encoded signatures is
|
||||
@@ -194,9 +200,16 @@ ANSI X9.62, US Federal Information Processing Standard FIPS 186-2
|
||||
L<EC_KEY_new(3)>,
|
||||
L<EVP_DigestSignInit(3)>,
|
||||
L<EVP_DigestVerifyInit(3)>,
|
||||
L<EVP_PKEY_sign(3)>
|
||||
L<i2d_ECDSA_SIG(3)>,
|
||||
L<d2i_ECDSA_SIG(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The ECDSA_size(), ECDSA_sign(), ECDSA_do_sign(), ECDSA_verify(),
|
||||
ECDSA_do_verify(), ECDSA_sign_setup(), ECDSA_sign_ex() and ECDSA_do_sign_ex()
|
||||
functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -128,7 +128,7 @@ EVP_DigestSignFinal().
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
EVP_DigestSignInit(), EVP_DigestSignUpdate(), EVP_DigestSignaFinal() and
|
||||
EVP_DigestSignInit(), EVP_DigestSignUpdate(), EVP_DigestSignFinal() and
|
||||
EVP_DigestSign() return 1 for success and 0 for failure.
|
||||
|
||||
The error codes can be obtained from L<ERR_get_error(3)>.
|
||||
|
||||
@@ -168,8 +168,7 @@ Not all parameters may be supported by all providers.
|
||||
See L<OSSL_PROVIDER(3)> for more information on providers.
|
||||
See L<OSSL_PARAM(3)> for more information on parameters.
|
||||
These functions must only be called after the EVP_PKEY_CTX has been initialised
|
||||
for use in an operation (for example by L<EVP_PKEY_sign_init_ex(3)>,
|
||||
L<EVP_PKEY_derive_init_ex(3)> or other similar functions).
|
||||
for use in an operation.
|
||||
|
||||
The parameters currently supported by the default provider are:
|
||||
|
||||
@@ -204,8 +203,7 @@ that can be used with EVP_PKEY_CTX_get_params() and EVP_PKEY_CTX_set_params()
|
||||
respectively.
|
||||
See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
|
||||
These functions must only be called after the EVP_PKEY_CTX has been initialised
|
||||
for use in an operation (for example by L<EVP_PKEY_sign_init_ex(3)>,
|
||||
L<EVP_PKEY_derive_init_ex(3)> or other similar functions).
|
||||
for use in an operation.
|
||||
|
||||
The function EVP_PKEY_CTX_ctrl() sends a control operation to the context
|
||||
B<ctx>. The key type used must match B<keytype> if it is not -1. The parameter
|
||||
@@ -392,19 +390,37 @@ SHA-256 is selected to match the bit length of B<q> above.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_paramgen_prime_len() macro sets the length of the DH
|
||||
prime parameter B<p> for DH parameter generation. If this macro is not called
|
||||
then 1024 is used. Only accepts lengths greater than or equal to 256.
|
||||
then 2048 is used. Only accepts lengths greater than or equal to 256.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_paramgen_subprime_len() macro sets the length of the DH
|
||||
optional subprime parameter B<q> for DH parameter generation. The default is
|
||||
256 if the prime is at least 2048 bits long or 160 otherwise. The DH
|
||||
paramgen type must have been set to x9.42.
|
||||
paramgen type must have been set to B<DH_PARAMGEN_TYPE_FIPS_186_2> or
|
||||
B<DH_PARAMGEN_TYPE_FIPS_186_4>.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_paramgen_generator() macro sets DH generator to B<gen>
|
||||
for DH parameter generation. If not specified 2 is used.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_paramgen_type() macro sets the key type for DH
|
||||
parameter generation. Use 0 for PKCS#3 DH and 1 for X9.42 DH.
|
||||
The default is 0.
|
||||
parameter generation. The supported parameters are:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<DH_PARAMGEN_TYPE_GENERATOR>
|
||||
|
||||
Uses a generator g (PKCS#3 format).
|
||||
|
||||
=item B<DH_PARAMGEN_TYPE_FIPS_186_2>
|
||||
|
||||
FIPS186-2 FFC parameter generator (X9.42 DH).
|
||||
|
||||
=item B<DH_PARAMGEN_TYPE_FIPS_186_4>
|
||||
|
||||
FIPS186-4 FFC parameter generator.
|
||||
|
||||
=back
|
||||
|
||||
The default is B<DH_PARAMGEN_TYPE_GENERATOR>.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_pad() function sets the DH padding mode.
|
||||
If B<pad> is 1 the shared secret is padded with zeros up to the size of the DH
|
||||
@@ -412,10 +428,11 @@ prime B<p>.
|
||||
If B<pad> is zero (the default) then no padding is performed.
|
||||
|
||||
EVP_PKEY_CTX_set_dh_nid() sets the DH parameters to values corresponding to
|
||||
B<nid> as defined in RFC7919. The B<nid> parameter must be B<NID_ffdhe2048>,
|
||||
B<NID_ffdhe3072>, B<NID_ffdhe4096>, B<NID_ffdhe6144>, B<NID_ffdhe8192>
|
||||
or B<NID_undef> to clear the stored value. This macro can be called during
|
||||
parameter or key generation.
|
||||
B<nid> as defined in RFC7919 or RFC3526. The B<nid> parameter must be
|
||||
B<NID_ffdhe2048>, B<NID_ffdhe3072>, B<NID_ffdhe4096>, B<NID_ffdhe6144>,
|
||||
B<NID_ffdhe8192>, B<NID_modp_1536>, B<NID_modp_2048>, B<NID_modp_3072>,
|
||||
B<NID_modp_4096>, B<NID_modp_6144>, B<NID_modp_8192> or B<NID_undef> to clear
|
||||
the stored value. This macro can be called during parameter or key generation.
|
||||
The nid parameter and the rfc5114 parameter are mutually exclusive.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_rfc5114() and EVP_PKEY_CTX_set_dhx_rfc5114() macros are
|
||||
|
||||
@@ -36,9 +36,9 @@ lifetime of the returned B<EVP_PKEY_CTX> or of any of its duplicates.
|
||||
|
||||
The EVP_PKEY_CTX_new_from_pkey() function allocates a public key algorithm
|
||||
context using the library context I<libctx> (see L<OPENSSL_CTX(3)>) and the
|
||||
algorithm specified by I<pkey> . None of the arguments are duplicated, so they
|
||||
must remain unchanged for the lifetime of the returned B<EVP_PKEY_CTX> or of
|
||||
any of its duplicates.
|
||||
algorithm specified by I<pkey> and the property query I<propquery>. None of the
|
||||
arguments are duplicated, so they must remain unchanged for the lifetime of the
|
||||
returned B<EVP_PKEY_CTX> or any of its duplicates.
|
||||
|
||||
EVP_PKEY_CTX_new_id() and EVP_PKEY_CTX_new_from_name() are normally
|
||||
used when no B<EVP_PKEY> structure is associated with the operations,
|
||||
|
||||
@@ -29,7 +29,7 @@ EVP_PKEY_CTX_set_scrypt_maxmem_bytes
|
||||
|
||||
These functions are used to set up the necessary data to use the
|
||||
scrypt KDF.
|
||||
For more information on scrypt, see L<EVP_KDF_SCRYPT(7)>.
|
||||
For more information on scrypt, see L<EVP_KDF-SCRYPT(7)>.
|
||||
|
||||
EVP_PKEY_CTX_set1_scrypt_salt() sets the B<saltlen> bytes long salt
|
||||
value.
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
EVP_PKEY_check, EVP_PKEY_param_check, EVP_PKEY_public_check,
|
||||
EVP_PKEY_private_check, EVP_PKEY_pairwise_check
|
||||
- key and parameter validation functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/evp.h>
|
||||
|
||||
int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
EVP_PKEY_param_check() validates the parameters component of the key
|
||||
given by B<ctx>.
|
||||
|
||||
EVP_PKEY_public_check() validates the public component of the key given by B<ctx>.
|
||||
|
||||
EVP_PKEY_private_check() validates the private component of the key given by B<ctx>.
|
||||
|
||||
EVP_PKEY_pairwise_check() validates that the public and private components have
|
||||
the correct mathematical relationship to each other for the key given by B<ctx>.
|
||||
|
||||
EVP_PKEY_check() validates all components of a key given by B<ctx>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Refer to SP800-56A and SP800-56B for rules relating to when these functions
|
||||
should be called during key establishment.
|
||||
It is not necessary to call these functions after locally calling an approved key
|
||||
generation method, but may be required for assurance purposes when receiving
|
||||
keys from a third party.
|
||||
|
||||
In OpenSSL an EVP_PKEY structure containing a private key also contains the
|
||||
public key components and parameters (if any). An OpenSSL private key is
|
||||
equivalent to what some libraries call a "key pair". A private key can be used
|
||||
in functions which require the use of a public key or parameters.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
All functions return 1 for success or others for failure.
|
||||
They return -2 if the operation is not supported for the specific algorithm.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_PKEY_CTX_new(3)>,
|
||||
L<EVP_PKEY_fromdata(3)>,
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
EVP_PKEY_check(), EVP_PKEY_public_check() and EVP_PKEY_param_check() were added
|
||||
in OpenSSL 1.1.1.
|
||||
|
||||
EVP_PKEY_private_check() and EVP_PKEY_pairwise_check() were added
|
||||
in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2006-2020 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
|
||||
@@ -33,7 +33,7 @@ written to I<keylen>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
After the call to EVP_PKEY_derive_init() or EVP_PKEY_derive_init_ex() algorithm
|
||||
After the call to EVP_PKEY_derive_init(), algorithm
|
||||
specific control operations can be performed to set any appropriate parameters
|
||||
for the operation.
|
||||
|
||||
@@ -42,7 +42,7 @@ context if several operations are performed using the same parameters.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
EVP_PKEY_derive_init_ex(), EVP_PKEY_derive_init() and EVP_PKEY_derive() return 1
|
||||
EVP_PKEY_derive_init() and EVP_PKEY_derive() return 1
|
||||
for success and 0 or a negative value for failure.
|
||||
In particular a return value of -2 indicates the operation is not supported by
|
||||
the public key algorithm.
|
||||
@@ -95,8 +95,7 @@ L<EVP_KEYEXCH_fetch(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
These functions were added in OpenSSL 1.0.0. The EVP_PKEY_derive_init_ex()
|
||||
function was added in OpenSSL 3.0.
|
||||
These functions were added in OpenSSL 1.0.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
EVP_PKEY_param_fromdata_init, EVP_PKEY_key_fromdata_init, EVP_PKEY_fromdata,
|
||||
EVP_PKEY_param_fromdata_settable, EVP_PKEY_key_fromdata_settable
|
||||
- functions to create domain parameters and keys from user data
|
||||
- functions to create key parameters and keys from user data
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -19,12 +19,12 @@ EVP_PKEY_param_fromdata_settable, EVP_PKEY_key_fromdata_settable
|
||||
=head1 DESCRIPTION
|
||||
|
||||
EVP_PKEY_param_fromdata_init() initializes a public key algorithm context
|
||||
for creating domain parameters from user data.
|
||||
for creating key parameters from user data.
|
||||
|
||||
EVP_PKEY_key_fromdata_init() initializes a public key algorithm context for
|
||||
creating a key from user data.
|
||||
|
||||
EVP_PKEY_fromdata() creates domain parameters or a key, given data from
|
||||
EVP_PKEY_fromdata() creates key parameters or a key, given data from
|
||||
I<params> and a context that's been initialized with
|
||||
EVP_PKEY_param_fromdata_init() or EVP_PKEY_key_fromdata_init(). The result is
|
||||
written to I<*ppkey>.
|
||||
|
||||
@@ -2,19 +2,32 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
EVP_PKEY_get_default_digest_nid - get default signature digest
|
||||
EVP_PKEY_get_default_digest_nid, EVP_PKEY_get_default_digest_name
|
||||
- get default signature digest
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/evp.h>
|
||||
|
||||
int EVP_PKEY_get_default_digest_name(EVP_PKEY *pkey,
|
||||
char *mdname, size_t mdname_sz)
|
||||
int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The EVP_PKEY_get_default_digest_nid() function sets B<pnid> to the default
|
||||
message digest NID for the public key signature operations associated with key
|
||||
B<pkey>. Note that some signature algorithms (i.e. Ed25519 and Ed448) do not use
|
||||
a digest during signing. In this case B<pnid> will be set to NID_undef.
|
||||
EVP_PKEY_get_default_digest_name() fills in the default message digest
|
||||
name for the public key signature operations associated with key
|
||||
I<pkey> into I<mdname>, up to at most I<mdname_sz> bytes including the
|
||||
ending NUL byte.
|
||||
|
||||
EVP_PKEY_get_default_digest_nid() sets I<pnid> to the default message
|
||||
digest NID for the public key signature operations associated with key
|
||||
I<pkey>. Note that some signature algorithms (i.e. Ed25519 and Ed448)
|
||||
do not use a digest during signing. In this case I<pnid> will be set
|
||||
to NID_undef. This function is only reliable for legacy keys, which
|
||||
are keys with a B<EVP_PKEY_ASN1_METHOD>; these keys have typically
|
||||
been loaded from engines, or created with L<EVP_PKEY_assign_RSA(3)> or
|
||||
similar.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -22,11 +35,12 @@ For all current standard OpenSSL public key algorithms SHA256 is returned.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The EVP_PKEY_get_default_digest_nid() function returns 1 if the message digest
|
||||
is advisory (that is other digests can be used) and 2 if it is mandatory (other
|
||||
digests can not be used). It returns 0 or a negative value for failure. In
|
||||
particular a return value of -2 indicates the operation is not supported by the
|
||||
public key algorithm.
|
||||
EVP_PKEY_get_default_digest_name() and EVP_PKEY_get_default_digest_nid()
|
||||
both return 1 if the message digest is advisory (that is other digests
|
||||
can be used) and 2 if it is mandatory (other digests can not be used).
|
||||
They return 0 or a negative value for failure. In particular a return
|
||||
value of -2 indicates the operation is not supported by the public key
|
||||
algorithm.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ EVP_PKEY_keygen_init, EVP_PKEY_keygen, EVP_PKEY_paramgen_init,
|
||||
EVP_PKEY_paramgen, EVP_PKEY_CTX_set_cb, EVP_PKEY_CTX_get_cb,
|
||||
EVP_PKEY_CTX_get_keygen_info, EVP_PKEY_CTX_set_app_data,
|
||||
EVP_PKEY_CTX_get_app_data,
|
||||
EVP_PKEY_gen_cb, EVP_PKEY_check, EVP_PKEY_public_check,
|
||||
EVP_PKEY_param_check
|
||||
EVP_PKEY_gen_cb
|
||||
- key and parameter generation and check functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
@@ -29,10 +28,6 @@ EVP_PKEY_param_check
|
||||
void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
|
||||
void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
|
||||
|
||||
int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The EVP_PKEY_keygen_init() function initializes a public key algorithm
|
||||
@@ -63,18 +58,6 @@ and retrieve an opaque pointer. This can be used to set some application
|
||||
defined value which can be retrieved in the callback: for example a handle
|
||||
which is used to update a "progress dialog".
|
||||
|
||||
EVP_PKEY_check() validates the key-pair given by B<ctx>. This function first tries
|
||||
to use customized key check method in B<EVP_PKEY_METHOD> if it's present; otherwise
|
||||
it calls a default one defined in B<EVP_PKEY_ASN1_METHOD>.
|
||||
|
||||
EVP_PKEY_public_check() validates the public component of the key-pair given by B<ctx>.
|
||||
This function first tries to use customized key check method in B<EVP_PKEY_METHOD>
|
||||
if it's present; otherwise it calls a default one defined in B<EVP_PKEY_ASN1_METHOD>.
|
||||
|
||||
EVP_PKEY_param_check() validates the algorithm parameters of the key-pair given by B<ctx>.
|
||||
This function first tries to use customized key check method in B<EVP_PKEY_METHOD>
|
||||
if it's present; otherwise it calls a default one defined in B<EVP_PKEY_ASN1_METHOD>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
After the call to EVP_PKEY_keygen_init() or EVP_PKEY_paramgen_init() algorithm
|
||||
@@ -106,10 +89,6 @@ EVP_PKEY_paramgen() return 1 for success and 0 or a negative value for failure.
|
||||
In particular a return value of -2 indicates the operation is not supported by
|
||||
the public key algorithm.
|
||||
|
||||
EVP_PKEY_check(), EVP_PKEY_public_check() and EVP_PKEY_param_check() return 1
|
||||
for success or others for failure. They return -2 if the operation is not supported
|
||||
for the specific algorithm.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Generate a 2048 bit RSA key:
|
||||
@@ -191,9 +170,6 @@ L<EVP_PKEY_derive(3)>
|
||||
|
||||
These functions were added in OpenSSL 1.0.0.
|
||||
|
||||
EVP_PKEY_check(), EVP_PKEY_public_check() and EVP_PKEY_param_check() were added
|
||||
in OpenSSL 1.1.1.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -90,8 +90,7 @@ If B<engine> does not include an B<EVP_PKEY_METHOD> for B<pkey> an
|
||||
error occurs.
|
||||
|
||||
EVP_PKEY_set_alias_type() allows modifying a EVP_PKEY to use a
|
||||
different set of algorithms than the default. This is currently used
|
||||
to support SM2 keys, which use an identical encoding to ECDSA.
|
||||
different set of algorithms than the default.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -103,6 +102,16 @@ EVP_PKEY_assign_RSA(), EVP_PKEY_assign_DSA(), EVP_PKEY_assign_DH(),
|
||||
EVP_PKEY_assign_EC_KEY(), EVP_PKEY_assign_POLY1305()
|
||||
and EVP_PKEY_assign_SIPHASH() are implemented as macros.
|
||||
|
||||
EVP_PKEY_assign_EC_KEY() looks at the curve name id to determine if
|
||||
the passed B<EC_KEY> is an L<SM2(7)> key, and will set the B<EVP_PKEY>
|
||||
type to B<EVP_PKEY_SM2> in that case, instead of B<EVP_PKEY_EC>.
|
||||
|
||||
It's possible to switch back and forth between the types B<EVP_PKEY_EC>
|
||||
and B<EVP_PKEY_SM2> with a call to EVP_PKEY_set_alias_type() on keys
|
||||
assigned with this macro if it's desirable to do a normal EC
|
||||
computations with the SM2 curve instead of the special SM2
|
||||
computations, and vice versa.
|
||||
|
||||
Most applications wishing to know a key type will simply call
|
||||
EVP_PKEY_base_id() and will not care about the actual type:
|
||||
which will be identical in almost all cases.
|
||||
@@ -143,7 +152,7 @@ algorithms with EVP_PKEY_set_alias_type:
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_PKEY_new(3)>
|
||||
L<EVP_PKEY_new(3)>, L<SM2(7)>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
||||
@@ -105,7 +105,6 @@ L<EVP_PKEY_derive(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
EVP_PKEY_sign_init_ex() was added in OpenSSL 3.0.
|
||||
These functions were added in OpenSSL 1.0.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -93,8 +93,7 @@ L<EVP_PKEY_derive(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
EVP_PKEY_verify_init_ex() was added in OpenSSL 3.0.
|
||||
All other functions were added in OpenSSL 1.0.0.
|
||||
These functions were added in OpenSSL 1.0.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ HMAC_size
|
||||
|
||||
#include <openssl/hmac.h>
|
||||
|
||||
Deprecated since OpenSSL 3.0, can be hidden entirely by defining
|
||||
B<OPENSSL_API_COMPAT> with a suitable version value, see
|
||||
L<openssl_user_macros(7)>:
|
||||
|
||||
unsigned char *HMAC(const EVP_MD *evp_md, const void *key,
|
||||
int key_len, const unsigned char *d, int n,
|
||||
unsigned char *md, unsigned int *md_len);
|
||||
@@ -49,6 +53,10 @@ L<openssl_user_macros(7)>:
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated. Applications should
|
||||
instead use L<EVP_MAC_CTX_new(3)>, L<EVP_MAC_CTX_free(3)>, L<EVP_MAC_init(3)>,
|
||||
L<EVP_MAC_update(3)> and L<EVP_MAC_final(3)>.
|
||||
|
||||
HMAC is a MAC (message authentication code), i.e. a keyed hash
|
||||
function used for message authentication, which is based on a hash
|
||||
function.
|
||||
@@ -138,6 +146,8 @@ L<SHA1(3)>, L<evp(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
HMAC_CTX_init() was replaced with HMAC_CTX_reset() in OpenSSL 1.1.0.
|
||||
|
||||
HMAC_CTX_cleanup() existed in OpenSSL before version 1.1.0.
|
||||
|
||||
@@ -24,7 +24,7 @@ it adds a nonce to OCSP basic response B<resp>.
|
||||
|
||||
OCSP_check_nonce() compares the nonce value in B<req> and B<resp>.
|
||||
|
||||
OCSP_copy_nonce() copys any nonce value present in B<req> to B<resp>.
|
||||
OCSP_copy_nonce() copies any nonce value present in B<req> to B<resp>.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ with the X509 certificate B<cert>.
|
||||
|
||||
OCSP_basic_sign() signs OCSP response B<brsp> using certificate B<signer>, private key
|
||||
B<key>, digest B<dgst> and additional certificates B<certs>. If the B<flags> option
|
||||
B<OCSP_NOCERTS> is set then no certificates will be included in the request. If the
|
||||
B<OCSP_NOCERTS> is set then no certificates will be included in the response. If the
|
||||
B<flags> option B<OCSP_RESPID_KEY> is set then the responder is identified by key ID
|
||||
rather than by name. OCSP_basic_sign_ctx() also signs OCSP response B<brsp> but
|
||||
uses the parameters contained in digest context B<ctx>.
|
||||
|
||||
@@ -10,22 +10,22 @@ OCSP_REQ_CTX_set1_req, OCSP_sendreq_bio - OCSP responder query functions
|
||||
|
||||
#include <openssl/ocsp.h>
|
||||
|
||||
OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req,
|
||||
int maxline);
|
||||
OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
|
||||
OCSP_REQUEST *req, int maxline);
|
||||
|
||||
int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx);
|
||||
|
||||
void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx);
|
||||
|
||||
void OCSP_set_max_response_length(OCSP_REQ_CTX *rctx, unsigned long len);
|
||||
void OCSP_set_max_response_length(OCSP_REQ_CTX *rctx,
|
||||
unsigned long len);
|
||||
|
||||
int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx,
|
||||
const char *name, const char *value);
|
||||
|
||||
int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req);
|
||||
int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, const OCSP_REQUEST *req);
|
||||
|
||||
OCSP_RESPONSE *OCSP_sendreq_bio(BIO *io, const char *path, OCSP_REQUEST *req,
|
||||
int maxline);
|
||||
OCSP_RESPONSE *OCSP_sendreq_bio(BIO *io, const char *path, OCSP_REQUEST *req);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -35,14 +35,14 @@ response header maximum line length of B<maxline>. If B<maxline> is zero a
|
||||
default value of 4k is used. The OCSP request B<req> may be set to B<NULL>
|
||||
and provided later if required.
|
||||
|
||||
OCSP_sendreq_nbio() performs non-blocking I/O on the OCSP request context
|
||||
B<rctx>. When the operation is complete it returns the response in B<*presp>.
|
||||
OCSP_sendreq_nbio() performs I/O on the OCSP request context B<rctx>.
|
||||
When the operation is complete it returns the response in B<*presp>.
|
||||
|
||||
OCSP_REQ_CTX_free() frees up the OCSP context B<rctx>.
|
||||
|
||||
OCSP_set_max_response_length() sets the maximum response length for B<rctx>
|
||||
to B<len>. If the response exceeds this length an error occurs. If not
|
||||
set a default value of 100k is used.
|
||||
OCSP_set_max_response_length() sets the maximum response length
|
||||
for B<rctx> to B<len>. If the response exceeds this length an error occurs.
|
||||
If not set a default value of 100k is used.
|
||||
|
||||
OCSP_REQ_CTX_add1_header() adds header B<name> with value B<value> to the
|
||||
context B<rctx>. It can be called more than once to add multiple headers.
|
||||
@@ -55,23 +55,21 @@ function should be called after any calls to OCSP_REQ_CTX_add1_header().
|
||||
|
||||
OCSP_sendreq_bio() performs an OCSP request using the responder B<io>, the URL
|
||||
path B<path>, the OCSP request B<req> and with a response header maximum line
|
||||
length of B<maxline>. If B<maxline> is zero a default value of 4k is used.
|
||||
length 4k. It waits indefinitely on a response.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
OCSP_sendreq_new() returns a valid B<OCSP_REQ_CTX> structure or B<NULL> if
|
||||
an error occurred.
|
||||
OCSP_sendreq_new() returns a valid B<OCSP_REQ_CTX> structure or B<NULL>
|
||||
if an error occurred.
|
||||
|
||||
OCSP_sendreq_nbio() returns B<1> if the operation was completed successfully,
|
||||
B<-1> if the operation should be retried and B<0> if an error occurred.
|
||||
|
||||
OCSP_REQ_CTX_add1_header() and OCSP_REQ_CTX_set1_req() return B<1> for success
|
||||
and B<0> for failure.
|
||||
OCSP_sendreq_nbio(), OCSP_REQ_CTX_add1_header() and OCSP_REQ_CTX_set1_req()
|
||||
return B<1> for success and B<0> for failure.
|
||||
|
||||
OCSP_sendreq_bio() returns the B<OCSP_RESPONSE> structure sent by the
|
||||
responder or B<NULL> if an error occurred.
|
||||
|
||||
OCSP_REQ_CTX_free() and OCSP_set_max_response_length() do not return values.
|
||||
OCSP_REQ_CTX_free() and OCSP_set_max_response_length()
|
||||
do not return values.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -92,14 +90,9 @@ a Host header for B<ocsp.com> you would call:
|
||||
|
||||
OCSP_REQ_CTX_add1_header(ctx, "Host", "ocsp.com");
|
||||
|
||||
If OCSP_sendreq_nbio() indicates an operation should be retried the
|
||||
corresponding BIO can be examined to determine which operation (read or
|
||||
write) should be retried and appropriate action taken (for example a select()
|
||||
call on the underlying socket).
|
||||
|
||||
OCSP_sendreq_bio() does not support retries and so cannot handle non-blocking
|
||||
I/O efficiently. It is retained for compatibility and its use in new
|
||||
applications is not recommended.
|
||||
OCSP_sendreq_bio() does not support timeout nor setting extra headers.
|
||||
It is retained for compatibility.
|
||||
Better use B<OCSP_sendreq_nbio()> instead.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
+31
-27
@@ -12,6 +12,7 @@ CRYPTO_strdup, CRYPTO_strndup,
|
||||
OPENSSL_mem_debug_push, OPENSSL_mem_debug_pop,
|
||||
CRYPTO_mem_debug_push, CRYPTO_mem_debug_pop,
|
||||
CRYPTO_clear_realloc, CRYPTO_clear_free,
|
||||
CRYPTO_malloc_fn, CRYPTO_realloc_fn, CRYPTO_free_fn,
|
||||
CRYPTO_get_mem_functions, CRYPTO_set_mem_functions,
|
||||
CRYPTO_get_alloc_counts,
|
||||
CRYPTO_set_mem_debug, CRYPTO_mem_ctrl,
|
||||
@@ -24,41 +25,43 @@ OPENSSL_MALLOC_FD
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
int OPENSSL_malloc_init(void)
|
||||
int OPENSSL_malloc_init(void);
|
||||
|
||||
void *OPENSSL_malloc(size_t num)
|
||||
void *OPENSSL_zalloc(size_t num)
|
||||
void *OPENSSL_realloc(void *addr, size_t num)
|
||||
void OPENSSL_free(void *addr)
|
||||
char *OPENSSL_strdup(const char *str)
|
||||
char *OPENSSL_strndup(const char *str, size_t s)
|
||||
void *OPENSSL_malloc(size_t num);
|
||||
void *OPENSSL_zalloc(size_t num);
|
||||
void *OPENSSL_realloc(void *addr, size_t num);
|
||||
void OPENSSL_free(void *addr);
|
||||
char *OPENSSL_strdup(const char *str);
|
||||
char *OPENSSL_strndup(const char *str, size_t s);
|
||||
size_t OPENSSL_strlcat(char *dst, const char *src, size_t size);
|
||||
size_t OPENSSL_strlcpy(char *dst, const char *src, size_t size);
|
||||
void *OPENSSL_memdup(void *data, size_t s)
|
||||
void *OPENSSL_clear_realloc(void *p, size_t old_len, size_t num)
|
||||
void OPENSSL_clear_free(void *str, size_t num)
|
||||
void *OPENSSL_memdup(void *data, size_t s);
|
||||
void *OPENSSL_clear_realloc(void *p, size_t old_len, size_t num);
|
||||
void OPENSSL_clear_free(void *str, size_t num);
|
||||
void OPENSSL_cleanse(void *ptr, size_t len);
|
||||
|
||||
void *CRYPTO_malloc(size_t num, const char *file, int line)
|
||||
void *CRYPTO_zalloc(size_t num, const char *file, int line)
|
||||
void *CRYPTO_realloc(void *p, size_t num, const char *file, int line)
|
||||
void CRYPTO_free(void *str, const char *, int)
|
||||
char *CRYPTO_strdup(const char *p, const char *file, int line)
|
||||
char *CRYPTO_strndup(const char *p, size_t num, const char *file, int line)
|
||||
void *CRYPTO_malloc(size_t num, const char *file, int line);
|
||||
void *CRYPTO_zalloc(size_t num, const char *file, int line);
|
||||
void *CRYPTO_realloc(void *p, size_t num, const char *file, int line);
|
||||
void CRYPTO_free(void *str, const char *, int);
|
||||
char *CRYPTO_strdup(const char *p, const char *file, int line);
|
||||
char *CRYPTO_strndup(const char *p, size_t num, const char *file, int line);
|
||||
void *CRYPTO_clear_realloc(void *p, size_t old_len, size_t num,
|
||||
const char *file, int line)
|
||||
const char *file, int line);
|
||||
void CRYPTO_clear_free(void *str, size_t num, const char *, int)
|
||||
|
||||
void CRYPTO_get_mem_functions(
|
||||
void *(**m)(size_t, const char *, int),
|
||||
void *(**r)(void *, size_t, const char *, int),
|
||||
void (**f)(void *, const char *, int))
|
||||
int CRYPTO_set_mem_functions(
|
||||
void *(*m)(size_t, const char *, int),
|
||||
void *(*r)(void *, size_t, const char *, int),
|
||||
void (*f)(void *, const char *, int))
|
||||
typedef void *(*CRYPTO_malloc_fn)(size_t num, const char *file, int line);
|
||||
typedef void *(*CRYPTO_realloc_fn)(void *addr, size_t num, const char *file,
|
||||
int line);
|
||||
typedef void (*CRYPTO_free_fn)(void *addr, const char *file, int line);
|
||||
void CRYPTO_get_mem_functions(CRYPTO_malloc_fn *malloc_fn,
|
||||
CRYPTO_realloc_fn *realloc_fn,
|
||||
CRYPTO_free_fn *free_fn);
|
||||
int CRYPTO_set_mem_functions(CRYPTO_malloc_fn malloc_fn,
|
||||
CRYPTO_realloc_fn realloc_fn,
|
||||
CRYPTO_free_fn free_fn);
|
||||
|
||||
void CRYPTO_get_alloc_counts(int *m, int *r, int *f)
|
||||
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
|
||||
|
||||
env OPENSSL_MALLOC_FAILURES=... <application>
|
||||
env OPENSSL_MALLOC_FD=... <application>
|
||||
@@ -118,7 +121,8 @@ and replace them with alternate versions.
|
||||
CRYPTO_get_mem_functions() function fills in the given arguments with the
|
||||
function pointers for the current implementations.
|
||||
With CRYPTO_set_mem_functions(), you can specify a different set of functions.
|
||||
If any of B<m>, B<r>, or B<f> are NULL, then the function is not changed.
|
||||
If any of B<malloc_fn>, B<realloc_fn>, or B<free_fn> are NULL, then
|
||||
the function is not changed.
|
||||
While it's permitted to swap out only a few and not all the functions
|
||||
with CRYPTO_set_mem_functions(), it's recommended to swap them all out
|
||||
at once.
|
||||
|
||||
@@ -14,7 +14,7 @@ CRYPTO_secure_used - secure heap storage
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
int CRYPTO_secure_malloc_init(size_t size, int minsize);
|
||||
int CRYPTO_secure_malloc_init(size_t size, size_t minsize);
|
||||
|
||||
int CRYPTO_secure_malloc_initialized();
|
||||
|
||||
@@ -126,6 +126,9 @@ L<BN_new(3)>
|
||||
|
||||
The OPENSSL_secure_clear_free() function was added in OpenSSL 1.1.0g.
|
||||
|
||||
The second argument to CRYPTO_secure_malloc_init() was changed from an B<int> to
|
||||
a B<size_t> in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -16,7 +16,6 @@ OSSL_CMP_CTX_set_serverPort,
|
||||
OSSL_CMP_CTX_set1_proxyName,
|
||||
OSSL_CMP_CTX_set_proxyPort,
|
||||
OSSL_CMP_DEFAULT_PORT,
|
||||
OSSL_cmp_http_cb_t,
|
||||
OSSL_CMP_CTX_set_http_cb,
|
||||
OSSL_CMP_CTX_set_http_cb_arg,
|
||||
OSSL_CMP_CTX_get_http_cb_arg,
|
||||
@@ -84,14 +83,11 @@ OSSL_CMP_CTX_set1_senderNonce
|
||||
int OSSL_CMP_CTX_set1_proxyName(OSSL_CMP_CTX *ctx, const char *name);
|
||||
int OSSL_CMP_CTX_set_proxyPort(OSSL_CMP_CTX *ctx, int port);
|
||||
#define OSSL_CMP_DEFAULT_PORT 80
|
||||
typedef BIO *(*OSSL_cmp_http_cb_t)(OSSL_CMP_CTX *ctx, BIO *hbio,
|
||||
unsigned long detail);
|
||||
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_http_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, HTTP_bio_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
typedef int (*OSSL_cmp_transfer_cb_t)(OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
OSSL_CMP_MSG **res);
|
||||
typedef OSSL_CMP_MSG *(*OSSL_cmp_transfer_cb_t)(OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx,
|
||||
OSSL_cmp_transfer_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
@@ -324,22 +320,22 @@ for connecting to the CA server.
|
||||
OSSL_CMP_CTX_set_proxyPort() sets the port of the HTTP proxy.
|
||||
Port defaults to OSSL_CMP_DEFAULT_PORT = 80 if not set explicitly.
|
||||
|
||||
OSSL_CMP_CTX_set_http_cb() sets the optional http connect/disconnect callback
|
||||
OSSL_CMP_CTX_set_http_cb() sets the optional BIO connect/disconnect callback
|
||||
function, which has the prototype
|
||||
|
||||
typedef BIO *(*OSSL_cmp_http_cb_t)(OSSL_CMP_CTX *ctx, BIO *hbio,
|
||||
unsigned long detail);
|
||||
typedef BIO *(*HTTP_bio_cb_t) (BIO *bio, void *ctx, int connect, int detail);
|
||||
|
||||
It may modify the HTTP BIO given in the B<hbio> argument
|
||||
used by OSSL_CMP_MSG_http_perform().
|
||||
On connect the B<detail> argument is 1.
|
||||
On disconnect it is 0 if no error occurred or else the last error code.
|
||||
For instance, on connect a TLS BIO may be prepended to implement HTTPS,
|
||||
and on disconnect some error diagnostics and/or cleanup may be done.
|
||||
The callback function should return NULL to indicate failure.
|
||||
It may make use of a custom defined argument stored in the ctx
|
||||
by means of OSSL_CMP_CTX_set_http_cb_arg(),
|
||||
which may be retrieved again through OSSL_CMP_CTX_get_http_cb_arg().
|
||||
The callback may modify the BIO B<bio> provided by OSSL_CMP_MSG_http_perform(),
|
||||
whereby it may make use of a custom defined argument B<ctx>
|
||||
stored in the OSSL_CMP_CTX by means of OSSL_CMP_CTX_set_http_cb_arg().
|
||||
During connection establishment, just after calling BIO_connect_retry(),
|
||||
the function is invoked with the B<connect> argument being 1 and the B<detail>
|
||||
argument being 1 if HTTPS is requested, i.e., SSL/TLS should be enabled. On
|
||||
disconnect B<connect> is 0 and B<detail> is 1 in case no error occurred, else 0.
|
||||
For instance, on connect the function may prepend a TLS BIO to implement HTTPS;
|
||||
after disconnect it may do some diagnostic output and/or specific cleanup.
|
||||
The function should return NULL to indicate failure.
|
||||
After disconnect the modified BIO will be deallocated using BIO_free_all().
|
||||
|
||||
OSSL_CMP_CTX_set_http_cb_arg() sets an argument, respectively a pointer to
|
||||
a structure containing arguments,
|
||||
@@ -354,18 +350,17 @@ OSSL_CMP_CTX_set_http_cb_arg() or NULL if unset.
|
||||
OSSL_CMP_CTX_set_transfer_cb() sets the message transfer callback function,
|
||||
which has the type
|
||||
|
||||
typedef int (*OSSL_cmp_transfer_cb_t)(const OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
OSSL_CMP_MSG **res);
|
||||
typedef OSSL_CMP_MSG *(*OSSL_cmp_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
|
||||
Returns 1 on success, 0 on error.
|
||||
|
||||
Default is NULL, which implies the use of L<OSSL_CMP_MSG_http_perform(3)>.
|
||||
The callback should send the CMP request it obtains via the B<req> parameter
|
||||
and on success place the response in the B<*res> output parameter.
|
||||
The callback should send the CMP request message it obtains via the B<req>
|
||||
parameter and on success return the response.
|
||||
The transfer callback may make use of a custom defined argument stored in
|
||||
the ctx by means of OSSL_CMP_CTX_set_transfer_cb_arg(), which may be retrieved
|
||||
again through OSSL_CMP_CTX_get_transfer_cb_arg().
|
||||
On success the cb must return 0, else a CMP error reason code defined in cmp.h.
|
||||
|
||||
|
||||
OSSL_CMP_CTX_set_transfer_cb_arg() sets an argument, respectively a pointer to a
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OSSL_HTTP_get,
|
||||
OSSL_HTTP_get_asn1,
|
||||
OSSL_HTTP_post_asn1,
|
||||
OSSL_HTTP_transfer,
|
||||
OSSL_HTTP_bio_cb_t,
|
||||
OSSL_HTTP_proxy_connect,
|
||||
OSSL_HTTP_parse_url
|
||||
- http client functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/http.h>
|
||||
|
||||
typedef BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg,
|
||||
int connect, int detail);
|
||||
BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *proxy_port,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
int maxline, unsigned long max_resp_len, int timeout,
|
||||
const char *expected_content_type, int expect_asn1);
|
||||
ASN1_VALUE *OSSL_HTTP_get_asn1(const char *url,
|
||||
const char *proxy, const char *proxy_port,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
int maxline, unsigned long max_resp_len,
|
||||
int timeout, const char *expected_content_type,
|
||||
const ASN1_ITEM *it);
|
||||
ASN1_VALUE *OSSL_HTTP_post_asn1(const char *server, const char *port,
|
||||
const char *path, int use_ssl,
|
||||
const char *proxy, const char *proxy_port,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
const char *content_type,
|
||||
ASN1_VALUE *req, const ASN1_ITEM *req_it,
|
||||
int maxline, unsigned long max_resp_len,
|
||||
int timeout, const char *expected_ct,
|
||||
const ASN1_ITEM *rsp_it);
|
||||
BIO *OSSL_HTTP_transfer(const char *server, const char *port, const char *path,
|
||||
int use_ssl, const char *proxy, const char *proxy_port,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
const char *content_type, BIO *req_mem,
|
||||
int maxline, unsigned long max_resp_len, int timeout,
|
||||
const char *expected_ct, int expect_asn1,
|
||||
char **redirection_url);
|
||||
int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port,
|
||||
const char *proxyuser, const char *proxypass,
|
||||
int timeout, BIO *bio_err, const char *prog);
|
||||
int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport,
|
||||
char **ppath, int *pssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
OSSL_HTTP_get() uses HTTP GET to obtain data (of any type) from the given B<url>
|
||||
and returns it as a memory BIO.
|
||||
|
||||
OSSL_HTTP_get_asn1() uses HTTP GET to obtain an ASN.1-encoded value
|
||||
(e.g., an X.509 certificate) with the expected structure specified by B<it>
|
||||
(e.g., I<ASN1_ITEM_rptr(X509)>) from the given B<url>
|
||||
and returns it on success as a pointer to I<ASN1_VALUE>.
|
||||
|
||||
OSSL_HTTP_post_asn1() uses the HTTP POST method to send a request B<req>
|
||||
with the ASN.1 structure defined in B<req_it> and the given B<content_type> to
|
||||
the given B<server> and optional B<port> and B<path>, which defaults to "/".
|
||||
If B<use_ssl> is nonzero a TLS connection is requested and the B<bio_update_fn>
|
||||
parameter, described below, must be provided.
|
||||
The optional list B<headers> may contain additional custom HTTP header lines.
|
||||
The expected structure of the response is specified by B<rsp_it>.
|
||||
On success it returns the response as a pointer to B<ASN1_VALUE>.
|
||||
|
||||
OSSL_HTTP_transfer() exchanges an HTTP request and response with
|
||||
the given B<server> and optional B<port> and B<path>, which defaults to "/".
|
||||
If B<use_ssl> is nonzero a TLS connection is requested and the B<bio_update_fn>
|
||||
parameter, described below, must be provided.
|
||||
If B<req_mem> is NULL it uses the HTTP GET method, else it uses HTTP POST to
|
||||
send a request with the contents of the memory BIO and optional B<content_type>.
|
||||
The optional list B<headers> may contain additional custom HTTP header lines.
|
||||
If B<req_mem> is NULL (i.e., the HTTP method is GET) and B<redirection_url>
|
||||
is not NULL the latter pointer is used to provide any new location that
|
||||
the server may return with HTTP code 301 (MOVED_PERMANENTLY) or 302 (FOUND).
|
||||
In this case the caller is responsible for deallocating this URL with
|
||||
L<OPENSSL_free(3)>.
|
||||
|
||||
The above functions have the following parameters in common.
|
||||
|
||||
If the B<proxy> parameter is not NULL the HTTP client functions connect
|
||||
via the given proxy and the optionally given B<proxy_port>.
|
||||
Proxying plain HTTP is supported directly,
|
||||
while using a proxy for HTTPS connections requires a suitable callback function
|
||||
such as OSSL_HTTP_proxy_connect(), described below.
|
||||
|
||||
Typically the B<bio> and B<rbio> parameters are NULL and the client creates a
|
||||
network BIO internally for connecting to the given server and port (optionally
|
||||
via a proxy and its port), and uses it for exchanging the request and response.
|
||||
If B<bio> is given and B<rbio> is NULL then the client uses this BIO instead.
|
||||
If both B<bio> and B<rbio> are given (which may be memory BIOs for instance)
|
||||
then no explicit connection is attempted,
|
||||
B<bio> is used for writing the request, and B<rbio> for reading the response.
|
||||
As soon as the client has flushed B<bio> the server must be ready to provide
|
||||
a response or indicate a waiting condition via B<rbio>.
|
||||
|
||||
The B<maxline> parameter specifies the response header maximum line length,
|
||||
where 0 indicates the default value, which currently is 4k.
|
||||
The B<max_resp_len> parameter specifies the maximum response length,
|
||||
where 0 indicates the default value, which currently is 100k.
|
||||
|
||||
An ASN.1-encoded response is expected by OSSL_HTTP_get_asn1() and
|
||||
OSSL_HTTP_post_asn1(), while for OSSL_HTTP_get() or OSSL_HTTP_transfer()
|
||||
this is only the case if the B<expect_asn1> parameter is nonzero.
|
||||
If the response header contains one or more Content-Length header lines and/or
|
||||
an ASN.1-encoded response is expected, which should include a total length,
|
||||
the length indications received are checked for consistency
|
||||
and for not exceeding the maximum response length.
|
||||
|
||||
If the parameter B<expected_content_type> (or B<expected_ct>, respectively)
|
||||
is not NULL then the HTTP client checks that the given content type string
|
||||
is included in the HTTP header of the response and returns an error if not.
|
||||
|
||||
If the B<timeout> parameter is > 0 this indicates the maximum number of seconds
|
||||
to wait until the transfer is complete.
|
||||
A value of 0 enables waiting indefinitely,
|
||||
while a value < 0 immediately leads to a timeout condition.
|
||||
|
||||
The optional parameter B<bio_update_fn> with its optional argument B<arg> may
|
||||
be used to modify the connection BIO used by the HTTP client (and cannot be
|
||||
used when both B<bio> and B<rbio> are given).
|
||||
B<bio_update_fn> is a BIO connect/disconnect callback function with prototype
|
||||
|
||||
BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg, int connect, int detail)
|
||||
|
||||
The callback may modify the HTTP BIO provided in the B<bio> argument,
|
||||
whereby it may make use of a custom defined argument B<arg>,
|
||||
which may for instance refer to an I<SSL_CTX> structure.
|
||||
During connection establishment, just after calling BIO_connect_retry(),
|
||||
the function is invoked with the B<connect> argument being 1 and the B<detail>
|
||||
argument being 1 if HTTPS is requested, i.e., SSL/TLS should be enabled.
|
||||
On disconnect B<connect> is 0 and B<detail> is 1 if no error occurred, else 0.
|
||||
For instance, on connect the function may prepend a TLS BIO to implement HTTPS;
|
||||
after disconnect it may do some diagnostic output and/or specific cleanup.
|
||||
The function should return NULL to indicate failure.
|
||||
Here is a simple example that supports TLS connections (but not via a proxy):
|
||||
|
||||
BIO *http_tls_cb(BIO *hbio, void *arg, int connect, int detail)
|
||||
{
|
||||
SSL_CTX *ctx = (SSL_CTX *)arg;
|
||||
|
||||
if (connect && detail) { /* connecting with TLS */
|
||||
BIO *sbio = BIO_new_ssl(ctx, 1);
|
||||
hbio = sbio != NULL ? BIO_push(sbio, hbio) : NULL;
|
||||
} else if (!connect && !detail) { /* disconnecting after error */
|
||||
/* optionally add diagnostics here */
|
||||
}
|
||||
return hbio;
|
||||
}
|
||||
|
||||
After disconnect the modified BIO will be deallocated using BIO_free_all().
|
||||
|
||||
OSSL_HTTP_proxy_connect() may be used by an above BIO connect callback function
|
||||
to set up an SSL/TLS connection via an HTTP proxy.
|
||||
It promotes the given BIO B<bio> representing a connection
|
||||
pre-established with a TLS proxy using the HTTP CONNECT method,
|
||||
optionally using proxy client credentials B<proxyuser> and B<proxypass>,
|
||||
to connect with TLS protection ultimately to B<server> and B<port>.
|
||||
The B<timeout> parameter is used as described above.
|
||||
Since this function is typically called by appplications such as
|
||||
L<openssl-s_client(1)> it uses the B<bio_err> and B<prog> parameters (unless
|
||||
NULL) to print additional diagnostic information in a user-oriented way.
|
||||
|
||||
OSSL_HTTP_parse_url() parses its input string B<url> as a URL and splits it up
|
||||
into host, port and path components and a flag whether it begins with 'https'.
|
||||
The host component may be a DNS name or an IPv4 or an IPv6 address.
|
||||
The port component is optional and defaults to "443" for HTTPS, else "80".
|
||||
The path component is also optional and defaults to "/".
|
||||
As far as the result pointer arguments are not NULL it assigns via
|
||||
them copies of the respective string components.
|
||||
The strings returned this way must be deallocated by the caller using
|
||||
L<OPENSSL_free(3)> unless they are NULL, which is their default value on error.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
OSSL_HTTP_get(), OSSL_HTTP_get_asn1(), OSSL_HTTP_post_asn1(), and
|
||||
OSSL_HTTP_transfer() return on success the data received via HTTP, else NULL.
|
||||
Error conditions include connection/transfer timeout, parse errors, etc.
|
||||
|
||||
OSSL_HTTP_proxy_connect() and OSSL_HTTP_parse_url()
|
||||
return 1 on success, 0 on error.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
OSSL_HTTP_get(), OSSL_HTTP_get_asn1(), OSSL_HTTP_post_asn1(),
|
||||
OSSL_HTTP_proxy_connect(), and OSSL_HTTP_parse_url() were added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2019-2020 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
|
||||
@@ -167,7 +167,9 @@ size B<rsize> is created.
|
||||
OSSL_PARAM_construct_utf8_string() is a function that constructs a UTF8
|
||||
string OSSL_PARAM structure.
|
||||
A parameter with name B<key>, storage B<buf> and size B<bsize> is created.
|
||||
If B<bsize> is zero, the string length is determined using strlen(3).
|
||||
If B<bsize> is zero, the string length is determined using strlen(3) + 1 for the
|
||||
null termination byte.
|
||||
Generally pass zero for B<bsize> instead of calling strlen(3) yourself.
|
||||
|
||||
OSSL_PARAM_construct_octet_string() is a function that constructs an OCTET
|
||||
string OSSL_PARAM structure.
|
||||
|
||||
@@ -36,11 +36,11 @@ OSSL_SERIALIZER_Parameters_TO_TEXT_PQ
|
||||
|
||||
#define OSSL_SERIALIZER_PUBKEY_TO_PEM_PQ "format=pem,type=public"
|
||||
#define OSSL_SERIALIZER_PrivateKey_TO_PEM_PQ "format=pem,type=private"
|
||||
#define OSSL_SERIALIZER_Parameters_TO_PEM_PQ "format=pem,type=domainparams"
|
||||
#define OSSL_SERIALIZER_Parameters_TO_PEM_PQ "format=pem,type=parameters"
|
||||
|
||||
#define OSSL_SERIALIZER_PUBKEY_TO_TEXT_PQ "format=text,type=public"
|
||||
#define OSSL_SERIALIZER_PrivateKey_TO_TEXT_PQ "format=text,type=private"
|
||||
#define OSSL_SERIALIZER_Parameters_TO_TEXT_PQ "format=text,type=domainparams"
|
||||
#define OSSL_SERIALIZER_Parameters_TO_TEXT_PQ "format=text,type=parameters"
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=pod
|
||||
|
||||
=for openssl foreign manuals: atexit(3)
|
||||
=for openssl foreign manual atexit(3)
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ is still owned by the B<PKCS12_SAFEBAG> in which it resides.
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<PKCS12_get_friendlyname(3)>,
|
||||
L<PKCS12_get_localkeyid(3)>,
|
||||
L<PKCS12_add_friendlyname_asc(3)>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
PKCS8_pkey_get0_attrs, PKCS8_pkey_add1_attr, PKCS8_pkey_add1_attr_by_NID, PKCS8_pkey_add1_attr_by_OBJ - PKCS8 attribute functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/x509.h>
|
||||
|
||||
const STACK_OF(X509_ATTRIBUTE) *
|
||||
PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8);
|
||||
int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr);
|
||||
int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type,
|
||||
const unsigned char *bytes, int len);
|
||||
int PKCS8_pkey_add1_attr_by_OBJ(PKCS8_PRIV_KEY_INFO *p8, const ASN1_OBJECT *obj,
|
||||
int type, const unsigned char *bytes, int len);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
PKCS8_pkey_get0_attrs() returns a const STACK of X509_ATTRIBUTE present in
|
||||
the passed const PKCS8_PRIV_KEY_INFO structure B<p8>.
|
||||
|
||||
PKCS8_pkey_add1_attr() adds a constructed X509_ATTRIBUTE B<attr> to the
|
||||
existing PKCS8_PRIV_KEY_INFO structure B<p8>.
|
||||
|
||||
PKCS8_pkey_add1_attr_by_NID() and PKCS8_pkey_add1_attr_by_OBJ() construct a new
|
||||
X509_ATTRIBUTE from the passed arguments and add it to the existing
|
||||
PKCS8_PRIV_KEY_INFO structure B<p8>.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
PKCS8_pkey_add1_attr(), PKCS8_pkey_add1_attr_by_NID(), and
|
||||
PKCS8_pkey_add1_attr_by_OBJ() return 1 for success and 0 for failure.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
STACK of X509_ATTRIBUTE is present in many X509-related structures and some of
|
||||
them have the corresponding set of similar functions.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<crypto(7)>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2020 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
|
||||
@@ -3,6 +3,8 @@
|
||||
=head1 NAME
|
||||
|
||||
RAND_DRBG_set_callbacks,
|
||||
RAND_DRBG_set_callback_data,
|
||||
RAND_DRBG_get_callback_data,
|
||||
RAND_DRBG_get_entropy_fn,
|
||||
RAND_DRBG_cleanup_entropy_fn,
|
||||
RAND_DRBG_get_nonce_fn,
|
||||
@@ -20,6 +22,9 @@ RAND_DRBG_cleanup_nonce_fn
|
||||
RAND_DRBG_get_nonce_fn get_nonce,
|
||||
RAND_DRBG_cleanup_nonce_fn cleanup_nonce);
|
||||
|
||||
int RAND_DRBG_set_callback_data(RAND_DRBG *drbg, void *ctx);
|
||||
|
||||
void *RAND_DRBG_get_callback_data(RAND_DRBG *drbg);
|
||||
|
||||
=head2 Callback Functions
|
||||
|
||||
@@ -53,7 +58,16 @@ the nonce when reseeding the given B<drbg>.
|
||||
The callback functions are implemented and provided by the caller.
|
||||
Their parameter lists need to match the function prototypes above.
|
||||
|
||||
Setting the callbacks is allowed only if the DRBG has not been initialized yet.
|
||||
RAND_DRBG_set_callback_data() can be used to store a pointer to some context
|
||||
specific data, which can subsequently be retrieved by the entropy and nonce
|
||||
callbacks using RAND_DRBG_get_callback_data().
|
||||
The ownership of the context data remains with the caller, i.e., it is the
|
||||
caller's responsibility to keep it available as long as it is needed by the
|
||||
callbacks and free it after use.
|
||||
For more information about the the callback data see the NOTES section.
|
||||
|
||||
Setting the callbacks or the callback data is allowed only if the DRBG has
|
||||
not been initialized yet.
|
||||
Otherwise, the operation will fail.
|
||||
To change the settings for one of the three shared DRBGs it is necessary to call
|
||||
RAND_DRBG_uninstantiate() first.
|
||||
@@ -95,7 +109,12 @@ setting them to NULL.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
RAND_DRBG_set_callbacks() return 1 on success, and 0 on failure
|
||||
RAND_DRBG_set_callbacks() returns 1 on success, and 0 on failure.
|
||||
|
||||
RAND_DRBG_set_callback_data() returns 1 on success, and 0 on failure.
|
||||
|
||||
RAND_DRBG_get_callback_data() returns the pointer to the callback data,
|
||||
which is NULL if none has been set previously.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -121,6 +140,14 @@ In this case the DRBG will automatically request an extra amount of entropy
|
||||
utilize for the nonce, following the recommendations of [NIST SP 800-90A Rev. 1],
|
||||
section 8.6.7.
|
||||
|
||||
The callback data is a rather specialized feature, because in general the
|
||||
random sources don't (and in fact, they must not) depend on any state provided
|
||||
by the DRBG.
|
||||
There are however exceptional cases where this feature is useful, most notably
|
||||
for implementing known answer tests (KATs) or deterministic signatures like
|
||||
those specified in RFC6979, which require passing a specified entropy and nonce
|
||||
for instantiating the DRBG.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<RAND_DRBG_new(3)>,
|
||||
|
||||
@@ -58,7 +58,7 @@ if an error occurred. The error can be obtained from ERR_get_error(3).
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<ERR_get_error(3)>, L<CMS_type(3)>,
|
||||
L<ERR_get_error(3)>,
|
||||
L<SMIME_read_CMS(3)>, L<CMS_sign(3)>,
|
||||
L<CMS_verify(3)>, L<CMS_encrypt(3)>,
|
||||
L<CMS_decrypt(3)>
|
||||
|
||||
+185
-174
@@ -9,168 +9,38 @@ SSL_CONF_cmd - send configuration command
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value);
|
||||
int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd);
|
||||
int SSL_CONF_cmd(SSL_CONF_CTX *ctx, const char *option, const char *value);
|
||||
int SSL_CONF_cmd_value_type(SSL_CONF_CTX *ctx, const char *option);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The function SSL_CONF_cmd() performs configuration operation B<cmd> with
|
||||
The function SSL_CONF_cmd() performs configuration operation B<option> with
|
||||
optional parameter B<value> on B<ctx>. Its purpose is to simplify application
|
||||
configuration of B<SSL_CTX> or B<SSL> structures by providing a common
|
||||
framework for command line options or configuration files.
|
||||
|
||||
SSL_CONF_cmd_value_type() returns the type of value that B<cmd> refers to.
|
||||
SSL_CONF_cmd_value_type() returns the type of value that B<option> refers to.
|
||||
|
||||
=head1 SUPPORTED COMMAND LINE COMMANDS
|
||||
|
||||
Currently supported B<cmd> names for command lines (i.e. when the
|
||||
flag B<SSL_CONF_CMDLINE> is set) are listed below. Note: all B<cmd> names
|
||||
Currently supported B<option> names for command lines (i.e. when the
|
||||
flag B<SSL_CONF_CMDLINE> is set) are listed below. Note: all B<option> names
|
||||
are case sensitive. Unless otherwise stated commands can be used by
|
||||
both clients and servers and the B<value> parameter is not used. The default
|
||||
prefix for command line commands is B<-> and that is reflected below.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-sigalgs>
|
||||
|
||||
This sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
|
||||
For clients this
|
||||
value is used directly for the supported signature algorithms extension. For
|
||||
servers it is used to determine which signature algorithms to support.
|
||||
|
||||
The B<value> argument should be a colon separated list of signature algorithms
|
||||
in order of decreasing preference of the form B<algorithm+hash> or
|
||||
B<signature_scheme>. B<algorithm>
|
||||
is one of B<RSA>, B<DSA> or B<ECDSA> and B<hash> is a supported algorithm
|
||||
OID short name such as B<SHA1>, B<SHA224>, B<SHA256>, B<SHA384> of B<SHA512>.
|
||||
Note: algorithm and hash names are case sensitive.
|
||||
B<signature_scheme> is one of the signature schemes defined in TLSv1.3,
|
||||
specified using the IETF name, e.g., B<ecdsa_secp256r1_sha256>, B<ed25519>,
|
||||
or B<rsa_pss_pss_sha256>.
|
||||
|
||||
If this option is not set then all signature algorithms supported by the
|
||||
OpenSSL library are permissible.
|
||||
|
||||
Note: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
|
||||
using B<RSA> as the B<algorithm> or by using one of the B<rsa_pkcs1_*>
|
||||
identifiers) are ignored in TLSv1.3 and will not be negotiated.
|
||||
|
||||
=item B<-client_sigalgs>
|
||||
|
||||
This sets the supported signature algorithms associated with client
|
||||
authentication for TLSv1.2 and TLSv1.3.
|
||||
For servers the value is used in the
|
||||
B<signature_algorithms> field of a B<CertificateRequest> message.
|
||||
For clients it is
|
||||
used to determine which signature algorithm to use with the client certificate.
|
||||
If a server does not request a certificate this option has no effect.
|
||||
|
||||
The syntax of B<value> is identical to B<-sigalgs>. If not set then
|
||||
the value set for B<-sigalgs> will be used instead.
|
||||
|
||||
=item B<-groups>
|
||||
|
||||
This sets the supported groups. For clients, the groups are
|
||||
sent using the supported groups extension. For servers, it is used
|
||||
to determine which group to use. This setting affects groups used for
|
||||
signatures (in TLSv1.2 and earlier) and key exchange. The first group listed
|
||||
will also be used for the B<key_share> sent by a client in a TLSv1.3
|
||||
B<ClientHello>.
|
||||
|
||||
The B<value> argument is a colon separated list of groups. The group can be
|
||||
either the B<NIST> name (e.g. B<P-256>), some other commonly used name where
|
||||
applicable (e.g. B<X25519>, B<ffdhe2048>) or an OpenSSL OID name
|
||||
(e.g B<prime256v1>). Group names are case sensitive. The list should be in
|
||||
order of preference with the most preferred group first.
|
||||
|
||||
Currently supported groups for B<TLSv1.3> are B<P-256>, B<P-384>, B<P-521>,
|
||||
B<X25519>, B<X448>, B<ffdhe2048>, B<ffdhe3072>, B<ffdhe4096>, B<ffdhe6144>,
|
||||
B<ffdhe8192>.
|
||||
|
||||
=item B<-curves>
|
||||
|
||||
This is a synonym for the "-groups" command.
|
||||
|
||||
=item B<-named_curve>
|
||||
|
||||
This sets the temporary curve used for ephemeral ECDH modes. Only used by
|
||||
servers
|
||||
|
||||
The B<value> argument is a curve name or the special value B<auto> which
|
||||
picks an appropriate curve based on client and server preferences. The curve
|
||||
can be either the B<NIST> name (e.g. B<P-256>) or an OpenSSL OID name
|
||||
(e.g B<prime256v1>). Curve names are case sensitive.
|
||||
|
||||
=item B<-cipher>
|
||||
|
||||
Sets the TLSv1.2 and below ciphersuite list to B<value>. This list will be
|
||||
combined with any configured TLSv1.3 ciphersuites. Note: syntax checking
|
||||
of B<value> is currently not performed unless a B<SSL> or B<SSL_CTX> structure is
|
||||
associated with B<cctx>.
|
||||
|
||||
=item B<-ciphersuites>
|
||||
|
||||
Sets the available ciphersuites for TLSv1.3 to value. This is a simple colon
|
||||
(":") separated list of TLSv1.3 ciphersuite names in order of preference. This
|
||||
list will be combined any configured TLSv1.2 and below ciphersuites.
|
||||
See L<openssl-ciphers(1)> for more information.
|
||||
|
||||
|
||||
=item B<-cert>
|
||||
|
||||
Attempts to use the file B<value> as the certificate for the appropriate
|
||||
context. It currently uses SSL_CTX_use_certificate_chain_file() if an B<SSL_CTX>
|
||||
structure is set or SSL_use_certificate_file() with filetype PEM if an B<SSL>
|
||||
structure is set. This option is only supported if certificate operations
|
||||
are permitted.
|
||||
|
||||
=item B<-key>
|
||||
|
||||
Attempts to use the file B<value> as the private key for the appropriate
|
||||
context. This option is only supported if certificate operations
|
||||
are permitted. Note: if no B<-key> option is set then a private key is
|
||||
not loaded unless the flag B<SSL_CONF_FLAG_REQUIRE_PRIVATE> is set.
|
||||
|
||||
=item B<-dhparam>
|
||||
|
||||
Attempts to use the file B<value> as the set of temporary DH parameters for
|
||||
the appropriate context. This option is only supported if certificate
|
||||
operations are permitted.
|
||||
|
||||
=item B<-record_padding>
|
||||
|
||||
Attempts to pad TLSv1.3 records so that they are a multiple of B<value> in
|
||||
length on send. A B<value> of 0 or 1 turns off padding. Otherwise, the
|
||||
B<value> must be >1 or <=16384.
|
||||
|
||||
=item B<-no_renegotiation>
|
||||
|
||||
Disables all attempts at renegotiation in TLSv1.2 and earlier, same as setting
|
||||
B<SSL_OP_NO_RENEGOTIATION>.
|
||||
|
||||
=item B<-min_protocol>, B<-max_protocol>
|
||||
|
||||
Sets the minimum and maximum supported protocol.
|
||||
Currently supported protocol values are B<SSLv3>, B<TLSv1>,
|
||||
B<TLSv1.1>, B<TLSv1.2>, B<TLSv1.3> for TLS and B<DTLSv1>, B<DTLSv1.2> for DTLS,
|
||||
and B<None> for no limit.
|
||||
If either bound is not specified then only the other bound applies,
|
||||
if specified.
|
||||
To restrict the supported protocol versions use these commands rather
|
||||
than the deprecated alternative commands below.
|
||||
|
||||
=item B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3>
|
||||
|
||||
Disables protocol support for SSLv3, TLSv1.0, TLSv1.1, TLSv1.2 or TLSv1.3 by
|
||||
setting the corresponding options B<SSL_OP_NO_SSLv3>, B<SSL_OP_NO_TLSv1>,
|
||||
B<SSL_OP_NO_TLSv1_1>, B<SSL_OP_NO_TLSv1_2> and B<SSL_OP_NO_TLSv1_3>
|
||||
respectively. These options are deprecated, instead use B<-min_protocol> and
|
||||
B<-max_protocol>.
|
||||
|
||||
=item B<-bugs>
|
||||
|
||||
Various bug workarounds are set, same as setting B<SSL_OP_ALL>.
|
||||
|
||||
=item B<-no_comp>
|
||||
|
||||
Disables support for SSL/TLS compression, same as setting
|
||||
B<SSL_OP_NO_COMPRESSION>.
|
||||
As of OpenSSL 1.1.0, compression is off by default.
|
||||
|
||||
=item B<-comp>
|
||||
|
||||
Enables support for SSL/TLS compression, same as clearing
|
||||
@@ -178,12 +48,6 @@ B<SSL_OP_NO_COMPRESSION>.
|
||||
This command was introduced in OpenSSL 1.1.0.
|
||||
As of OpenSSL 1.1.0, compression is off by default.
|
||||
|
||||
=item B<-no_comp>
|
||||
|
||||
Disables support for SSL/TLS compression, same as setting
|
||||
B<SSL_OP_NO_COMPRESSION>.
|
||||
As of OpenSSL 1.1.0, compression is off by default.
|
||||
|
||||
=item B<-no_ticket>
|
||||
|
||||
Disables support for session tickets, same as setting B<SSL_OP_NO_TICKET>.
|
||||
@@ -194,28 +58,33 @@ Use server and not client preference order when determining which cipher suite,
|
||||
signature algorithm or elliptic curve to use for an incoming connection.
|
||||
Equivalent to B<SSL_OP_CIPHER_SERVER_PREFERENCE>. Only used by servers.
|
||||
|
||||
=item B<-prioritize_chacha>
|
||||
|
||||
Prioritize ChaCha ciphers when the client has a ChaCha20 cipher at the top of
|
||||
its preference list. This usually indicates a client without AES hardware
|
||||
acceleration (e.g. mobile) is in use. Equivalent to B<SSL_OP_PRIORITIZE_CHACHA>.
|
||||
Only used by servers. Requires B<-serverpref>.
|
||||
|
||||
=item B<-no_resumption_on_reneg>
|
||||
|
||||
set SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION flag. Only used by servers.
|
||||
|
||||
=item B<-legacyrenegotiation>
|
||||
|
||||
permits the use of unsafe legacy renegotiation. Equivalent to setting
|
||||
B<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION>.
|
||||
|
||||
=item B<-no_renegotiation>
|
||||
|
||||
Disables all attempts at renegotiation in TLSv1.2 and earlier, same as setting
|
||||
B<SSL_OP_NO_RENEGOTIATION>.
|
||||
|
||||
=item B<-no_resumption_on_reneg>
|
||||
|
||||
set SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION flag. Only used by servers.
|
||||
|
||||
=item B<-legacy_server_connect>, B<-no_legacy_server_connect>
|
||||
|
||||
permits or prohibits the use of unsafe legacy renegotiation for OpenSSL
|
||||
clients only. Equivalent to setting or clearing B<SSL_OP_LEGACY_SERVER_CONNECT>.
|
||||
Set by default.
|
||||
|
||||
=item B<-prioritize_chacha>
|
||||
|
||||
Prioritize ChaCha ciphers when the client has a ChaCha20 cipher at the top of
|
||||
its preference list. This usually indicates a client without AES hardware
|
||||
acceleration (e.g. mobile) is in use. Equivalent to B<SSL_OP_PRIORITIZE_CHACHA>.
|
||||
Only used by servers. Requires B<-serverpref>.
|
||||
|
||||
=item B<-allow_no_dhe_kex>
|
||||
|
||||
In TLSv1.3 allow a non-(ec)dhe based key exchange mode on resumption. This means
|
||||
@@ -226,6 +95,148 @@ that there will be no forward secrecy for the resumed session.
|
||||
enables strict mode protocol handling. Equivalent to setting
|
||||
B<SSL_CERT_FLAG_TLS_STRICT>.
|
||||
|
||||
=item B<-sigalgs> I<algs>
|
||||
|
||||
This sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
|
||||
For clients this value is used directly for the supported signature
|
||||
algorithms extension. For servers it is used to determine which signature
|
||||
algorithms to support.
|
||||
|
||||
The B<algs> argument should be a colon separated list of signature
|
||||
algorithms in order of decreasing preference of the form B<algorithm+hash>
|
||||
or B<signature_scheme>. B<algorithm> is one of B<RSA>, B<DSA> or B<ECDSA> and
|
||||
B<hash> is a supported algorithm OID short name such as B<SHA1>, B<SHA224>,
|
||||
B<SHA256>, B<SHA384> of B<SHA512>. Note: algorithm and hash names are case
|
||||
sensitive. B<signature_scheme> is one of the signature schemes defined in
|
||||
TLSv1.3, specified using the IETF name, e.g., B<ecdsa_secp256r1_sha256>,
|
||||
B<ed25519>, or B<rsa_pss_pss_sha256>.
|
||||
|
||||
If this option is not set then all signature algorithms supported by the
|
||||
OpenSSL library are permissible.
|
||||
|
||||
Note: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
|
||||
using B<RSA> as the B<algorithm> or by using one of the B<rsa_pkcs1_*>
|
||||
identifiers) are ignored in TLSv1.3 and will not be negotiated.
|
||||
|
||||
=item B<-client_sigalgs> I<algs>
|
||||
|
||||
This sets the supported signature algorithms associated with client
|
||||
authentication for TLSv1.2 and TLSv1.3. For servers the B<algs> is used
|
||||
in the B<signature_algorithms> field of a B<CertificateRequest> message.
|
||||
For clients it is used to determine which signature algorithm to use with
|
||||
the client certificate. If a server does not request a certificate this
|
||||
option has no effect.
|
||||
|
||||
The syntax of B<algs> is identical to B<-sigalgs>. If not set, then the
|
||||
value set for B<-sigalgs> will be used instead.
|
||||
|
||||
=item B<-groups> I<groups>
|
||||
|
||||
This sets the supported groups. For clients, the groups are sent using
|
||||
the supported groups extension. For servers, it is used to determine which
|
||||
group to use. This setting affects groups used for signatures (in TLSv1.2
|
||||
and earlier) and key exchange. The first group listed will also be used
|
||||
for the B<key_share> sent by a client in a TLSv1.3 B<ClientHello>.
|
||||
|
||||
The B<groups> argument is a colon separated list of groups. The group can
|
||||
be either the B<NIST> name (e.g. B<P-256>), some other commonly used name
|
||||
where applicable (e.g. B<X25519>, B<ffdhe2048>) or an OpenSSL OID name
|
||||
(e.g B<prime256v1>). Group names are case sensitive. The list should be
|
||||
in order of preference with the most preferred group first.
|
||||
|
||||
Currently supported groups for B<TLSv1.3> are B<P-256>, B<P-384>, B<P-521>,
|
||||
B<X25519>, B<X448>, B<ffdhe2048>, B<ffdhe3072>, B<ffdhe4096>, B<ffdhe6144>,
|
||||
B<ffdhe8192>.
|
||||
|
||||
=item B<-curves> I<groups>
|
||||
|
||||
This is a synonym for the B<-groups> command.
|
||||
|
||||
=item B<-named_curve> I<curve>
|
||||
|
||||
This sets the temporary curve used for ephemeral ECDH modes. Only used
|
||||
by servers.
|
||||
|
||||
The B<groups> argument is a curve name or the special value B<auto> which
|
||||
picks an appropriate curve based on client and server preferences. The
|
||||
curve can be either the B<NIST> name (e.g. B<P-256>) or an OpenSSL OID name
|
||||
(e.g B<prime256v1>). Curve names are case sensitive.
|
||||
|
||||
=item B<-cipher> I<ciphers>
|
||||
|
||||
Sets the TLSv1.2 and below ciphersuite list to B<ciphers>. This list will be
|
||||
combined with any configured TLSv1.3 ciphersuites. Note: syntax checking
|
||||
of B<ciphers> is currently not performed unless a B<SSL> or B<SSL_CTX>
|
||||
structure is associated with B<ctx>.
|
||||
|
||||
=item B<-ciphersuites> I<1.3ciphers>
|
||||
|
||||
Sets the available ciphersuites for TLSv1.3 to value. This is a
|
||||
colon-separated list of TLSv1.3 ciphersuite names in order of preference. This
|
||||
list will be combined any configured TLSv1.2 and below ciphersuites.
|
||||
See L<openssl-ciphers(1)> for more information.
|
||||
|
||||
=item B<-min_protocol> I<minprot>, B<-max_protocol> I<maxprot>
|
||||
|
||||
Sets the minimum and maximum supported protocol. Currently supported
|
||||
protocol values are B<SSLv3>, B<TLSv1>, B<TLSv1.1>, B<TLSv1.2>, B<TLSv1.3>
|
||||
for TLS and B<DTLSv1>, B<DTLSv1.2> for DTLS, and B<None> for no limit.
|
||||
If either bound is not specified then only the other bound applies,
|
||||
if specified. To restrict the supported protocol versions use these
|
||||
commands rather than the deprecated alternative commands below.
|
||||
|
||||
=item B<-record_padding> I<padding>
|
||||
|
||||
Attempts to pad TLSv1.3 records so that they are a multiple of B<padding>
|
||||
in length on send. A B<padding> of 0 or 1 turns off padding. Otherwise,
|
||||
the B<padding> must be >1 or <=16384.
|
||||
|
||||
=item B<-debug_broken_protocol>
|
||||
|
||||
Ignored.
|
||||
|
||||
=item B<-no_middlebox>
|
||||
|
||||
Turn off "middlebox compatibility", as described below.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Additional Options
|
||||
|
||||
The following options are accepted by SSL_CONF_cmd(), but are not
|
||||
processed by the OpenSSL commands.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<-cert> I<file>
|
||||
|
||||
Attempts to use B<file> as the certificate for the appropriate context. It
|
||||
currently uses SSL_CTX_use_certificate_chain_file() if an B<SSL_CTX>
|
||||
structure is set or SSL_use_certificate_file() with filetype PEM if an
|
||||
B<SSL> structure is set. This option is only supported if certificate
|
||||
operations are permitted.
|
||||
|
||||
=item B<-key> I<file>
|
||||
|
||||
Attempts to use B<file> as the private key for the appropriate context. This
|
||||
option is only supported if certificate operations are permitted. Note:
|
||||
if no B<-key> option is set then a private key is not loaded unless the
|
||||
flag B<SSL_CONF_FLAG_REQUIRE_PRIVATE> is set.
|
||||
|
||||
=item B<-dhparam> I<file>
|
||||
|
||||
Attempts to use B<file> as the set of temporary DH parameters for
|
||||
the appropriate context. This option is only supported if certificate
|
||||
operations are permitted.
|
||||
|
||||
=item B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3>
|
||||
|
||||
Disables protocol support for SSLv3, TLSv1.0, TLSv1.1, TLSv1.2 or TLSv1.3 by
|
||||
setting the corresponding options B<SSL_OP_NO_SSLv3>, B<SSL_OP_NO_TLSv1>,
|
||||
B<SSL_OP_NO_TLSv1_1>, B<SSL_OP_NO_TLSv1_2> and B<SSL_OP_NO_TLSv1_3>
|
||||
respectively. These options are deprecated, use B<-min_protocol> and
|
||||
B<-max_protocol> instead.
|
||||
|
||||
=item B<-anti_replay>, B<-no_anti_replay>
|
||||
|
||||
Switches replay protection, on or off respectively. With replay protection on,
|
||||
@@ -242,13 +253,13 @@ required. Switching off anti-replay is equivalent to B<SSL_OP_NO_ANTI_REPLAY>.
|
||||
|
||||
=head1 SUPPORTED CONFIGURATION FILE COMMANDS
|
||||
|
||||
Currently supported B<cmd> names for configuration files (i.e. when the
|
||||
Currently supported B<option> names for configuration files (i.e., when the
|
||||
flag B<SSL_CONF_FLAG_FILE> is set) are listed below. All configuration file
|
||||
B<cmd> names are case insensitive so B<signaturealgorithms> is recognised
|
||||
B<option> names are case insensitive so B<signaturealgorithms> is recognised
|
||||
as well as B<SignatureAlgorithms>. Unless otherwise stated the B<value> names
|
||||
are also case insensitive.
|
||||
|
||||
Note: the command prefix (if set) alters the recognised B<cmd> values.
|
||||
Note: the command prefix (if set) alters the recognised B<option> values.
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -257,12 +268,12 @@ Note: the command prefix (if set) alters the recognised B<cmd> values.
|
||||
Sets the ciphersuite list for TLSv1.2 and below to B<value>. This list will be
|
||||
combined with any configured TLSv1.3 ciphersuites. Note: syntax
|
||||
checking of B<value> is currently not performed unless an B<SSL> or B<SSL_CTX>
|
||||
structure is associated with B<cctx>.
|
||||
structure is associated with B<ctx>.
|
||||
|
||||
=item B<Ciphersuites>
|
||||
|
||||
Sets the available ciphersuites for TLSv1.3 to B<value>. This is a simple colon
|
||||
(":") separated list of TLSv1.3 ciphersuite names in order of preference. This
|
||||
Sets the available ciphersuites for TLSv1.3 to B<value>. This is a
|
||||
colon-separated list of TLSv1.3 ciphersuite names in order of preference. This
|
||||
list will be combined any configured TLSv1.2 and below ciphersuites.
|
||||
See L<openssl-ciphers(1)> for more information.
|
||||
|
||||
@@ -540,7 +551,7 @@ types:
|
||||
|
||||
=item B<SSL_CONF_TYPE_UNKNOWN>
|
||||
|
||||
The B<cmd> string is unrecognised, this return value can be use to flag
|
||||
The B<option> string is unrecognised, this return value can be use to flag
|
||||
syntax errors.
|
||||
|
||||
=item B<SSL_CONF_TYPE_STRING>
|
||||
@@ -580,7 +591,7 @@ SSLv3 is B<always> disabled and attempt to override this by the user are
|
||||
ignored.
|
||||
|
||||
By checking the return code of SSL_CONF_cmd() it is possible to query if a
|
||||
given B<cmd> is recognised, this is useful if SSL_CONF_cmd() values are
|
||||
given B<option> is recognised, this is useful if SSL_CONF_cmd() values are
|
||||
mixed with additional application specific operations.
|
||||
|
||||
For example an application might call SSL_CONF_cmd() and if it returns
|
||||
@@ -590,12 +601,12 @@ commands.
|
||||
Applications can also use SSL_CONF_cmd() to process command lines though the
|
||||
utility function SSL_CONF_cmd_argv() is normally used instead. One way
|
||||
to do this is to set the prefix to an appropriate value using
|
||||
SSL_CONF_CTX_set1_prefix(), pass the current argument to B<cmd> and the
|
||||
SSL_CONF_CTX_set1_prefix(), pass the current argument to B<option> and the
|
||||
following argument to B<value> (which may be NULL).
|
||||
|
||||
In this case if the return value is positive then it is used to skip that
|
||||
number of arguments as they have been processed by SSL_CONF_cmd(). If -2 is
|
||||
returned then B<cmd> is not recognised and application specific arguments
|
||||
returned then B<option> is not recognised and application specific arguments
|
||||
can be checked instead. If -3 is returned a required argument is missing
|
||||
and an error is indicated. If 0 is returned some other error occurred and
|
||||
this can be reported back to the user.
|
||||
@@ -608,17 +619,17 @@ pathname to an absolute pathname.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
SSL_CONF_cmd() returns 1 if the value of B<cmd> is recognised and B<value> is
|
||||
B<NOT> used and 2 if both B<cmd> and B<value> are used. In other words it
|
||||
SSL_CONF_cmd() returns 1 if the value of B<option> is recognised and B<value> is
|
||||
B<NOT> used and 2 if both B<option> and B<value> are used. In other words it
|
||||
returns the number of arguments processed. This is useful when processing
|
||||
command lines.
|
||||
|
||||
A return value of -2 means B<cmd> is not recognised.
|
||||
A return value of -2 means B<option> is not recognised.
|
||||
|
||||
A return value of -3 means B<cmd> is recognised and the command requires a
|
||||
A return value of -3 means B<option> is recognised and the command requires a
|
||||
value but B<value> is NULL.
|
||||
|
||||
A return code of 0 indicates that both B<cmd> and B<value> are valid but an
|
||||
A return code of 0 indicates that both B<option> and B<value> are valid but an
|
||||
error occurred attempting to perform the operation: for example due to an
|
||||
error in the syntax of B<value> in this case the error queue may provide
|
||||
additional information.
|
||||
|
||||
+30
-16
@@ -3,13 +3,14 @@
|
||||
=head1 NAME
|
||||
|
||||
TLSv1_2_method, TLSv1_2_server_method, TLSv1_2_client_method,
|
||||
SSL_CTX_new, SSL_CTX_up_ref, SSLv3_method, SSLv3_server_method,
|
||||
SSLv3_client_method, TLSv1_method, TLSv1_server_method, TLSv1_client_method,
|
||||
TLSv1_1_method, TLSv1_1_server_method, TLSv1_1_client_method, TLS_method,
|
||||
TLS_server_method, TLS_client_method, SSLv23_method, SSLv23_server_method,
|
||||
SSLv23_client_method, DTLS_method, DTLS_server_method, DTLS_client_method,
|
||||
DTLSv1_method, DTLSv1_server_method, DTLSv1_client_method,
|
||||
DTLSv1_2_method, DTLSv1_2_server_method, DTLSv1_2_client_method
|
||||
SSL_CTX_new, SSL_CTX_new_with_libctx, SSL_CTX_up_ref, SSLv3_method,
|
||||
SSLv3_server_method, SSLv3_client_method, TLSv1_method, TLSv1_server_method,
|
||||
TLSv1_client_method, TLSv1_1_method, TLSv1_1_server_method,
|
||||
TLSv1_1_client_method, TLS_method, TLS_server_method, TLS_client_method,
|
||||
SSLv23_method, SSLv23_server_method, SSLv23_client_method, DTLS_method,
|
||||
DTLS_server_method, DTLS_client_method, DTLSv1_method, DTLSv1_server_method,
|
||||
DTLSv1_client_method, DTLSv1_2_method, DTLSv1_2_server_method,
|
||||
DTLSv1_2_client_method
|
||||
- create a new SSL_CTX object as framework for TLS/SSL or DTLS enabled
|
||||
functions
|
||||
|
||||
@@ -17,6 +18,8 @@ functions
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
SSL_CTX *SSL_CTX_new_with_libctx(OPENSSL_CTX *libctx, const char *propq,
|
||||
const SSL_METHOD *method);
|
||||
SSL_CTX *SSL_CTX_new(const SSL_METHOD *method);
|
||||
int SSL_CTX_up_ref(SSL_CTX *ctx);
|
||||
|
||||
@@ -70,20 +73,29 @@ functions
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_CTX_new() creates a new B<SSL_CTX> object as framework to
|
||||
establish TLS/SSL or DTLS enabled connections. An B<SSL_CTX> object is
|
||||
reference counted. Creating an B<SSL_CTX> object for the first time increments
|
||||
the reference count. Freeing it (using SSL_CTX_free) decrements it. When the
|
||||
reference count drops to zero, any memory or resources allocated to the
|
||||
B<SSL_CTX> object are freed. SSL_CTX_up_ref() increments the reference count for
|
||||
an existing B<SSL_CTX> structure.
|
||||
SSL_CTX_new_with_libctx() creates a new B<SSL_CTX> object as a framework to
|
||||
establish TLS/SSL or DTLS enabled connections using the library context
|
||||
I<libctx> (see L<OPENSSL_CTX(3)>). Any cryptographic algorithms that are used
|
||||
by any B<SSL> objects created from this B<SSL_CTX> will be fetched from the
|
||||
I<libctx> using the property query string I<propq> (see
|
||||
L<provider(7)/Fetching algorithms>. Either or both the I<libctx> or I<propq>
|
||||
parameters may be NULL.
|
||||
|
||||
SSL_CTX_new() does the same as SSL_CTX_new_with_libctx() except that the default
|
||||
library context is used and no property query string is specified.
|
||||
|
||||
An B<SSL_CTX> object is reference counted. Creating an B<SSL_CTX> object for the
|
||||
first time increments the reference count. Freeing the B<SSL_CTX> (using
|
||||
SSL_CTX_free) decrements it. When the reference count drops to zero, any memory
|
||||
or resources allocated to the B<SSL_CTX> object are freed. SSL_CTX_up_ref()
|
||||
increments the reference count for an existing B<SSL_CTX> structure.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The SSL_CTX object uses B<method> as connection method.
|
||||
The SSL_CTX object uses I<method> as the connection method.
|
||||
The methods exist in a generic type (for client and server use), a server only
|
||||
type, and a client only type.
|
||||
B<method> can be of the following types:
|
||||
B<method> can be one of the following types:
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -212,6 +224,8 @@ and TLS_client_method() functions were added in OpenSSL 1.1.0.
|
||||
|
||||
All version-specific methods were deprecated in OpenSSL 1.1.0.
|
||||
|
||||
SSL_CTX_new_with_libctx() was added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -69,7 +69,7 @@ sufficient to allow the connection to continue.
|
||||
The TLS handshake is aborted if the verification mode is not B<SSL_VERIFY_NONE>
|
||||
and the callback returns a non-positive result.
|
||||
|
||||
An arbitrary callback context argument, B<arg>, can be passed in when setting
|
||||
An arbitrary callback data argument, B<arg>, can be passed in when setting
|
||||
the callback.
|
||||
This will be passed to the callback whenever it is invoked.
|
||||
Ownership of this context remains with the caller.
|
||||
|
||||
@@ -11,7 +11,7 @@ SSL_set_tlsext_host_name - handle server name indication (SNI)
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
long SSL_CTX_set_tlsext_servername_callback(SSL_CTX *ctx,
|
||||
int (*cb)(SSL *, int *, void *));
|
||||
int (*cb)(SSL *s, int *al, void *arg));
|
||||
long SSL_CTX_set_tlsext_servername_arg(SSL_CTX *ctx, void *arg);
|
||||
|
||||
const char *SSL_get_servername(const SSL *s, const int type);
|
||||
@@ -21,21 +21,106 @@ SSL_set_tlsext_host_name - handle server name indication (SNI)
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The functionality provided by the servername callback is superseded by the
|
||||
ClientHello callback, which can be set using SSL_CTX_set_client_hello_cb().
|
||||
The servername callback is retained for historical compatibility.
|
||||
The functionality provided by the servername callback is mostly superseded by
|
||||
the ClientHello callback, which can be set using SSL_CTX_set_client_hello_cb().
|
||||
However, even where the ClientHello callback is used, the servername callback is
|
||||
still necessary in order to acknowledge the servername requested by the client.
|
||||
|
||||
SSL_CTX_set_tlsext_servername_callback() sets the application callback B<cb>
|
||||
used by a server to perform any actions or configuration required based on
|
||||
the servername extension received in the incoming connection. When B<cb>
|
||||
is NULL, SNI is not used. The B<arg> value is a pointer which is passed to
|
||||
the application callback.
|
||||
is NULL, SNI is not used.
|
||||
|
||||
The servername callback should return one of the following values:
|
||||
|
||||
=over 4
|
||||
|
||||
=item SSL_TLSEXT_ERR_OK
|
||||
|
||||
This is used to indicate that the servername requested by the client has been
|
||||
accepted. Typically a server will call SSL_set_SSL_CTX() in the callback to set
|
||||
up a different configuration for the selected servername in this case.
|
||||
|
||||
=item SSL_TLSEXT_ERR_ALERT_FATAL
|
||||
|
||||
In this case the servername requested by the client is not accepted and the
|
||||
handshake will be aborted. The value of the alert to be used should be stored in
|
||||
the location pointed to by the B<al> parameter to the callback. By default this
|
||||
value is initialised to SSL_AD_UNRECOGNIZED_NAME.
|
||||
|
||||
=item SSL_TLSEXT_ERR_ALERT_WARNING
|
||||
|
||||
If this value is returned then the servername is not accepted by the server.
|
||||
However the handshake will continue and send a warning alert instead. The value
|
||||
of the alert should be stored in the location pointed to by the B<al> parameter
|
||||
as for SSL_TLSEXT_ERR_ALERT_FATAL above. Note that TLSv1.3 does not support
|
||||
warning alerts, so if TLSv1.3 has been negotiated then this return value is
|
||||
treated the same way as SSL_TLSEXT_ERR_NOACK.
|
||||
|
||||
=item SSL_TLSEXT_ERR_NOACK
|
||||
|
||||
This return value indicates that the servername is not accepted by the server.
|
||||
No alerts are sent and the server will not acknowledge the requested servername.
|
||||
|
||||
=back
|
||||
|
||||
SSL_CTX_set_tlsext_servername_arg() sets a context-specific argument to be
|
||||
passed into the callback for this B<SSL_CTX>.
|
||||
passed into the callback (via the B<arg> parameter) for this B<SSL_CTX>.
|
||||
|
||||
SSL_get_servername() returns a servername extension value of the specified
|
||||
type if provided in the Client Hello or NULL.
|
||||
The behaviour of SSL_get_servername() depends on a number of different factors.
|
||||
In particular note that in TLSv1.3 the servername is negotiated in every
|
||||
handshake. In TLSv1.2 the servername is only negotiated on initial handshakes
|
||||
and not on resumption handshakes.
|
||||
|
||||
=over 4
|
||||
|
||||
=item On the client, before the handshake
|
||||
|
||||
If a servername has been set via a call to SSL_set_tlsext_host_name() then it
|
||||
will return that servername.
|
||||
|
||||
If one has not been set, but a TLSv1.2 resumption is being attempted and the
|
||||
session from the original handshake had a servername accepted by the server then
|
||||
it will return that servername.
|
||||
|
||||
Otherwise it returns NULL.
|
||||
|
||||
=item On the client, during or after the handshake and a TLSv1.2 (or below)
|
||||
resumption occurred
|
||||
|
||||
If the session from the orignal handshake had a servername accepted by the
|
||||
server then it will return that servername.
|
||||
|
||||
Otherwise it returns the servername set via SSL_set_tlsext_host_name() or NULL
|
||||
if it was not called.
|
||||
|
||||
=item On the client, during or after the handshake and a TLSv1.2 (or below)
|
||||
resumption did not occur
|
||||
|
||||
It will return the servername set via SSL_set_tlsext_host_name() or NULL if it
|
||||
was not called.
|
||||
|
||||
=item On the server, before the handshake
|
||||
|
||||
The function will always return NULL before the handshake
|
||||
|
||||
=item On the server, after the servername extension has been processed and a
|
||||
TLSv1.2 (or below) resumption occurred
|
||||
|
||||
If a servername was accepted by the server in the original handshake then it
|
||||
will return that servername, or NULL otherwise.
|
||||
|
||||
=item On the server, after the servername extension has been processed and a
|
||||
TLSv1.2 (or below) resumption did not occur
|
||||
|
||||
The function will return the servername requested by the client in this
|
||||
handshake or NULL if none was requested.
|
||||
|
||||
=back
|
||||
|
||||
Note that the ClientHello callback occurs before a servername extension from the
|
||||
client is processed. The servername, certificate and ALPN callbacks occur after
|
||||
a servername extension from the client is processed.
|
||||
|
||||
SSL_get_servername_type() returns the servername type or -1 if no servername
|
||||
is present. Currently the only supported type (defined in RFC3546) is
|
||||
@@ -65,6 +150,23 @@ SSL_set_tlsext_host_name() returns 1 on success, 0 in case of error.
|
||||
L<ssl(7)>, L<SSL_CTX_set_alpn_select_cb(3)>,
|
||||
L<SSL_get0_alpn_selected(3)>, L<SSL_CTX_set_client_hello_cb(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
SSL_get_servername() historically provided some unexpected results in certain
|
||||
corner cases. This has been fixed from OpenSSL 1.1.1e.
|
||||
|
||||
Prior to 1.1.1e, when the client requested a servername in an initial TLSv1.2
|
||||
handshake, the server accepted it, and then the client successfully resumed but
|
||||
set a different explict servername in the second handshake then when called by
|
||||
the client it returned the servername from the second handshake. This has now
|
||||
been changed to return the servername requested in the original handshake.
|
||||
|
||||
Also prior to 1.1.1e, if the client sent a servername in the first handshake but
|
||||
the server did not accept it, and then a second handshake occured where TLSv1.2
|
||||
resumption was successful then when called by the server it returned the
|
||||
servername requested in the original handshake. This has now been changed to
|
||||
NULL.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -2,20 +2,31 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_CTX_set_tlsext_ticket_key_cb - set a callback for session ticket processing
|
||||
SSL_CTX_set_tlsext_ticket_key_evp_cb,
|
||||
SSL_CTX_set_tlsext_ticket_key_cb
|
||||
- set a callback for session ticket processing
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/tls1.h>
|
||||
|
||||
long SSL_CTX_set_tlsext_ticket_key_cb(SSL_CTX sslctx,
|
||||
int SSL_CTX_set_tlsext_ticket_key_evp_cb(SSL_CTX sslctx,
|
||||
int (*cb)(SSL *s, unsigned char key_name[16],
|
||||
unsigned char iv[EVP_MAX_IV_LENGTH],
|
||||
EVP_CIPHER_CTX *ctx, EVP_MAC_CTX *hctx, int enc));
|
||||
|
||||
Deprecated since OpenSSL 3.0, can be hidden entirely by defining
|
||||
B<OPENSSL_API_COMPAT> with a suitable version value, see
|
||||
L<openssl_user_macros(7)>:
|
||||
|
||||
int SSL_CTX_set_tlsext_ticket_key_cb(SSL_CTX sslctx,
|
||||
int (*cb)(SSL *s, unsigned char key_name[16],
|
||||
unsigned char iv[EVP_MAX_IV_LENGTH],
|
||||
EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_CTX_set_tlsext_ticket_key_cb() sets a callback function I<cb> for handling
|
||||
SSL_CTX_set_tlsext_ticket_key_evp_cb() sets a callback function I<cb> for handling
|
||||
session tickets for the ssl context I<sslctx>. Session tickets, defined in
|
||||
RFC5077 provide an enhanced session resumption capability where the server
|
||||
implementation is not required to maintain per session state. It only applies
|
||||
@@ -38,7 +49,8 @@ ticket information or it starts a full TLS handshake to create a new session
|
||||
ticket.
|
||||
|
||||
Before the callback function is started I<ctx> and I<hctx> have been
|
||||
initialised with L<EVP_CIPHER_CTX_reset(3)> and L<HMAC_CTX_reset(3)> respectively.
|
||||
initialised with L<EVP_CIPHER_CTX_reset(3)> and L<EVP_MAC_CTX_new(3)>
|
||||
respectively.
|
||||
|
||||
For new sessions tickets, when the client doesn't present a session ticket, or
|
||||
an attempted retrieval of the ticket failed, or a renew option was indicated,
|
||||
@@ -53,8 +65,9 @@ maximum IV length is B<EVP_MAX_IV_LENGTH> bytes defined in B<evp.h>.
|
||||
|
||||
The initialization vector I<iv> should be a random value. The cipher context
|
||||
I<ctx> should use the initialisation vector I<iv>. The cipher context can be
|
||||
set using L<EVP_EncryptInit_ex(3)>. The hmac context can be set using
|
||||
L<HMAC_Init_ex(3)>.
|
||||
set using L<EVP_EncryptInit_ex(3)>. The hmac context and digest can be set using
|
||||
L<EVP_MAC_CTX_set_params(3)> with the B<OSSL_MAC_PARAM_KEY> and
|
||||
B<OSSL_MAC_PARAM_DIGEST> parameters respectively.
|
||||
|
||||
When the client presents a session ticket, the callback function with be called
|
||||
with I<enc> set to 0 indicating that the I<cb> function should retrieve a set
|
||||
@@ -62,8 +75,9 @@ of parameters. In this case I<name> and I<iv> have already been parsed out of
|
||||
the session ticket. The OpenSSL library expects that the I<name> will be used
|
||||
to retrieve a cryptographic parameters and that the cryptographic context
|
||||
I<ctx> will be set with the retrieved parameters and the initialization vector
|
||||
I<iv>. using a function like L<EVP_DecryptInit_ex(3)>. The I<hctx> needs to be
|
||||
set using L<HMAC_Init_ex(3)>.
|
||||
I<iv>. using a function like L<EVP_DecryptInit_ex(3)>. The key material and
|
||||
digest for I<hctx> need to be set using L<EVP_MAC_CTX_set_params(3)> with the
|
||||
B<OSSL_MAC_PARAM_KEY> and B<OSSL_MAC_PARAM_DIGEST> parameters respectively.
|
||||
|
||||
If the I<name> is still valid but a renewal of the ticket is required the
|
||||
callback function should return 2. The library will call the callback again
|
||||
@@ -102,6 +116,14 @@ This indicates an error.
|
||||
|
||||
=back
|
||||
|
||||
The SSL_CTX_set_tlsext_ticket_key_cb() function is identical to
|
||||
SSL_CTX_set_tlsext_ticket_key_evp_cb() except that it takes a deprecated
|
||||
HMAC_CTX pointer instead of an EVP_MAC_CTX one.
|
||||
Before this callback function is started I<hctx> will have been
|
||||
initialised with L<EVP_MAC_CTX_new(3)> and the digest set with
|
||||
L<EVP_MAC_CTX_set_params(3)>.
|
||||
The I<hctx> key material can be set using L<HMAC_Init_ex(3)>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Session resumption shortcuts the TLS so that the client certificate
|
||||
@@ -129,13 +151,15 @@ returns 0 to indicate the callback function was set.
|
||||
|
||||
Reference Implementation:
|
||||
|
||||
SSL_CTX_set_tlsext_ticket_key_cb(SSL, ssl_tlsext_ticket_key_cb);
|
||||
SSL_CTX_set_tlsext_ticket_key_evp_cb(SSL, ssl_tlsext_ticket_key_cb);
|
||||
...
|
||||
|
||||
static int ssl_tlsext_ticket_key_cb(SSL *s, unsigned char key_name[16],
|
||||
unsigned char *iv, EVP_CIPHER_CTX *ctx,
|
||||
HMAC_CTX *hctx, int enc)
|
||||
EVP_MAC_CTX *hctx, int enc)
|
||||
{
|
||||
OSSL_PARAM params[3];
|
||||
|
||||
if (enc) { /* create new session */
|
||||
if (RAND_bytes(iv, EVP_MAX_IV_LENGTH) <= 0)
|
||||
return -1; /* insufficient random */
|
||||
@@ -155,7 +179,13 @@ Reference Implementation:
|
||||
memcpy(key_name, key->name, 16);
|
||||
|
||||
EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key->aes_key, iv);
|
||||
HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL);
|
||||
|
||||
params[0] = OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_KEY,
|
||||
key->hmac_key, 16);
|
||||
params[1] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,
|
||||
"sha256", 0);
|
||||
params[2] = OSSL_PARAM_construct_end();
|
||||
EVP_MAC_CTX_set_params(hctx, params);
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -165,7 +195,13 @@ Reference Implementation:
|
||||
if (key == NULL || key->expire < now())
|
||||
return 0;
|
||||
|
||||
HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL);
|
||||
params[0] = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY,
|
||||
key->hmac_key, 16);
|
||||
params[1] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,
|
||||
"sha256", 0);
|
||||
params[2] = OSSL_PARAM_construct_end();
|
||||
EVP_MAC_CTX_set_params(hctx, params);
|
||||
|
||||
EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key->aes_key, iv);
|
||||
|
||||
if (key->expire < now() - RENEW_TIME) {
|
||||
@@ -188,6 +224,13 @@ L<SSL_CTX_sess_number(3)>,
|
||||
L<SSL_CTX_sess_set_get_cb(3)>,
|
||||
L<SSL_CTX_set_session_id_context(3)>,
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The SSL_CTX_set_tlsext_ticket_key_cb() function was deprecated in OpenSSL 3.0.
|
||||
|
||||
The SSL_CTX_set_tlsext_ticket_key_evp_cb() function was introduced in
|
||||
OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -24,7 +24,10 @@ SSL_SESSION_set1_alpn_selected
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_SESSION_get0_hostname() retrieves the SNI value that was sent by the
|
||||
client when the session was created, or NULL if no value was sent.
|
||||
client when the session was created if it was accepted by the server and TLSv1.2
|
||||
or below was negotiated. Otherwise NULL is returned. Note that in TLSv1.3 the
|
||||
SNI hostname is negotiated with each handshake including resumption handshakes
|
||||
and is therefore never associated with the session.
|
||||
|
||||
The value returned is a pointer to memory maintained within B<s> and
|
||||
should not be free'd.
|
||||
|
||||
@@ -116,14 +116,14 @@ hashed names for all files with F<.pem> suffix in a given directory.
|
||||
|
||||
B<X509_LOOKUP_store> is a method that allows access to any store of
|
||||
certificates and CRLs through any loader supported by
|
||||
L<OSSL_STORE(3)>.
|
||||
L<ossl_store(7)>.
|
||||
It works with the help of URIs, which can be direct references to
|
||||
certificates or CRLs, but can also be references to catalogues of such
|
||||
objects (that behave like directories).
|
||||
|
||||
This method overlaps the L</File Method> and L</Hashed Directory Method>
|
||||
because of the 'file:' scheme loader.
|
||||
It does no caching of its own, but can use a caching L<OSSL_STORE(3)>
|
||||
It does no caching of its own, but can use a caching L<ossl_store(7)>
|
||||
loader, and therefore depends on the loader's capability.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
@@ -141,7 +141,7 @@ L<X509_STORE_load_locations(3)>,
|
||||
L<X509_store_add_lookup(3)>,
|
||||
L<SSL_CTX_load_verify_locations(3)>,
|
||||
L<X509_LOOKUP_meth_new(3)>,
|
||||
L<OSSL_STORE(3)>
|
||||
L<ossl_store(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
@@ -97,160 +97,163 @@ error codes are defined but currently never returned: these are described as
|
||||
|
||||
=item B<X509_V_OK: ok>
|
||||
|
||||
the operation was successful.
|
||||
The operation was successful.
|
||||
|
||||
=item B<X509_V_ERR_UNSPECIFIED: unspecified certificate verification error>
|
||||
|
||||
Unspecified error; should not happen.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate>
|
||||
|
||||
the issuer certificate of a locally looked up certificate could not be found.
|
||||
The issuer certificate of a locally looked up certificate could not be found.
|
||||
This normally means the list of trusted certificates is not complete.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_CRL: unable to get certificate CRL>
|
||||
|
||||
the CRL of a certificate could not be found.
|
||||
The CRL of a certificate could not be found.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: unable to decrypt certificate's signature>
|
||||
|
||||
the certificate signature could not be decrypted. This means that the actual
|
||||
The certificate signature could not be decrypted. This means that the actual
|
||||
signature value could not be determined rather than it not matching the
|
||||
expected value, this is only meaningful for RSA keys.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: unable to decrypt CRL's signature>
|
||||
|
||||
the CRL signature could not be decrypted: this means that the actual signature
|
||||
The CRL signature could not be decrypted: this means that the actual signature
|
||||
value could not be determined rather than it not matching the expected value.
|
||||
Unused.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: unable to decode issuer public key>
|
||||
|
||||
the public key in the certificate SubjectPublicKeyInfo could not be read.
|
||||
The public key in the certificate C<SubjectPublicKeyInfo> field could
|
||||
not be read.
|
||||
|
||||
=item B<X509_V_ERR_CERT_SIGNATURE_FAILURE: certificate signature failure>
|
||||
|
||||
the signature of the certificate is invalid.
|
||||
The signature of the certificate is invalid.
|
||||
|
||||
=item B<X509_V_ERR_CRL_SIGNATURE_FAILURE: CRL signature failure>
|
||||
|
||||
the signature of the certificate is invalid.
|
||||
The signature of the certificate is invalid.
|
||||
|
||||
=item B<X509_V_ERR_CERT_NOT_YET_VALID: certificate is not yet valid>
|
||||
|
||||
the certificate is not yet valid: the notBefore date is after the current time.
|
||||
The certificate is not yet valid: the C<notBefore> date is after the
|
||||
current time.
|
||||
|
||||
=item B<X509_V_ERR_CERT_HAS_EXPIRED: certificate has expired>
|
||||
|
||||
the certificate has expired: that is the notAfter date is before the current time.
|
||||
The certificate has expired: that is the C<notAfter> date is before the
|
||||
current time.
|
||||
|
||||
=item B<X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid>
|
||||
|
||||
the CRL is not yet valid.
|
||||
The CRL is not yet valid.
|
||||
|
||||
=item B<X509_V_ERR_CRL_HAS_EXPIRED: CRL has expired>
|
||||
|
||||
the CRL has expired.
|
||||
The CRL has expired.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: format error in certificate's notBefore field>
|
||||
|
||||
the certificate notBefore field contains an invalid time.
|
||||
The certificate B<notBefore> field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: format error in certificate's notAfter field>
|
||||
|
||||
the certificate notAfter field contains an invalid time.
|
||||
The certificate B<notAfter> field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: format error in CRL's lastUpdate field>
|
||||
|
||||
the CRL lastUpdate field contains an invalid time.
|
||||
The CRL B<lastUpdate> field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: format error in CRL's nextUpdate field>
|
||||
|
||||
the CRL nextUpdate field contains an invalid time.
|
||||
The CRL B<nextUpdate> field contains an invalid time.
|
||||
|
||||
=item B<X509_V_ERR_OUT_OF_MEM: out of memory>
|
||||
|
||||
an error occurred trying to allocate memory. This should never happen.
|
||||
An error occurred trying to allocate memory.
|
||||
|
||||
=item B<X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: self signed certificate>
|
||||
|
||||
the passed certificate is self signed and the same certificate cannot be found
|
||||
The passed certificate is self-signed and the same certificate cannot be found
|
||||
in the list of trusted certificates.
|
||||
|
||||
=item B<X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in certificate chain>
|
||||
|
||||
the certificate chain could be built up using the untrusted certificates but
|
||||
The certificate chain could be built up using the untrusted certificates but
|
||||
the root could not be found locally.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate>
|
||||
|
||||
the issuer certificate could not be found: this occurs if the issuer certificate
|
||||
The issuer certificate could not be found: this occurs if the issuer certificate
|
||||
of an untrusted certificate cannot be found.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate>
|
||||
|
||||
no signatures could be verified because the chain contains only one certificate
|
||||
No signatures could be verified because the chain contains only one certificate
|
||||
and it is not self signed.
|
||||
|
||||
=item B<X509_V_ERR_CERT_CHAIN_TOO_LONG: certificate chain too long>
|
||||
|
||||
the certificate chain length is greater than the supplied maximum depth. Unused.
|
||||
The certificate chain length is greater than the supplied maximum depth. Unused.
|
||||
|
||||
=item B<X509_V_ERR_CERT_REVOKED: certificate revoked>
|
||||
|
||||
the certificate has been revoked.
|
||||
The certificate has been revoked.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_CA: invalid CA certificate>
|
||||
|
||||
a CA certificate is invalid. Either it is not a CA or its extensions are not
|
||||
A CA certificate is invalid. Either it is not a CA or its extensions are not
|
||||
consistent with the supplied purpose.
|
||||
|
||||
=item B<X509_V_ERR_PATH_LENGTH_EXCEEDED: path length constraint exceeded>
|
||||
|
||||
the basicConstraints path-length parameter has been exceeded.
|
||||
The basicConstraints path-length parameter has been exceeded.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_PURPOSE: unsupported certificate purpose>
|
||||
|
||||
the supplied certificate cannot be used for the specified purpose.
|
||||
The supplied certificate cannot be used for the specified purpose.
|
||||
|
||||
=item B<X509_V_ERR_CERT_UNTRUSTED: certificate not trusted>
|
||||
|
||||
the root CA is not marked as trusted for the specified purpose.
|
||||
The root CA is not marked as trusted for the specified purpose.
|
||||
|
||||
=item B<X509_V_ERR_CERT_REJECTED: certificate rejected>
|
||||
|
||||
the root CA is marked to reject the specified purpose.
|
||||
The root CA is marked to reject the specified purpose.
|
||||
|
||||
=item B<X509_V_ERR_SUBJECT_ISSUER_MISMATCH: subject issuer mismatch>
|
||||
|
||||
the current candidate issuer certificate was rejected because its subject name
|
||||
did not match the issuer name of the current certificate. This is only set
|
||||
if issuer check debugging is enabled it is used for status notification and
|
||||
is B<not> in itself an error.
|
||||
The current candidate issuer certificate was rejected because its subject name
|
||||
did not match the issuer name of the current certificate.
|
||||
|
||||
=item B<X509_V_ERR_AKID_SKID_MISMATCH: authority and subject key identifier mismatch>
|
||||
|
||||
the current candidate issuer certificate was rejected because its subject key
|
||||
The current candidate issuer certificate was rejected because its subject key
|
||||
identifier was present and did not match the authority key identifier current
|
||||
certificate. This is only set if issuer check debugging is enabled it is used
|
||||
for status notification and is B<not> in itself an error.
|
||||
certificate.
|
||||
Not used as of OpenSSL 1.1.0.
|
||||
|
||||
=item B<X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: authority and issuer serial number mismatch>
|
||||
|
||||
the current candidate issuer certificate was rejected because its issuer name
|
||||
The current candidate issuer certificate was rejected because its issuer name
|
||||
and serial number was present and did not match the authority key identifier of
|
||||
the current certificate. This is only set if issuer check debugging is enabled
|
||||
it is used for status notification and is B<not> in itself an error.
|
||||
the current certificate.
|
||||
Not used as of OpenSSL 1.1.0.
|
||||
|
||||
=item B<X509_V_ERR_KEYUSAGE_NO_CERTSIGN:key usage does not include certificate signing>
|
||||
|
||||
the current candidate issuer certificate was rejected because its keyUsage
|
||||
extension does not permit certificate signing. This is only set if issuer check
|
||||
debugging is enabled it is used for status notification and is B<not> in itself
|
||||
an error.
|
||||
The current candidate issuer certificate was rejected because its B<keyUsage>
|
||||
extension does not permit certificate signing.
|
||||
Not used as of OpenSSL 1.1.0.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_EXTENSION: invalid or inconsistent certificate extension>
|
||||
|
||||
A certificate extension had an invalid value (for example an incorrect
|
||||
encoding) or some value inconsistent with other extensions.
|
||||
|
||||
|
||||
=item B<X509_V_ERR_INVALID_POLICY_EXTENSION: invalid or inconsistent certificate policy extension>
|
||||
|
||||
A certificate policies extension had an invalid value (for example an incorrect
|
||||
@@ -301,8 +304,121 @@ happen if extended CRL checking is enabled.
|
||||
|
||||
=item B<X509_V_ERR_APPLICATION_VERIFICATION: application verification failure>
|
||||
|
||||
an application specific error. This will never be returned unless explicitly
|
||||
set by an application.
|
||||
An application specific error. This will never be returned unless explicitly
|
||||
set by an application callback.
|
||||
|
||||
=item B<X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: unable to get CRL issuer certificate>
|
||||
|
||||
Unable to get CRL issuer certificate.
|
||||
|
||||
=item B<X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: unhandled critical extension>
|
||||
|
||||
Unhandled critical extension.
|
||||
|
||||
=item B<X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: key usage does not include CRL signing>
|
||||
|
||||
Key usage does not include CRL signing.
|
||||
|
||||
=item B<X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: unhandled critical CRL extension>
|
||||
|
||||
Unhandled critical CRL extension.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_NON_CA: invalid non-CA certificate (has CA markings)>
|
||||
|
||||
Invalid non-CA certificate has CA markings.
|
||||
|
||||
=item B<X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: proxy path length contraint exceeded>
|
||||
|
||||
Proxy path length constraint exceeded.
|
||||
|
||||
=item B<X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: key usage does not include digital signature>
|
||||
|
||||
Key usage does not include digital signature, and therefore cannot sign
|
||||
certificates.
|
||||
|
||||
=item B<X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: proxy certificates not allowed, please set the appropriate flag>
|
||||
|
||||
Proxy certificates not allowed unless the B<-allow_proxy_certs> option is used.
|
||||
|
||||
=item B<X509_V_ERR_UNNESTED_RESOURCE: RFC 3779 resource not subset of parent's resrouces>
|
||||
|
||||
See RFC 3779 for details.
|
||||
|
||||
=item B<X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: unsupported or invalid name syntax>
|
||||
|
||||
Unsupported or invalid name syntax.
|
||||
|
||||
=item B<X509_V_ERR_PATH_LOOP: path loop>
|
||||
|
||||
Path loop.
|
||||
|
||||
=item B<X509_V_ERR_HOSTNAME_MISMATCH: hostname mismatch>
|
||||
|
||||
Hostname mismatch.
|
||||
|
||||
=item B<X509_V_ERR_EMAIL_MISMATCH: email address mismatch>
|
||||
|
||||
Email address mismatch.
|
||||
|
||||
=item B<X509_V_ERR_IP_ADDRESS_MISMATCH: IP address mismatch>
|
||||
|
||||
IP address mismatch.
|
||||
|
||||
=item B<X509_V_ERR_DANE_NO_MATCH: no matching DANE TLSA records>
|
||||
|
||||
DANE TLSA authentication is enabled, but no TLSA records matched the
|
||||
certificate chain.
|
||||
This error is only possible in L<openssl-s_client(1)>.
|
||||
|
||||
=item B<X509_V_ERR_EE_KEY_TOO_SMALL: EE certificate key too weak>
|
||||
|
||||
EE certificate key too weak.
|
||||
|
||||
=item B<X509_ERR_CA_KEY_TOO_SMALL: CA certificate key too weak>
|
||||
|
||||
CA certificate key too weak.
|
||||
|
||||
=item B<X509_ERR_CA_MD_TOO_WEAK: CA signature digest algorithm too weak>
|
||||
|
||||
CA signature digest algorithm too weak.
|
||||
|
||||
=item B<X509_V_ERR_INVALID_CALL: invalid certificate verification context>
|
||||
|
||||
invalid certificate verification context.
|
||||
|
||||
=item B<X509_V_ERR_STORE_LOOKUP: issuer certificate lookup error>
|
||||
|
||||
Issuer certificate lookup error.
|
||||
|
||||
=item B<X509_V_ERR_NO_VALID_SCTS: certificate transparency required, but no valid SCTs found>
|
||||
|
||||
Certificate Transparency required, but no valid SCTs found.
|
||||
|
||||
=item B<X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION: proxy subject name violation>
|
||||
|
||||
Proxy subject name violation.
|
||||
|
||||
=item B<X509_V_ERR_OCSP_VERIFY_NEEDED: OCSP verification needed>
|
||||
|
||||
Returned by the verify callback to indicate an OCSP verification is needed.
|
||||
|
||||
=item B<X509_V_ERR_OCSP_VERIFY_FAILED: OCSP verification failed>
|
||||
|
||||
Returned by the verify callback to indicate OCSP verification failed.
|
||||
|
||||
=item B<X509_V_ERR_OCSP_CERT_UNKNOWN: OCSP unknown cert>
|
||||
|
||||
Returned by the verify callback to indicate that the certificate is not
|
||||
recognized by the OCSP responder.
|
||||
|
||||
=item B<509_V_ERROR_NO_ISSUER_PUBLI_KEY, issuer certificate doesn't have a public key>
|
||||
|
||||
The issuer certificate does not have a public key.
|
||||
|
||||
=item B<X509_V_ERROR_SIGNATURE_ALGORITHM_MISMATCH, Subject signature algorithm and issuer public key algoritm mismatch>
|
||||
|
||||
The issuer's public key is not of the type required by the signature in
|
||||
the subject's certificate.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
X509_load_http,
|
||||
X509_http_nbio,
|
||||
X509_CRL_load_http,
|
||||
X509_CRL_http_nbio
|
||||
- certificate and CRL loading functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/x509.h>
|
||||
|
||||
X509 *X509_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
|
||||
X509_CRL *X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
|
||||
|
||||
#define X509_http_nbio(url)
|
||||
#define X509_CRL_http_nbio(url)
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
X509_load_http() and X509_CRL_load_http() loads a certificate or a CRL,
|
||||
respectively, in ASN.1 format using HTTP from the given B<url>.
|
||||
|
||||
If B<bio> is given and B<rbio> is NULL then this BIO is used instead of an
|
||||
interal one for connecting, writing the request, and reading the response.
|
||||
If both B<bio> and B<rbio> are given (which may be memory BIOs, for instance)
|
||||
then no explicit connection is attempted,
|
||||
B<bio> is used for writing the request, and B<rbio> for reading the response.
|
||||
|
||||
If the B<timeout> parameter is > 0 this indicates the maximum number of seconds
|
||||
to wait until the transfer is complete.
|
||||
A value of 0 enables waiting indefinitely,
|
||||
while a value < 0 immediately leads to a timeout condition.
|
||||
|
||||
X509_http_nbio() and X509_CRL_http_nbio() are macros for backward compatibility
|
||||
that have the same effect as the functions above but with infinite timeout
|
||||
and without the possiblity to specify custom BIOs.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
On success the function yield the loaded value, else NULL.
|
||||
Error conditions include connection/transfer timeout, parse errors, etc.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<OSSL_HTTP_get_asn1(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
X509_load_http() and X509_CRL_load_http() were added in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2019-2020 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
|
||||
@@ -16,17 +16,6 @@ The X509_verify_cert() function attempts to discover and validate a
|
||||
certificate chain based on parameters in B<ctx>. A complete description of
|
||||
the process is contained in the L<openssl-verify(1)> manual page.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
If a complete chain can be built and validated this function returns 1,
|
||||
otherwise it return zero, in exceptional circumstances it can also
|
||||
return a negative code.
|
||||
|
||||
If the function fails additional error information can be obtained by
|
||||
examining B<ctx> using, for example X509_STORE_CTX_get_error().
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Applications rarely call this function directly but it is used by
|
||||
OpenSSL internally for certificate validation, in both the S/MIME and
|
||||
SSL/TLS code.
|
||||
@@ -39,10 +28,20 @@ a retry operation is requested during internal lookups (which never happens
|
||||
with standard lookup methods).
|
||||
Applications must check for <= 0 return value on error.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
If a complete chain can be built and validated this function returns 1,
|
||||
otherwise it return zero, in exceptional circumstances it can also
|
||||
return a negative code.
|
||||
|
||||
If the function fails additional error information can be obtained by
|
||||
examining B<ctx> using, for example X509_STORE_CTX_get_error().
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
This function uses the header B<x509.h> as opposed to most chain verification
|
||||
functions which use B<x509_vfy.h>.
|
||||
This function uses the header F<< <x509.h> >>
|
||||
as opposed to most chain verification
|
||||
functions which use F<< <x509_vfy.h> >>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ use any key specific format or PKCS#8 unencrypted PrivateKeyInfo format. The
|
||||
B<type> parameter should be a public key algorithm constant such as
|
||||
B<EVP_PKEY_RSA>. An error occurs if the decoded key does not match B<type>.
|
||||
d2i_PublicKey() does the same for public keys.
|
||||
d2i_KeyParams() does the same for domain parameter keys.
|
||||
d2i_KeyParams() does the same for key parameters.
|
||||
|
||||
d2i_AutoPrivateKey() is similar to d2i_PrivateKey() except it attempts to
|
||||
automatically detect the private key format.
|
||||
@@ -44,7 +44,7 @@ automatically detect the private key format.
|
||||
i2d_PrivateKey() encodes B<key>. It uses a key specific format or, if none is
|
||||
defined for that key type, PKCS#8 unencrypted PrivateKeyInfo format.
|
||||
i2d_PublicKey() does the same for public keys.
|
||||
i2d_KeyParams() does the same for domain parameter keys.
|
||||
i2d_KeyParams() does the same for key parameters.
|
||||
These functions are similar to the d2i_X509() functions; see L<d2i_X509(3)>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -491,7 +491,7 @@ Represents an ASN1 OBJECT IDENTIFIER.
|
||||
|
||||
Represents a PKCS#3 DH parameters structure.
|
||||
|
||||
=item B<DHparamx>
|
||||
=item B<DHxparams>
|
||||
|
||||
Represents an ANSI X9.42 DH parameters structure.
|
||||
|
||||
|
||||
@@ -469,6 +469,22 @@ Simple OpenSSL library configuration example to enter FIPS mode:
|
||||
Note: in the above example you will get an error in non FIPS capable versions
|
||||
of OpenSSL.
|
||||
|
||||
Simple OpenSSL library configuration to make TLS 1.3 the system-default
|
||||
minimum TLS version:
|
||||
|
||||
# Toplevel section for openssl (including libssl)
|
||||
openssl_conf = default_conf_section
|
||||
|
||||
[default_conf_section]
|
||||
# We only specify configuration for the "ssl module"
|
||||
ssl_conf = ssl_section
|
||||
|
||||
[ssl_section]
|
||||
system_default = system_default_section
|
||||
|
||||
[system_default_section]
|
||||
MinProtocol = TLSv1.3
|
||||
|
||||
More complex OpenSSL library configuration. Add OID and don't enter FIPS mode:
|
||||
|
||||
# Default appname: should match "appname" parameter (if any)
|
||||
|
||||
@@ -96,7 +96,6 @@ RFC 3961
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_KDF(3)>,
|
||||
L<EVP_KDF_CTX_new_id(3)>,
|
||||
L<EVP_KDF_CTX_free(3)>,
|
||||
L<EVP_KDF_ctrl(3)>,
|
||||
L<EVP_KDF_size(3)>,
|
||||
|
||||
@@ -15,7 +15,7 @@ accredited testing laboratory.
|
||||
|
||||
One of the requirements for the FIPS module is self testing. An optional callback
|
||||
mechanism is available to return information to the user using
|
||||
L<OSSL_SELF_TEST_set_callback(7)>.
|
||||
L<OSSL_SELF_TEST_set_callback(3)>.
|
||||
|
||||
The OPENSSL FIPS module uses the following mechanism to provide information
|
||||
about the self tests as they run.
|
||||
@@ -240,7 +240,7 @@ A simple self test callback is shown below for illustrative purposes.
|
||||
|
||||
L<openssl-fipsinstall(1)>,
|
||||
L<fips_config(5)>,
|
||||
L<OSSL_SELF_TEST_set_callback(7)>,
|
||||
L<OSSL_SELF_TEST_set_callback(3)>,
|
||||
L<OSSL_PARAM(3)>,
|
||||
L<openssl-core.h(7)>
|
||||
|
||||
|
||||
+6
-16
@@ -20,25 +20,17 @@ B<SM2> signatures can be generated by using the 'DigestSign' series of APIs, for
|
||||
instance, EVP_DigestSignInit(), EVP_DigestSignUpdate() and EVP_DigestSignFinal().
|
||||
Ditto for the verification process by calling the 'DigestVerify' series of APIs.
|
||||
|
||||
There are several special steps that need to be done before computing an B<SM2>
|
||||
signature.
|
||||
|
||||
The B<EVP_PKEY> structure will default to using ECDSA for signatures when it is
|
||||
created. It should be set to B<EVP_PKEY_SM2> by calling:
|
||||
|
||||
EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2);
|
||||
|
||||
Then an ID should be set by calling:
|
||||
Before computing an B<SM2> signature, an B<EVP_PKEY_CTX> needs to be created,
|
||||
and an B<SM2> ID must be set for it, like this:
|
||||
|
||||
EVP_PKEY_CTX_set1_id(pctx, id, id_len);
|
||||
|
||||
When calling the EVP_DigestSignInit() or EVP_DigestVerifyInit() functions, a
|
||||
pre-allocated B<EVP_PKEY_CTX> should be assigned to the B<EVP_MD_CTX>. This is
|
||||
done by calling:
|
||||
Before calling the EVP_DigestSignInit() or EVP_DigestVerifyInit() functions,
|
||||
that B<EVP_PKEY_CTX> should be assigned to the B<EVP_MD_CTX>, like this:
|
||||
|
||||
EVP_MD_CTX_set_pkey_ctx(mctx, pctx);
|
||||
|
||||
And normally there is no need to pass a B<pctx> parameter to EVP_DigestSignInit()
|
||||
There is normally no need to pass a B<pctx> parameter to EVP_DigestSignInit()
|
||||
or EVP_DigestVerifyInit() in such a scenario.
|
||||
|
||||
SM2 can be tested with the L<openssl-speed(1)> application since version 3.0.0.
|
||||
@@ -52,11 +44,10 @@ a message with the SM2 signature algorithm and the SM3 hash algorithm:
|
||||
#include <openssl/evp.h>
|
||||
|
||||
/* obtain an EVP_PKEY using whatever methods... */
|
||||
EVP_PKEY_set_alias_type(pkey, EVP_PKEY_SM2);
|
||||
mctx = EVP_MD_CTX_new();
|
||||
pctx = EVP_PKEY_CTX_new(pkey, NULL);
|
||||
EVP_PKEY_CTX_set1_id(pctx, id, id_len);
|
||||
EVP_MD_CTX_set_pkey_ctx(mctx, pctx);;
|
||||
EVP_MD_CTX_set_pkey_ctx(mctx, pctx);
|
||||
EVP_DigestVerifyInit(mctx, NULL, EVP_sm3(), NULL, pkey);
|
||||
EVP_DigestVerifyUpdate(mctx, msg, msg_len);
|
||||
EVP_DigestVerifyFinal(mctx, sig, sig_len)
|
||||
@@ -64,7 +55,6 @@ a message with the SM2 signature algorithm and the SM3 hash algorithm:
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_PKEY_CTX_new(3)>,
|
||||
L<EVP_PKEY_set_alias_type(3)>,
|
||||
L<EVP_DigestSignInit(3)>,
|
||||
L<EVP_DigestVerifyInit(3)>,
|
||||
L<EVP_PKEY_CTX_set1_id(3)>,
|
||||
|
||||
@@ -37,7 +37,7 @@ See L<openssl-engine(1)>.
|
||||
=item B<OPENSSL_MALLOC_FD>, B<OPENSSL_MALLOC_FAILURES>
|
||||
|
||||
If built with debugging, this allows memory allocation to fail.
|
||||
See L<OPENSSSL_malloc(3)>.
|
||||
See L<OPENSSL_malloc(3)>.
|
||||
|
||||
=item B<OPENSSL_MODULES>
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ A pass phrase encoded in ISO-8859-2 could very well have a sequence such as
|
||||
0xC3 0xAF (which is the two characters "LATIN CAPITAL LETTER A WITH BREVE"
|
||||
and "LATIN CAPITAL LETTER Z WITH DOT ABOVE" in ISO-8859-2 encoding), but would
|
||||
be misinterpreted as the perfectly valid UTF-8 encoded code point U+00EF (LATIN
|
||||
SMALL LETTER I WITH DIARESIS) I<if the pass phrase doesn't contain anything that
|
||||
SMALL LETTER I WITH DIAERESIS) I<if the pass phrase doesn't contain anything that
|
||||
would be invalid UTF-8>.
|
||||
A pass phrase that contains this kind of byte sequence will give a different
|
||||
outcome in OpenSSL 1.1.0 and newer than in OpenSSL older than 1.1.0.
|
||||
|
||||
@@ -47,9 +47,9 @@ for further information.
|
||||
|
||||
The asymmetric cipher (OSSL_OP_ASYM_CIPHER) operation enables providers to
|
||||
implement asymmetric cipher algorithms and make them available to applications
|
||||
via the API functions L<EVP_PKEY_encrypt_init_ex(3)>, L<EVP_PKEY_encrypt(3)>,
|
||||
L<EVP_PKEY_decrypt_init_ex(3)>, L<EVP_PKEY_decrypt(3)> (as well
|
||||
as other related functions).
|
||||
via the API functions L<EVP_PKEY_encrypt(3)>,
|
||||
L<EVP_PKEY_decrypt(3)> and
|
||||
other related functions).
|
||||
|
||||
All "functions" mentioned here are passed as function pointers between
|
||||
F<libcrypto> and the provider in B<OSSL_DISPATCH> arrays via
|
||||
@@ -108,7 +108,7 @@ structure for holding context information during an asymmetric cipher operation.
|
||||
A pointer to this context will be passed back in a number of the other
|
||||
asymmetric cipher operation function calls.
|
||||
The parameter I<provctx> is the provider context generated during provider
|
||||
initialisation (see L<provider(3)>).
|
||||
initialisation (see L<provider(7)>).
|
||||
|
||||
OP_asym_cipher_freectx() is passed a pointer to the provider side asymmetric
|
||||
cipher context in the I<ctx> parameter.
|
||||
|
||||
@@ -38,8 +38,8 @@ This documentation is primarily aimed at provider authors. See L<provider(7)>
|
||||
for further information.
|
||||
|
||||
The key exchange (OSSL_OP_KEYEXCH) operation enables providers to implement key
|
||||
exchange algorithms and make them available to applications via the API
|
||||
functions L<EVP_PKEY_derive_init_ex(3)>, and L<EVP_PKEY_derive(3)> (as well as
|
||||
exchange algorithms and make them available to applications via
|
||||
L<EVP_PKEY_derive(3)> and
|
||||
other related functions).
|
||||
|
||||
All "functions" mentioned here are passed as function pointers between
|
||||
|
||||
+176
-127
@@ -14,39 +14,29 @@ provider-keymgmt - The KEYMGMT library E<lt>-E<gt> provider functions
|
||||
* pointers in OSSL_DISPATCH arrays.
|
||||
*/
|
||||
|
||||
/* Key domain parameter creation and destruction */
|
||||
void *OP_keymgmt_importdomparams(void *provctx, const OSSL_PARAM params[]);
|
||||
void *OP_keymgmt_gendomparams(void *provctx, const OSSL_PARAM params[]);
|
||||
void OP_keymgmt_freedomparams(void *domparams);
|
||||
/* Key object (keydata) creation and destruction */
|
||||
void *OP_keymgmt_new(void *provctx);
|
||||
void OP_keymgmt_free(void *keydata);
|
||||
|
||||
/* Key domain parameter export */
|
||||
int OP_keymgmt_exportdomparams(void *domparams, OSSL_PARAM params[]);
|
||||
/* Key object information */
|
||||
int OP_keymgmt_get_params(void *keydata, OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *OP_keymgmt_gettable_params(void);
|
||||
|
||||
/* Key domain parameter discovery */
|
||||
const OSSL_PARAM *OP_keymgmt_importdomparam_types(void);
|
||||
const OSSL_PARAM *OP_keymgmt_exportdomparam_types(void);
|
||||
/* Key object content checks */
|
||||
int OP_keymgmt_has(void *keydata, int selection);
|
||||
|
||||
/* Key domain parameter information */
|
||||
int OP_keymgmt_get_domparam_params(void *domparams, OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *OP_keymgmt_gettable_domparam_params(void);
|
||||
/* Discovery of supported operations */
|
||||
const char *OP_keymgmt_query_operation_name(int operation_id);
|
||||
|
||||
/* Key creation and destruction */
|
||||
void *OP_keymgmt_importkey(void *provctx, const OSSL_PARAM params[]);
|
||||
void *OP_keymgmt_genkey(void *provctx,
|
||||
void *domparams, const OSSL_PARAM genkeyparams[]);
|
||||
void *OP_keymgmt_loadkey(void *provctx, void *id, size_t idlen);
|
||||
void OP_keymgmt_freekey(void *key);
|
||||
/* Key object import and export functions */
|
||||
int OP_keymgmt_import(int selection, void *keydata, const OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *OP_keymgmt_import_types, (int selection);
|
||||
int OP_keymgmt_export(int selection, void *keydata,
|
||||
OSSL_CALLBACK *param_cb, void *cbarg);
|
||||
const OSSL_PARAM *OP_keymgmt_export_types(int selection);
|
||||
|
||||
/* Key export */
|
||||
int OP_keymgmt_exportkey(void *key, OSSL_PARAM params[]);
|
||||
|
||||
/* Key discovery */
|
||||
const OSSL_PARAM *OP_keymgmt_importkey_types(void);
|
||||
const OSSL_PARAM *OP_keymgmt_exportkey_types(void);
|
||||
|
||||
/* Key information */
|
||||
int OP_keymgmt_get_key_params(void *key, OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *OP_keymgmt_gettable_key_params(void);
|
||||
/* Key object validation */
|
||||
int OP_keymgmt_validate(void *keydata, int selection);
|
||||
|
||||
/* Discovery of supported operations */
|
||||
const char *OP_keymgmt_query_operation_name(int operation_id);
|
||||
@@ -62,8 +52,7 @@ works with in tandem, they must belong to the same provider.
|
||||
The OpenSSL libraries will ensure that they do.
|
||||
|
||||
The primary responsibility of the KEYMGMT operation is to hold the
|
||||
provider side domain parameters and keys for the OpenSSL library
|
||||
EVP_PKEY structure.
|
||||
provider side key data for the OpenSSL library EVP_PKEY structure.
|
||||
|
||||
All "functions" mentioned here are passed as function pointers between
|
||||
F<libcrypto> and the provider in B<OSSL_DISPATCH> arrays via
|
||||
@@ -75,117 +64,147 @@ All these "functions" have a corresponding function type definition
|
||||
named B<OSSL_{name}_fn>, and a helper function to retrieve the
|
||||
function pointer from a B<OSSL_DISPATCH> element named
|
||||
B<OSSL_get_{name}>.
|
||||
For example, the "function" OP_keymgmt_importdomparams() has these:
|
||||
For example, the "function" OP_keymgmt_new() has these:
|
||||
|
||||
typedef void *
|
||||
(OSSL_OP_keymgmt_importdomparams_fn)(void *provctx,
|
||||
const OSSL_PARAM params[]);
|
||||
static ossl_inline OSSL_OP_keymgmt_importdomparams_fn
|
||||
OSSL_get_OP_keymgmt_importdomparams(const OSSL_DISPATCH *opf);
|
||||
typedef void *(OSSL_OP_keymgmt_new_fn)(void *provctx);
|
||||
static ossl_inline OSSL_OP_keymgmt_new_fn
|
||||
OSSL_get_OP_keymgmt_new(const OSSL_DISPATCH *opf);
|
||||
|
||||
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
|
||||
macros in L<openssl-core_numbers.h(7)>, as follows:
|
||||
|
||||
OP_keymgmt_importdomparams OSSL_FUNC_KEYMGMT_IMPORTDOMPARAMS
|
||||
OP_keymgmt_gendomparams OSSL_FUNC_KEYMGMT_GENDOMPARAMS
|
||||
OP_keymgmt_freedomparams OSSL_FUNC_KEYMGMT_FREEDOMPARAMS
|
||||
OP_keymgmt_exportdomparams OSSL_FUNC_KEYMGMT_EXPORTDOMPARAMS
|
||||
OP_keymgmt_importdomparam_types OSSL_FUNC_KEYMGMT_IMPORTDOMPARAM_TYPES
|
||||
OP_keymgmt_exportdomparam_types OSSL_FUNC_KEYMGMT_EXPORTDOMPARAM_TYPES
|
||||
OP_keymgmt_get_domparam_params OSSL_FUNC_KEYMGMT_GET_DOMPARAM_PARAMS
|
||||
OP_keymgmt_gettable_domparam_params
|
||||
OSSL_FUNC_KEYMGMT_GETTABLE_DOMPARAM_PARAMS
|
||||
OP_keymgmt_new OSSL_FUNC_KEYMGMT_NEW
|
||||
OP_keymgmt_free OSSL_FUNC_KEYMGMT_FREE
|
||||
|
||||
OP_keymgmt_importkey OSSL_FUNC_KEYMGMT_IMPORTKEY
|
||||
OP_keymgmt_genkey OSSL_FUNC_KEYMGMT_GENKEY
|
||||
OP_keymgmt_loadkey OSSL_FUNC_KEYMGMT_LOADKEY
|
||||
OP_keymgmt_freekey OSSL_FUNC_KEYMGMT_FREEKEY
|
||||
OP_keymgmt_exportkey OSSL_FUNC_KEYMGMT_EXPORTKEY
|
||||
OP_keymgmt_importkey_types OSSL_FUNC_KEYMGMT_IMPORTKEY_TYPES
|
||||
OP_keymgmt_exportkey_types OSSL_FUNC_KEYMGMT_EXPORTKEY_TYPES
|
||||
OP_keymgmt_get_key_params OSSL_FUNC_KEYMGMT_GET_KEY_PARAMS
|
||||
OP_keymgmt_gettable_key_params OSSL_FUNC_KEYMGMT_GETTABLE_KEY_PARAMS
|
||||
OP_keymgmt_get_params OSSL_FUNC_KEYMGMT_GET_PARAMS
|
||||
OP_keymgmt_gettable_params OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS
|
||||
|
||||
OP_keymgmt_query_operation_name OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME
|
||||
|
||||
=head2 Domain Parameter Functions
|
||||
OP_keymgmt_has OSSL_FUNC_KEYMGMT_HAS
|
||||
OP_keymgmt_validate OSSL_FUNC_KEYMGMT_VALIDATE
|
||||
|
||||
OP_keymgmt_importdomparams() should create a provider side structure
|
||||
for domain parameters, with values taken from the passed B<OSSL_PARAM>
|
||||
array I<params>.
|
||||
OP_keymgmt_import OSSL_FUNC_KEYMGMT_IMPORT
|
||||
OP_keymgmt_import_types OSSL_FUNC_KEYMGMT_IMPORT_TYPES
|
||||
OP_keymgmt_export OSSL_FUNC_KEYMGMT_EXPORT
|
||||
OP_keymgmt_export_types OSSL_FUNC_KEYMGMT_EXPORT_TYPES
|
||||
|
||||
OP_keymgmt_gendomparams() should generate domain parameters and create
|
||||
a provider side structure for them.
|
||||
Values of the passed B<OSSL_PARAM> array I<params> should be used as
|
||||
input for parameter generation.
|
||||
|
||||
OP_keymgmt_freedomparams() should free the passed provider side domain
|
||||
parameter structure I<domparams>.
|
||||
=head2 Key Objects
|
||||
|
||||
OP_keymgmt_exportdomparams() should extract values from the passed
|
||||
provider side domain parameter structure I<domparams> into the passed
|
||||
B<OSSL_PARAM> I<params>.
|
||||
Only the values specified in I<params> should be extracted.
|
||||
A key object is a collection of data for an asymmetric key, and is
|
||||
represented as I<keydata> in this manual.
|
||||
|
||||
OP_keymgmt_importdomparam_types() should return a constant array of
|
||||
descriptor B<OSSL_PARAM>, for parameters that OP_keymgmt_importdomparams()
|
||||
The exact contents of a key object are defined by the provider, and it
|
||||
is assumed that different operations in one and the same provider use
|
||||
the exact same structure to represent this collection of data, so that
|
||||
for example, a key object that has been created using the KEYMGMT
|
||||
interface that we document here can be passed as is to other provider
|
||||
operations, such as OP_signature_sign_init() (see
|
||||
L<provider-signature(7)>).
|
||||
|
||||
With some of the KEYMGMT functions, it's possible to select a specific
|
||||
subset of data to handle, governed by the bits in a I<selection>
|
||||
indicator. The bits are:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<OSSL_KEYMGMT_SELECT_PRIVATE_KEY>
|
||||
|
||||
Indicating that the private key data in a key object should be
|
||||
considered.
|
||||
|
||||
=item B<OSSL_KEYMGMT_SELECT_PUBLIC_KEY>
|
||||
|
||||
Indicating that the public key data in a key object should be
|
||||
considered.
|
||||
|
||||
=item B<OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS>
|
||||
|
||||
Indicating that the domain parameters in a key object should be
|
||||
considered.
|
||||
|
||||
=item B<OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS>
|
||||
|
||||
Indicating that other parameters in a key object should be
|
||||
considered.
|
||||
|
||||
Other parameters are key parameters that don't fit any other
|
||||
classification. In other words, this particular selector bit works as
|
||||
a last resort bit bucket selector.
|
||||
|
||||
=back
|
||||
|
||||
Some selector bits have also been combined for easier use:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<OSSL_KEYMGMT_SELECT_ALL_PARAMETERS>
|
||||
|
||||
Indicating that all key object parameters should be considered,
|
||||
regardless of their more granular classification.
|
||||
|
||||
=for comment This should used by EVP functions such as
|
||||
EVP_PKEY_copy_parameters() and EVP_PKEY_cmp_parameters()
|
||||
|
||||
This is a combination of B<OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS> and
|
||||
B<OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS>.
|
||||
|
||||
=for comment If more parameter categories are added, they should be
|
||||
mentioned here too.
|
||||
|
||||
=item B<OSSL_KEYMGMT_SELECT_KEYPAIR>
|
||||
|
||||
Indicating that both the whole key pair in a key object should be
|
||||
considered, i.e. the combination of public and private key.
|
||||
|
||||
This is a combination of B<OSSL_KEYMGMT_SELECT_PRIVATE_KEY> and
|
||||
B<OSSL_KEYMGMT_SELECT_PUBLIC_KEY>.
|
||||
|
||||
=item B<OSSL_KEYMGMT_SELECT_ALL>
|
||||
|
||||
Indicating that everything in a key object should be considered.
|
||||
|
||||
=back
|
||||
|
||||
The exact interpretation of those bits or how they combine is left to
|
||||
each function where you can specify a selector.
|
||||
|
||||
=for comment One might think that a combination of bits means that all
|
||||
the selected data subsets must be considered, but then you have to
|
||||
consider that when comparing key objects (future function), an
|
||||
implementation might opt to not compare the private key if it has
|
||||
compared the public key, since a match of one half implies a match of
|
||||
the other half.
|
||||
|
||||
=head2 Constructing and Destructing Functions
|
||||
|
||||
OP_keymgmt_new() should create a provider side key object. The
|
||||
provider context I<provctx> is passed and may be incorporated in the
|
||||
key object, but that is not mandatory.
|
||||
|
||||
OP_keymgmt_free() should free the passed I<keydata>.
|
||||
|
||||
The constructor and destructor are mandatory, a KEYMGMT implementation
|
||||
without them will not be accepted.
|
||||
|
||||
=for comment when new constructors appear, it's sufficient if only one
|
||||
of them is present. The remark above will have to change to reflect
|
||||
that.
|
||||
|
||||
=head2 Key Object Information Functions
|
||||
|
||||
OP_keymgmt_get_params() should extract information data associated
|
||||
with the given I<keydata>, see L</Information Parameters>.
|
||||
|
||||
OP_keymgmt_gettable_params() should return a constant array of
|
||||
descriptor B<OSSL_PARAM>, for parameters that OP_keymgmt_get_params()
|
||||
can handle.
|
||||
|
||||
OP_keymgmt_exportdomparam_types() should return a constant array of
|
||||
descriptor B<OSSL_PARAM>, for parameters that can be exported with
|
||||
OP_keymgmt_exportdomparams().
|
||||
If OP_keymgmt_gettable_params() is present, OP_keymgmt_get_params()
|
||||
must also be present.
|
||||
|
||||
OP_keymgmt_get_domparam_params() should extract information data
|
||||
associated with the given I<domparams>,
|
||||
see L</Information Parameters>.
|
||||
|
||||
OP_keymgmt_gettable_domparam_params() should return a constant array
|
||||
of descriptor B<OSSL_PARAM>, for parameters that
|
||||
OP_keymgmt_get_domparam_params() can handle.
|
||||
|
||||
=head2 Key functions
|
||||
|
||||
OP_keymgmt_importkey() should create a provider side structure
|
||||
for keys, with values taken from the passed B<OSSL_PARAM> array
|
||||
I<params>.
|
||||
|
||||
OP_keymgmt_genkey() should generate keys and create a provider side
|
||||
structure for them.
|
||||
Values from the passed domain parameters I<domparams> as well as from
|
||||
the passed B<OSSL_PARAM> array I<params> should be used as input for
|
||||
key generation.
|
||||
|
||||
OP_keymgmt_loadkey() should return a provider side key structure with
|
||||
a key loaded from a location known only to the provider, identitified
|
||||
with the identity I<id> of size I<idlen>.
|
||||
This identity is internal to the provider and is retrieved from the
|
||||
provider through other means.
|
||||
|
||||
=for comment Right now, OP_keymgmt_loadkey is useless, but will be
|
||||
useful as soon as we have a OSSL_STORE interface
|
||||
|
||||
OP_keymgmt_freekey() should free the passed I<key>.
|
||||
|
||||
OP_keymgmt_exportkey() should extract values from the passed
|
||||
provider side key I<key> into the passed B<OSSL_PARAM> I<params>.
|
||||
Only the values specified in I<params> should be extracted.
|
||||
|
||||
OP_keymgmt_importkey_types() should return a constant array of
|
||||
descriptor B<OSSL_PARAM>, for parameters that OP_keymgmt_importkey()
|
||||
can handle.
|
||||
|
||||
OP_keymgmt_exportkey_types() should return a constant array of
|
||||
descriptor B<OSSL_PARAM>, for parameters that can be exported with
|
||||
OP_keymgmt_exportkeys().
|
||||
|
||||
OP_keymgmt_get_key_params() should extract information data associated
|
||||
with the given I<key>, see L</Information Parameters>.
|
||||
|
||||
OP_keymgmt_gettable_key_params() should return a constant array of
|
||||
descriptor B<OSSL_PARAM>, for parameters that
|
||||
OP_keymgmt_get_key_params() can handle.
|
||||
|
||||
=head2 Supported operations
|
||||
=head2 Key Object Checking Functions
|
||||
|
||||
OP_keymgmt_query_operation_name() should return the name of the
|
||||
supported algorithm for the operation I<operation_id>. This is
|
||||
@@ -195,13 +214,43 @@ returns NULL, the caller is free to assume that there's an algorithm
|
||||
from the same provider, of the same name as the one used to fetch the
|
||||
keymgmt and try to use that.
|
||||
|
||||
OP_keymgmt_has() should check whether the given I<keydata> the subsets
|
||||
of data indicated by the I<selector>. A combination of several
|
||||
selector bits must consider all those subsets, not just one. An
|
||||
implementation is, however, free to consider an empty subset of data
|
||||
to still be a valid subset.
|
||||
|
||||
OP_keymgmt_validate() should check if the I<keydata> contains valid
|
||||
data subsets indicated by I<selection>. Some combined selections of
|
||||
data subsets may cause validation of the combined data.
|
||||
For example, the combination of B<OSSL_KEYMGMT_SELECT_PRIVATE_KEY> and
|
||||
B<OSSL_KEYMGMT_SELECT_PUBLIC_KEY> (or B<OSSL_KEYMGMT_SELECT_KEYPAIR>
|
||||
for short) is expected to check that the pairwise consistency of
|
||||
I<keydata> is valid.
|
||||
|
||||
=head2 Key Object Import and Export Functions
|
||||
|
||||
OP_keymgmt_import() should import data indicated by I<selection> into
|
||||
I<keydata> with values taken from the B<OSSL_PARAM> array I<params>.
|
||||
|
||||
OP_keymgmt_export() should extract values indicated by I<selection>
|
||||
from I<keydata>, create an B<OSSL_PARAM> array with them and call
|
||||
I<param_cb> with that array as well as the given I<cbarg>.
|
||||
|
||||
OP_keymgmt_import_types() should return a constant array of descriptor
|
||||
B<OSSL_PARAM> for data indicated by I<selection>, for parameters that
|
||||
OP_keymgmt_import() can handle.
|
||||
|
||||
OP_keymgmt_export_types() should return a constant array of descriptor
|
||||
B<OSSL_PARAM> for data indicated by I<selection>, that the
|
||||
OP_keymgmt_export() callback can expect to receive.
|
||||
|
||||
=head2 Information Parameters
|
||||
|
||||
See L<OSSL_PARAM(3)> for further details on the parameters structure.
|
||||
|
||||
Parameters currently recognised by built-in keymgmt algorithms'
|
||||
OP_keymgmt_get_domparams_params() and OP_keymgmt_get_key_params()
|
||||
are:
|
||||
OP_keymgmt_get_params:
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -241,7 +290,7 @@ The KEYMGMT interface was introduced in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
Copyright 2019-2020 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
|
||||
|
||||
@@ -127,7 +127,7 @@ formatted data.
|
||||
|
||||
With objects that have multiple purposes, this can be used to specify
|
||||
the purpose type. The currently known use cases are asymmetric keys
|
||||
and domain parameters, where the type can be one of:
|
||||
and key parameters, where the type can be one of:
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -141,9 +141,9 @@ key.
|
||||
An implementation with that format property value outputs a public
|
||||
key.
|
||||
|
||||
=item domainparams
|
||||
=item parameters
|
||||
|
||||
An implementation with that format property value outputs domain
|
||||
An implementation with that format property value outputs key
|
||||
parameters.
|
||||
|
||||
=back
|
||||
|
||||
@@ -51,9 +51,9 @@ for further information.
|
||||
|
||||
The signature (OSSL_OP_SIGNATURE) operation enables providers to implement
|
||||
signature algorithms and make them available to applications via the API
|
||||
functions L<EVP_PKEY_sign_init_ex(3)>, L<EVP_PKEY_sign(3)>,
|
||||
L<EVP_PKEY_verify_init_ex(3)>, L<EVP_PKEY_verify(3)>,
|
||||
L<EVP_PKEY_verify_recover_init_ex(3)> and L<EVP_PKEY_verify_recover(3)> (as well
|
||||
functions L<EVP_PKEY_sign(3)>,
|
||||
L<EVP_PKEY_verify(3)>,
|
||||
and L<EVP_PKEY_verify_recover(3)> (as well
|
||||
as other related functions).
|
||||
|
||||
All "functions" mentioned here are passed as function pointers between
|
||||
|
||||
@@ -217,8 +217,7 @@ When they are used with functions like L<EVP_DigestInit_ex(3)> or
|
||||
L<EVP_CipherInit_ex(3)>, the actual implementation to be used is
|
||||
fetched implicitly using default search criteria.
|
||||
|
||||
Implicit fetching can also occur with functions such as
|
||||
L<EVP_PKEY_derive_init_ex(3)> where a NULL algorithm parameter is
|
||||
Implicit fetching can also occur when a NULL algorithm parameter is
|
||||
supplied.
|
||||
In this case an algorithm implementation is implicitly fetched using
|
||||
default search criteria and an algorithm name that is consistent with
|
||||
@@ -349,7 +348,6 @@ other providers:
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_DigestInit_ex(3)>, L<EVP_EncryptInit_ex(3)>,
|
||||
L<EVP_PKEY_derive_init_ex(3)>,
|
||||
L<OPENSSL_CTX(3)>,
|
||||
L<EVP_set_default_properties(3)>,
|
||||
L<EVP_MD_fetch(3)>,
|
||||
|
||||
+15
-12
@@ -10,7 +10,9 @@
|
||||
|
||||
# Verify options
|
||||
$OpenSSL::safe::opt_v_synopsis = ""
|
||||
. "[B<-allow_proxy_certs>]\n"
|
||||
. "[B<-attime> I<timestamp>]\n"
|
||||
. "[B<-no_check_time>]\n"
|
||||
. "[B<-check_ss_sig>]\n"
|
||||
. "[B<-crl_check>]\n"
|
||||
. "[B<-crl_check_all>]\n"
|
||||
@@ -37,15 +39,16 @@ $OpenSSL::safe::opt_v_synopsis = ""
|
||||
. "[B<-verify_ip> I<ip>]\n"
|
||||
. "[B<-verify_name> I<name>]\n"
|
||||
. "[B<-x509_strict>]\n"
|
||||
. "[B<-certfile> I<file>]";
|
||||
. "[B<-issuer_checks>]\n";
|
||||
$OpenSSL::safe::opt_v_item = ""
|
||||
. "=item B<-attime>, B<-check_ss_sig>, B<-crl_check>, B<-crl_check_all>,\n"
|
||||
. "=item B<-allow_proxy_certs>, B<-attime>, B<-no_check_time>,\n"
|
||||
. "B<-check_ss_sig>, B<-crl_check>, B<-crl_check_all>,\n"
|
||||
. "B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>, B<-inhibit_any>,\n"
|
||||
. "B<-inhibit_map>, B<-no_alt_chains>, B<-partial_chain>, B<-policy>,\n"
|
||||
. "B<-policy_check>, B<-policy_print>, B<-purpose>, B<-suiteB_128>,\n"
|
||||
. "B<-suiteB_128_only>, B<-suiteB_192>, B<-trusted_first>, B<-use_deltas>,\n"
|
||||
. "B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,\n"
|
||||
. "B<-verify_ip>, B<-verify_name>, B<-x509_strict>\n"
|
||||
. "B<-verify_ip>, B<-verify_name>, B<-x509_strict> B<-issuer_checks>\n"
|
||||
. "\n"
|
||||
. "Set various options of certificate chain verification.\n"
|
||||
. "See L<openssl(1)/Verification Options> for details.";
|
||||
@@ -62,7 +65,7 @@ $OpenSSL::safe::opt_x_synopsis = ""
|
||||
$OpenSSL::safe::opt_x_item = ""
|
||||
. "=item B<xkey> I<infile>, B<-xcert> I<file>, B<-xchain> I<file>,\n"
|
||||
. "B<-xchain_build> I<file>, B<-xcertform> B<DER>|B<PEM>,\n"
|
||||
. "B<-xkeyform> B<DER>|B<PEM>>\n"
|
||||
. "B<-xkeyform> B<DER>|B<PEM>\n"
|
||||
. "\n"
|
||||
. "Set extended certificate verification options.\n"
|
||||
. "See L<openssl(1)/Extended Verification Options> for details.";
|
||||
@@ -140,17 +143,17 @@ $OpenSSL::safe::opt_version_item = "\n"
|
||||
. "See L<openssl(1)/TLS Version Options>.";
|
||||
|
||||
# SSL connection options.
|
||||
# TODO(3.0) Not currently used. The refactoring needs to be done, and
|
||||
# the options will probably be re-ordered.
|
||||
# TODO # options will probably be re-ordered.
|
||||
$OpenSSL::safe::opt_s_synopsis = ""
|
||||
. "[B<-bugs>]\n"
|
||||
. "[B<-no_comp>]\n"
|
||||
. "[B<-comp>]\n"
|
||||
. "[B<-no_ticket>]\n"
|
||||
. "[B<-serverpref>]\n"
|
||||
. "[B<-legacy_renegotiation>]\n"
|
||||
. "[B<-no_renegotiation>]\n"
|
||||
. "[B<-legacy_server_connect>]\n"
|
||||
. "[B<-no_resumption_on_reneg>]\n"
|
||||
. "[B<-legacy_server_connect>]\n"
|
||||
. "[B<-no_legacy_server_connect>]\n"
|
||||
. "[B<-allow_no_dhe_kex>]\n"
|
||||
. "[B<-prioritize_chacha>]\n"
|
||||
@@ -159,7 +162,7 @@ $OpenSSL::safe::opt_s_synopsis = ""
|
||||
. "[B<-client_sigalgs> I<algs>]\n"
|
||||
. "[B<-groups> I<groups>]\n"
|
||||
. "[B<-curves> I<curves>]\n"
|
||||
. "[B<-named_curve> I<curves>]\n"
|
||||
. "[B<-named_curve> I<curve>]\n"
|
||||
. "[B<-cipher> I<ciphers>]\n"
|
||||
. "[B<-ciphersuites> I<1.3ciphers>]\n"
|
||||
. "[B<-min_protocol> I<minprot>]\n"
|
||||
@@ -168,12 +171,12 @@ $OpenSSL::safe::opt_s_synopsis = ""
|
||||
. "[B<-debug_broken_protocol>]\n"
|
||||
. "[B<-no_middlebox>]";
|
||||
$OpenSSL::safe::opt_s_item = ""
|
||||
. "=item B<-bugs>, B<-no_comp>, B<-no_ticket>, B<-serverpref>,"
|
||||
. "B<-legacy_renegotiation>, B<-no_renegotiation>, B<-legacy_server_connect>,\n"
|
||||
. "B<-no_resumption_on_reneg>, B<-no_legacy_server_connect>,\n"
|
||||
. "=item B<-bugs>, B<-comp>, B<-no_comp>, B<-no_ticket>, B<-serverpref>,\n"
|
||||
. "B<-legacy_renegotiation>, B<-no_renegotiation>, B<-no_resumption_on_reneg>,\n"
|
||||
. "B<-legacy_server_connect>, B<-no_legacy_server_connect>,\n"
|
||||
. "B<-allow_no_dhe_kex>, B<-prioritize_chacha>, B<-strict>, B<-sigalgs>\n"
|
||||
. "I<algs>, B<-client_sigalgs> I<algs>, B<-groups> I<groups>, B<-curves>\n"
|
||||
. "I<curves>, B<-named_curve> I<curves>, B<-cipher> I<ciphers>, B<-ciphersuites>\n"
|
||||
. "I<curves>, B<-named_curve> I<curve>, B<-cipher> I<ciphers>, B<-ciphersuites>\n"
|
||||
. "I<1.3ciphers>, B<-min_protocol> I<minprot>, B<-max_protocol> I<maxprot>,\n"
|
||||
. "B<-record_padding> I<padding>, B<-debug_broken_protocol>, B<-no_middlebox>\n"
|
||||
. "\n"
|
||||
|
||||
Reference in New Issue
Block a user