Latest update.
This commit is contained in:
@@ -11,8 +11,10 @@ BIO_connect_retry
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
||||
int BIO_wait(BIO *bio, time_t max_time);
|
||||
#endif
|
||||
int BIO_wait(BIO *bio, time_t max_time, unsigned int milliseconds);
|
||||
int BIO_connect_retry(BIO *bio, long timeout);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
@@ -21,9 +23,12 @@ 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>.
|
||||
BIO_wait() waits at most until B<max_time> on the given B<bio>,
|
||||
which is typically socket-based,
|
||||
for reading if B<bio> is supposed to read, else for writing.
|
||||
It succeeds immediately if B<max_time> == 0 (which means no timeout given).
|
||||
If sockets are not available it succeeds after waiting at most given
|
||||
B<milliseconds> in order to help avoiding a tight busy loop at the caller.
|
||||
|
||||
BIO_connect_retry() connects via the given B<bio>, retrying BIO_do_connect()
|
||||
until success or a timeout or error condition is reached.
|
||||
|
||||
@@ -8,12 +8,20 @@ DH_generate_key, DH_compute_key - perform Diffie-Hellman key exchange
|
||||
|
||||
#include <openssl/dh.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)>:
|
||||
|
||||
int DH_generate_key(DH *dh);
|
||||
|
||||
int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Both of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_derive_init(3)>
|
||||
and L<EVP_PKEY_derive(3)>.
|
||||
|
||||
DH_generate_key() performs the first step of a Diffie-Hellman key
|
||||
exchange by generating private and public DH values. By calling
|
||||
DH_compute_key(), these are combined with the other party's public
|
||||
@@ -40,8 +48,13 @@ The error codes can be obtained by L<ERR_get_error(3)>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_PKEY_derive(3)>,
|
||||
L<DH_new(3)>, L<ERR_get_error(3)>, L<RAND_bytes(3)>, L<DH_size(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
Both of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -12,6 +12,10 @@ parameters
|
||||
|
||||
#include <openssl/dh.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)>:
|
||||
|
||||
int DH_generate_parameters_ex(DH *dh, int prime_len, int generator, BN_GENCB *cb);
|
||||
|
||||
int DH_check(DH *dh, int *codes);
|
||||
@@ -30,6 +34,11 @@ L<openssl_user_macros(7)>:
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_check(3)>,
|
||||
L<EVP_PKEY_public_check(3)>, L<EVP_PKEY_private_check(3)> and
|
||||
L<EVP_PKEY_param_check(3)>.
|
||||
|
||||
DH_generate_parameters_ex() generates Diffie-Hellman parameters that can
|
||||
be shared among a group of users, and stores them in the provided B<DH>
|
||||
structure. The pseudo-random number generator must be
|
||||
@@ -144,6 +153,8 @@ L<DH_free(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
DH_generate_parameters() was deprecated in OpenSSL 0.9.8; use
|
||||
DH_generate_parameters_ex() instead.
|
||||
|
||||
|
||||
@@ -26,6 +26,11 @@ DH_get_length, DH_set_length - Routines for getting and setting data in a DH obj
|
||||
void DH_clear_flags(DH *dh, int flags);
|
||||
int DH_test_flags(const DH *dh, int flags);
|
||||
void DH_set_flags(DH *dh, int flags);
|
||||
|
||||
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)>:
|
||||
|
||||
ENGINE *DH_get0_engine(DH *d);
|
||||
long DH_get_length(const DH *dh);
|
||||
int DH_set_length(DH *dh, long length);
|
||||
@@ -78,12 +83,13 @@ zero if none of the flags are set. DH_clear_flags() clears the specified flags
|
||||
within the DH object.
|
||||
|
||||
DH_get0_engine() returns a handle to the ENGINE that has been set for this DH
|
||||
object, or NULL if no such ENGINE has been set.
|
||||
object, or NULL if no such ENGINE has been set. This function is deprecated.
|
||||
|
||||
The DH_get_length() and DH_set_length() functions get and set the optional
|
||||
length parameter associated with this DH object. If the length is nonzero then
|
||||
it is used, otherwise it is ignored. The B<length> parameter indicates the
|
||||
length of the secret exponent (private key) in bits.
|
||||
length of the secret exponent (private key) in bits. These functions are
|
||||
deprecated.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -114,6 +120,9 @@ L<DH_set_method(3)>, L<DH_size(3)>, L<DH_meth_new(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The DH_get0_engine(), DH_get_length() and DH_set_length() functions were
|
||||
deprecated in OpenSSL 3.0.
|
||||
|
||||
The functions described here were added in OpenSSL 1.1.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -14,6 +14,10 @@ DH_meth_set_generate_params - Routines to build up DH methods
|
||||
|
||||
#include <openssl/dh.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)>:
|
||||
|
||||
DH_METHOD *DH_meth_new(const char *name, int flags);
|
||||
|
||||
void DH_meth_free(DH_METHOD *dhm);
|
||||
@@ -58,6 +62,9 @@ DH_meth_set_generate_params - Routines to build up DH methods
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use the provider APIs.
|
||||
|
||||
The B<DH_METHOD> type is a structure used for the provision of custom DH
|
||||
implementations. It provides a set of functions used by OpenSSL for the
|
||||
implementation of the various DH capabilities.
|
||||
@@ -153,6 +160,8 @@ L<DH_set_method(3)>, L<DH_size(3)>, L<DH_get0_pqg(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
The functions described here were added in OpenSSL 1.1.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -8,6 +8,11 @@ DH_new_by_nid, DH_get_nid - get or find DH named parameters
|
||||
|
||||
#include <openssl/dh.h>
|
||||
DH *DH_new_by_nid(int nid);
|
||||
|
||||
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 *DH_get_nid(DH *dh);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
@@ -18,10 +23,9 @@ 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
|
||||
B<NID_undef> if there is no match.
|
||||
B<NID_undef> if there is no match. This function is deprecated.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
@@ -30,6 +34,10 @@ DH_new_by_nid() returns a set of DH parameters or B<NULL> if an error occurred.
|
||||
DH_get_nid() returns the NID of the matching set of parameters or
|
||||
B<NID_undef> if there is no match.
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The DH_get_nid() function was deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -9,6 +9,10 @@ DH_set_method, DH_new_method, DH_OpenSSL - select DH method
|
||||
|
||||
#include <openssl/dh.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 DH_set_default_method(const DH_METHOD *meth);
|
||||
|
||||
const DH_METHOD *DH_get_default_method(void);
|
||||
@@ -21,6 +25,9 @@ DH_set_method, DH_new_method, DH_OpenSSL - select DH method
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use the provider APIs.
|
||||
|
||||
A B<DH_METHOD> specifies the functions that OpenSSL uses for Diffie-Hellman
|
||||
operations. By modifying the method, alternative implementations
|
||||
such as hardware accelerators may be used. IMPORTANT: See the NOTES section for
|
||||
@@ -76,6 +83,10 @@ returns a pointer to the newly allocated structure.
|
||||
|
||||
L<DH_new(3)>, L<DH_new(3)>, L<DH_meth_new(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -9,6 +9,10 @@ security bits
|
||||
|
||||
#include <openssl/dh.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)>:
|
||||
|
||||
int DH_size(const DH *dh);
|
||||
|
||||
int DH_bits(const DH *dh);
|
||||
@@ -17,6 +21,10 @@ security bits
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_bits(3)>,
|
||||
L<EVP_PKEY_security_bits(3)> and L<EVP_PKEY_size(3)>.
|
||||
|
||||
DH_size() returns the Diffie-Hellman prime size in bytes. It can be used
|
||||
to determine how much memory must be allocated for the shared secret
|
||||
computed by L<DH_compute_key(3)>.
|
||||
@@ -38,11 +46,14 @@ DH_security_bits() returns the number of security bits.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<EVP_PKEY_bits(3)>,
|
||||
L<DH_new(3)>, L<DH_generate_key(3)>,
|
||||
L<BN_num_bits(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
The DH_bits() function was added in OpenSSL 1.1.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -8,10 +8,18 @@ DSA_dup_DH - create a DH structure out of DSA structure
|
||||
|
||||
#include <openssl/dsa.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)>:
|
||||
|
||||
DH *DSA_dup_DH(const DSA *r);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The function described on this page is deprecated. There is no direct
|
||||
replacement, applications should use the EVP_PKEY APIs for Diffie-Hellman
|
||||
operations.
|
||||
|
||||
DSA_dup_DH() duplicates DSA parameters/keys as DH parameters/keys. q
|
||||
is lost during that conversion, but the resulting DH parameters
|
||||
contain its length.
|
||||
@@ -29,6 +37,10 @@ Be careful to avoid small subgroup attacks when using this.
|
||||
|
||||
L<DH_new(3)>, L<DSA_new(3)>, L<ERR_get_error(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
This function was deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -331,7 +331,7 @@ EVP_MAC_do_all_provided() returns nothing at all.
|
||||
if (!EVP_MAC_init(ctx))
|
||||
goto err;
|
||||
|
||||
while ( (read_l = read(STDIN_FILENO, buf, sizeof(buf))) < 0) {
|
||||
while ( (read_l = read(STDIN_FILENO, buf, sizeof(buf))) > 0) {
|
||||
if (!EVP_MAC_update(ctx, buf, read_l))
|
||||
goto err;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ look like this:
|
||||
|
||||
$ MY_MAC=cmac MY_KEY=secret0123456789 MY_MAC_CIPHER=aes-128-cbc \
|
||||
LD_LIBRARY_PATH=. ./foo < foo.c
|
||||
Result: ECCAAFF041B22A2299EB90A1B53B6D45
|
||||
Result: C5C06683CD9DDEF904D754505C560A4E
|
||||
|
||||
(in this example, that program was stored in F<foo.c> and compiled to
|
||||
F<./foo>)
|
||||
|
||||
+110
-93
@@ -94,8 +94,8 @@ EVP_PKEY_CTX_set1_id, EVP_PKEY_CTX_get1_id, EVP_PKEY_CTX_get1_id_len
|
||||
|
||||
int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int pad);
|
||||
int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *pad);
|
||||
int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int len);
|
||||
int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *len);
|
||||
int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
|
||||
int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *saltlen);
|
||||
int EVP_PKEY_CTX_set_rsa_keygen_bits(EVP_PKEY_CTX *ctx, int mbits);
|
||||
int EVP_PKEY_CTX_set_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
|
||||
int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes);
|
||||
@@ -178,7 +178,7 @@ The parameters currently supported by the default provider are:
|
||||
|
||||
Sets the DH padding mode.
|
||||
If B<OSSL_EXCHANGE_PARAM_PAD> is 1 then the shared secret is padded with zeros
|
||||
up to the size of the DH prime B<p>.
|
||||
up to the size of the DH prime I<p>.
|
||||
If B<OSSL_EXCHANGE_PARAM_PAD> is zero (the default) then no padding is
|
||||
performed.
|
||||
|
||||
@@ -206,29 +206,29 @@ These functions must only be called after the EVP_PKEY_CTX has been initialised
|
||||
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
|
||||
B<optype> is a mask indicating which operations the control can be applied to.
|
||||
The control command is indicated in B<cmd> and any additional arguments in
|
||||
B<p1> and B<p2>.
|
||||
I<ctx>. The key type used must match I<keytype> if it is not -1. The parameter
|
||||
I<optype> is a mask indicating which operations the control can be applied to.
|
||||
The control command is indicated in I<cmd> and any additional arguments in
|
||||
I<p1> and I<p2>.
|
||||
|
||||
For B<cmd> = B<EVP_PKEY_CTRL_SET_MAC_KEY>, B<p1> is the length of the MAC key,
|
||||
and B<p2> is MAC key. This is used by Poly1305, SipHash, HMAC and CMAC.
|
||||
For I<cmd> = B<EVP_PKEY_CTRL_SET_MAC_KEY>, I<p1> is the length of the MAC key,
|
||||
and I<p2> is the MAC key. This is used by Poly1305, SipHash, HMAC and CMAC.
|
||||
|
||||
Applications will not normally call EVP_PKEY_CTX_ctrl() directly but will
|
||||
instead call one of the algorithm specific macros below.
|
||||
|
||||
The function EVP_PKEY_CTX_ctrl_uint64() is a wrapper that directly passes a
|
||||
uint64 value as B<p2> to EVP_PKEY_CTX_ctrl().
|
||||
uint64 value as I<p2> to EVP_PKEY_CTX_ctrl().
|
||||
|
||||
The function EVP_PKEY_CTX_ctrl_str() allows an application to send an algorithm
|
||||
specific control operation to a context B<ctx> in string form. This is
|
||||
specific control operation to a context I<ctx> in string form. This is
|
||||
intended to be used for options specified on the command line or in text
|
||||
files. The commands supported are documented in the openssl utility
|
||||
command line pages for the option B<-pkeyopt> which is supported by the
|
||||
B<pkeyutl>, B<genpkey> and B<req> commands.
|
||||
command line pages for the option I<-pkeyopt> which is supported by the
|
||||
I<pkeyutl>, I<genpkey> and I<req> commands.
|
||||
|
||||
The function EVP_PKEY_CTX_md() sends a message digest control operation
|
||||
to the context B<ctx>. The message digest is specified by its name B<md>.
|
||||
to the context I<ctx>. The message digest is specified by its name I<md>.
|
||||
|
||||
The EVP_PKEY_CTX_set_signature_md() function sets the message digest type used
|
||||
in a signature. It can be used in the RSA, DSA and ECDSA algorithms.
|
||||
@@ -251,8 +251,8 @@ supported by the L<EVP_PKEY_new_raw_private_key(3)> function.
|
||||
|
||||
=head2 RSA parameters
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_padding() function sets the RSA padding mode for B<ctx>.
|
||||
The B<pad> parameter can take the value B<RSA_PKCS1_PADDING> for PKCS#1
|
||||
The EVP_PKEY_CTX_set_rsa_padding() function sets the RSA padding mode for I<ctx>.
|
||||
The I<pad> parameter can take the value B<RSA_PKCS1_PADDING> for PKCS#1
|
||||
padding, B<RSA_SSLV23_PADDING> for SSLv23 padding, B<RSA_NO_PADDING> for
|
||||
no padding, B<RSA_PKCS1_OAEP_PADDING> for OAEP padding (encrypt and
|
||||
decrypt only), B<RSA_X931_PADDING> for X9.31 padding (signature operations
|
||||
@@ -270,45 +270,61 @@ padding for RSA the algorithm identifier byte is added or checked and removed
|
||||
if this control is called. If it is not called then the first byte of the plaintext
|
||||
buffer is expected to be the algorithm identifier byte.
|
||||
|
||||
The EVP_PKEY_CTX_get_rsa_padding() function gets the RSA padding mode for B<ctx>.
|
||||
The EVP_PKEY_CTX_get_rsa_padding() function gets the RSA padding mode for I<ctx>.
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_pss_saltlen() macro sets the RSA PSS salt length to
|
||||
B<len>. As its name implies it is only supported for PSS padding. Three special
|
||||
values are supported: B<RSA_PSS_SALTLEN_DIGEST> sets the salt length to the
|
||||
digest length, B<RSA_PSS_SALTLEN_MAX> sets the salt length to the maximum
|
||||
permissible value. When verifying B<RSA_PSS_SALTLEN_AUTO> causes the salt length
|
||||
to be automatically determined based on the B<PSS> block structure. If this
|
||||
macro is not called maximum salt length is used when signing and auto detection
|
||||
when verifying is used by default.
|
||||
The EVP_PKEY_CTX_set_rsa_pss_saltlen() function sets the RSA PSS salt
|
||||
length to I<saltlen>. As its name implies it is only supported for PSS
|
||||
padding. If this function is not called then the maximum salt length
|
||||
is used when signing and auto detection when verifying. Three special
|
||||
values are supported:
|
||||
|
||||
The EVP_PKEY_CTX_get_rsa_pss_saltlen() macro gets the RSA PSS salt length
|
||||
for B<ctx>. The padding mode must have been set to B<RSA_PKCS1_PSS_PADDING>.
|
||||
=over 4
|
||||
|
||||
=item B<RSA_PSS_SALTLEN_DIGEST>
|
||||
|
||||
sets the salt length to the digest length.
|
||||
|
||||
=item B<RSA_PSS_SALTLEN_MAX>
|
||||
|
||||
sets the salt length to the maximum permissible value.
|
||||
|
||||
=item B<RSA_PSS_SALTLEN_AUTO>
|
||||
|
||||
causes the salt length to be automatically determined based on the
|
||||
B<PSS> block structure when verifying. When signing, it has the same
|
||||
meaning as B<RSA_PSS_SALTLEN_MAX>.
|
||||
|
||||
=back
|
||||
|
||||
The EVP_PKEY_CTX_get_rsa_pss_saltlen() function gets the RSA PSS salt length
|
||||
for I<ctx>. The padding mode must already have been set to
|
||||
B<RSA_PKCS1_PSS_PADDING>.
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_keygen_bits() macro sets the RSA key length for
|
||||
RSA key generation to B<bits>. If not specified 1024 bits is used.
|
||||
RSA key generation to I<bits>. If not specified 2048 bits is used.
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_keygen_pubexp() macro sets the public exponent value
|
||||
for RSA key generation to B<pubexp>. Currently it should be an odd integer. The
|
||||
B<pubexp> pointer is used internally by this function so it should not be
|
||||
for RSA key generation to I<pubexp>. Currently it should be an odd integer. The
|
||||
I<pubexp> pointer is used internally by this function so it should not be
|
||||
modified or freed after the call. If not specified 65537 is used.
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_keygen_primes() macro sets the number of primes for
|
||||
RSA key generation to B<primes>. If not specified 2 is used.
|
||||
RSA key generation to I<primes>. If not specified 2 is used.
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_mgf1_md_name() function sets the MGF1 digest for RSA
|
||||
padding schemes to the digest named B<mdname>. If the RSA algorithm
|
||||
padding schemes to the digest named I<mdname>. If the RSA algorithm
|
||||
implementation for the selected provider supports it then the digest will be
|
||||
fetched using the properties B<mdprops>. If not explicitly set the signing
|
||||
fetched using the properties I<mdprops>. If not explicitly set the signing
|
||||
digest is used. The padding mode must have been set to B<RSA_PKCS1_OAEP_PADDING>
|
||||
or B<RSA_PKCS1_PSS_PADDING>.
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_mgf1_md() function does the same as
|
||||
EVP_PKEY_CTX_set_rsa_mgf1_md_name() except that the name of the digest is
|
||||
inferred from the supplied B<md> and it is not possible to specify any
|
||||
inferred from the supplied I<md> and it is not possible to specify any
|
||||
properties.
|
||||
|
||||
The EVP_PKEY_CTX_get_rsa_mgf1_md_name() function gets the name of the MGF1
|
||||
digest algorithm for B<ctx>. If not explicitly set the signing digest is used.
|
||||
digest algorithm for I<ctx>. If not explicitly set the signing digest is used.
|
||||
The padding mode must have been set to B<RSA_PKCS1_OAEP_PADDING> or
|
||||
B<RSA_PKCS1_PSS_PADDING>.
|
||||
|
||||
@@ -319,19 +335,19 @@ returned. The EVP_MD object may be NULL if the digest is not one of these (such
|
||||
as a digest only implemented in a third party provider).
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_oaep_md_name() function sets the message digest type
|
||||
used in RSA OAEP to the digest named B<mdname>. If the RSA algorithm
|
||||
used in RSA OAEP to the digest named I<mdname>. If the RSA algorithm
|
||||
implementation for the selected provider supports it then the digest will be
|
||||
fetched using the properties B<mdprops>. The padding mode must have been set to
|
||||
fetched using the properties I<mdprops>. The padding mode must have been set to
|
||||
B<RSA_PKCS1_OAEP_PADDING>.
|
||||
|
||||
The EVP_PKEY_CTX_set_rsa_oaep_md() function does the same as
|
||||
EVP_PKEY_CTX_set_rsa_oaep_md_name() except that the name of the digest is
|
||||
inferred from the supplied B<md> and it is not possible to specify any
|
||||
inferred from the supplied I<md> and it is not possible to specify any
|
||||
properties.
|
||||
|
||||
The EVP_PKEY_CTX_get_rsa_oaep_md_name() function gets the message digest
|
||||
algorithm name used in RSA OAEP and stores it in the buffer B<name> which is of
|
||||
size B<namelen>. The padding mode must have been set to
|
||||
algorithm name used in RSA OAEP and stores it in the buffer I<name> which is of
|
||||
size I<namelen>. The padding mode must have been set to
|
||||
B<RSA_PKCS1_OAEP_PADDING>. The buffer should be sufficiently large for any
|
||||
expected digest algorithm names or the function will fail.
|
||||
|
||||
@@ -342,13 +358,13 @@ returned. The EVP_MD object may be NULL if the digest is not one of these (such
|
||||
as a digest only implemented in a third party provider).
|
||||
|
||||
The EVP_PKEY_CTX_set0_rsa_oaep_label() function sets the RSA OAEP label to
|
||||
B<label> and its length to B<len>. If B<label> is NULL or B<len> is 0,
|
||||
I<label> and its length to I<len>. If I<label> is NULL or I<len> is 0,
|
||||
the label is cleared. The library takes ownership of the label so the
|
||||
caller should not free the original memory pointed to by B<label>.
|
||||
caller should not free the original memory pointed to by I<label>.
|
||||
The padding mode must have been set to B<RSA_PKCS1_OAEP_PADDING>.
|
||||
|
||||
The EVP_PKEY_CTX_get0_rsa_oaep_label() function gets the RSA OAEP label to
|
||||
B<label>. The return value is the label length. The padding mode
|
||||
I<label>. The return value is the label length. The padding mode
|
||||
must have been set to B<RSA_PKCS1_OAEP_PADDING>. The resulting pointer is owned
|
||||
by the library and should not be freed by the caller.
|
||||
|
||||
@@ -374,31 +390,31 @@ negotiated protocol version. Otherwise it should be left unset.
|
||||
=head2 DSA parameters
|
||||
|
||||
The EVP_PKEY_CTX_set_dsa_paramgen_bits() macro sets the number of bits used
|
||||
for DSA parameter generation to B<nbits>. If not specified, 1024 is used.
|
||||
for DSA parameter generation to I<nbits>. If not specified, 2048 is used.
|
||||
|
||||
The EVP_PKEY_CTX_set_dsa_paramgen_q_bits() macro sets the number of bits in the
|
||||
subprime parameter B<q> for DSA parameter generation to B<qbits>. If not
|
||||
specified, 160 is used. If a digest function is specified below, this parameter
|
||||
is ignored and instead, the number of bits in B<q> matches the size of the
|
||||
subprime parameter I<q> for DSA parameter generation to I<qbits>. If not
|
||||
specified, 224 is used. If a digest function is specified below, this parameter
|
||||
is ignored and instead, the number of bits in I<q> matches the size of the
|
||||
digest.
|
||||
|
||||
The EVP_PKEY_CTX_set_dsa_paramgen_md() macro sets the digest function used for
|
||||
DSA parameter generation to B<md>. If not specified, one of SHA-1, SHA-224, or
|
||||
SHA-256 is selected to match the bit length of B<q> above.
|
||||
DSA parameter generation to I<md>. If not specified, one of SHA-1, SHA-224, or
|
||||
SHA-256 is selected to match the bit length of I<q> above.
|
||||
|
||||
=head2 DH parameters
|
||||
|
||||
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
|
||||
prime parameter I<p> for DH parameter generation. If this macro is not called
|
||||
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
|
||||
optional subprime parameter I<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 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>
|
||||
The EVP_PKEY_CTX_set_dh_paramgen_generator() macro sets DH generator to I<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
|
||||
@@ -423,12 +439,12 @@ FIPS186-4 FFC parameter generator.
|
||||
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
|
||||
prime B<p>.
|
||||
If B<pad> is zero (the default) then no padding is performed.
|
||||
If I<pad> is 1 the shared secret is padded with zeros up to the size of the DH
|
||||
prime I<p>.
|
||||
If I<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 or RFC3526. The B<nid> parameter must be
|
||||
I<nid> as defined in RFC7919 or RFC3526. The I<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
|
||||
@@ -437,74 +453,74 @@ 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
|
||||
synonymous. They set the DH parameters to the values defined in RFC5114. The
|
||||
B<rfc5114> parameter must be 1, 2 or 3 corresponding to RFC5114 sections
|
||||
I<rfc5114> parameter must be 1, 2 or 3 corresponding to RFC5114 sections
|
||||
2.1, 2.2 and 2.3. or 0 to clear the stored value. This macro can be called
|
||||
during parameter generation. The B<ctx> must have a key type of
|
||||
during parameter generation. The I<ctx> must have a key type of
|
||||
B<EVP_PKEY_DHX>.
|
||||
The rfc5114 parameter and the nid parameter are mutually exclusive.
|
||||
|
||||
=head2 DH key derivation function parameters
|
||||
|
||||
Note that all of the following functions require that the B<ctx> parameter has
|
||||
Note that all of the following functions require that the I<ctx> parameter has
|
||||
a private key type of B<EVP_PKEY_DHX>. When using key derivation, the output of
|
||||
EVP_PKEY_derive() is the output of the KDF instead of the DH shared secret.
|
||||
The KDF output is typically used as a Key Encryption Key (KEK) that in turn
|
||||
encrypts a Content Encryption Key (CEK).
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_kdf_type() macro sets the key derivation function type
|
||||
to B<kdf> for DH key derivation. Possible values are B<EVP_PKEY_DH_KDF_NONE>
|
||||
to I<kdf> for DH key derivation. Possible values are B<EVP_PKEY_DH_KDF_NONE>
|
||||
and B<EVP_PKEY_DH_KDF_X9_42> which uses the key derivation specified in RFC2631
|
||||
(based on the keying algorithm described in X9.42). When using key derivation,
|
||||
the B<kdf_oid>, B<kdf_md> and B<kdf_outlen> parameters must also be specified.
|
||||
the I<kdf_oid>, I<kdf_md> and I<kdf_outlen> parameters must also be specified.
|
||||
|
||||
The EVP_PKEY_CTX_get_dh_kdf_type() macro gets the key derivation function type
|
||||
for B<ctx> used for DH key derivation. Possible values are B<EVP_PKEY_DH_KDF_NONE>
|
||||
for I<ctx> used for DH key derivation. Possible values are B<EVP_PKEY_DH_KDF_NONE>
|
||||
and B<EVP_PKEY_DH_KDF_X9_42>.
|
||||
|
||||
The EVP_PKEY_CTX_set0_dh_kdf_oid() macro sets the key derivation function
|
||||
object identifier to B<oid> for DH key derivation. This OID should identify
|
||||
object identifier to I<oid> for DH key derivation. This OID should identify
|
||||
the algorithm to be used with the Content Encryption Key.
|
||||
The library takes ownership of the object identifier so the caller should not
|
||||
free the original memory pointed to by B<oid>.
|
||||
free the original memory pointed to by I<oid>.
|
||||
|
||||
The EVP_PKEY_CTX_get0_dh_kdf_oid() macro gets the key derivation function oid
|
||||
for B<ctx> used for DH key derivation. The resulting pointer is owned by the
|
||||
for I<ctx> used for DH key derivation. The resulting pointer is owned by the
|
||||
library and should not be freed by the caller.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_kdf_md() macro sets the key derivation function
|
||||
message digest to B<md> for DH key derivation. Note that RFC2631 specifies
|
||||
message digest to I<md> for DH key derivation. Note that RFC2631 specifies
|
||||
that this digest should be SHA1 but OpenSSL tolerates other digests.
|
||||
|
||||
The EVP_PKEY_CTX_get_dh_kdf_md() macro gets the key derivation function
|
||||
message digest for B<ctx> used for DH key derivation.
|
||||
message digest for I<ctx> used for DH key derivation.
|
||||
|
||||
The EVP_PKEY_CTX_set_dh_kdf_outlen() macro sets the key derivation function
|
||||
output length to B<len> for DH key derivation.
|
||||
output length to I<len> for DH key derivation.
|
||||
|
||||
The EVP_PKEY_CTX_get_dh_kdf_outlen() macro gets the key derivation function
|
||||
output length for B<ctx> used for DH key derivation.
|
||||
output length for I<ctx> used for DH key derivation.
|
||||
|
||||
The EVP_PKEY_CTX_set0_dh_kdf_ukm() macro sets the user key material to
|
||||
B<ukm> and its length to B<len> for DH key derivation. This parameter is optional
|
||||
I<ukm> and its length to I<len> for DH key derivation. This parameter is optional
|
||||
and corresponds to the partyAInfo field in RFC2631 terms. The specification
|
||||
requires that it is 512 bits long but this is not enforced by OpenSSL.
|
||||
The library takes ownership of the user key material so the caller should not
|
||||
free the original memory pointed to by B<ukm>.
|
||||
free the original memory pointed to by I<ukm>.
|
||||
|
||||
The EVP_PKEY_CTX_get0_dh_kdf_ukm() macro gets the user key material for B<ctx>.
|
||||
The EVP_PKEY_CTX_get0_dh_kdf_ukm() macro gets the user key material for I<ctx>.
|
||||
The return value is the user key material length. The resulting pointer is owned
|
||||
by the library and should not be freed by the caller.
|
||||
|
||||
=head2 EC parameters
|
||||
|
||||
The EVP_PKEY_CTX_set_ec_paramgen_curve_nid() sets the EC curve for EC parameter
|
||||
generation to B<nid>. For EC parameter generation this macro must be called
|
||||
generation to I<nid>. For EC parameter generation this macro must be called
|
||||
or an error occurs because there is no default curve.
|
||||
This function can also be called to set the curve explicitly when
|
||||
generating an EC key.
|
||||
|
||||
The EVP_PKEY_CTX_set_ec_param_enc() macro sets the EC parameter encoding to
|
||||
B<param_enc> when generating EC parameters or an EC key. The encoding can be
|
||||
I<param_enc> when generating EC parameters or an EC key. The encoding can be
|
||||
B<OPENSSL_EC_EXPLICIT_CURVE> for explicit parameters (the default in versions
|
||||
of OpenSSL before 1.1.0) or B<OPENSSL_EC_NAMED_CURVE> to use named curve form.
|
||||
For maximum compatibility the named curve form should be used. Note: the
|
||||
@@ -514,45 +530,45 @@ versions should use 0 instead.
|
||||
=head2 ECDH parameters
|
||||
|
||||
The EVP_PKEY_CTX_set_ecdh_cofactor_mode() macro sets the cofactor mode to
|
||||
B<cofactor_mode> for ECDH key derivation. Possible values are 1 to enable
|
||||
I<cofactor_mode> for ECDH key derivation. Possible values are 1 to enable
|
||||
cofactor key derivation, 0 to disable it and -1 to clear the stored cofactor
|
||||
mode and fallback to the private key cofactor mode.
|
||||
|
||||
The EVP_PKEY_CTX_get_ecdh_cofactor_mode() macro returns the cofactor mode for
|
||||
B<ctx> used for ECDH key derivation. Possible values are 1 when cofactor key
|
||||
I<ctx> used for ECDH key derivation. Possible values are 1 when cofactor key
|
||||
derivation is enabled and 0 otherwise.
|
||||
|
||||
=head2 ECDH key derivation function parameters
|
||||
|
||||
The EVP_PKEY_CTX_set_ecdh_kdf_type() macro sets the key derivation function type
|
||||
to B<kdf> for ECDH key derivation. Possible values are B<EVP_PKEY_ECDH_KDF_NONE>
|
||||
to I<kdf> for ECDH key derivation. Possible values are B<EVP_PKEY_ECDH_KDF_NONE>
|
||||
and B<EVP_PKEY_ECDH_KDF_X9_63> which uses the key derivation specified in X9.63.
|
||||
When using key derivation, the B<kdf_md> and B<kdf_outlen> parameters must
|
||||
When using key derivation, the I<kdf_md> and I<kdf_outlen> parameters must
|
||||
also be specified.
|
||||
|
||||
The EVP_PKEY_CTX_get_ecdh_kdf_type() macro returns the key derivation function
|
||||
type for B<ctx> used for ECDH key derivation. Possible values are
|
||||
type for I<ctx> used for ECDH key derivation. Possible values are
|
||||
B<EVP_PKEY_ECDH_KDF_NONE> and B<EVP_PKEY_ECDH_KDF_X9_63>.
|
||||
|
||||
The EVP_PKEY_CTX_set_ecdh_kdf_md() macro sets the key derivation function
|
||||
message digest to B<md> for ECDH key derivation. Note that X9.63 specifies
|
||||
message digest to I<md> for ECDH key derivation. Note that X9.63 specifies
|
||||
that this digest should be SHA1 but OpenSSL tolerates other digests.
|
||||
|
||||
The EVP_PKEY_CTX_get_ecdh_kdf_md() macro gets the key derivation function
|
||||
message digest for B<ctx> used for ECDH key derivation.
|
||||
message digest for I<ctx> used for ECDH key derivation.
|
||||
|
||||
The EVP_PKEY_CTX_set_ecdh_kdf_outlen() macro sets the key derivation function
|
||||
output length to B<len> for ECDH key derivation.
|
||||
output length to I<len> for ECDH key derivation.
|
||||
|
||||
The EVP_PKEY_CTX_get_ecdh_kdf_outlen() macro gets the key derivation function
|
||||
output length for B<ctx> used for ECDH key derivation.
|
||||
output length for I<ctx> used for ECDH key derivation.
|
||||
|
||||
The EVP_PKEY_CTX_set0_ecdh_kdf_ukm() macro sets the user key material to B<ukm>
|
||||
The EVP_PKEY_CTX_set0_ecdh_kdf_ukm() macro sets the user key material to I<ukm>
|
||||
for ECDH key derivation. This parameter is optional and corresponds to the
|
||||
shared info in X9.63 terms. The library takes ownership of the user key material
|
||||
so the caller should not free the original memory pointed to by B<ukm>.
|
||||
so the caller should not free the original memory pointed to by I<ukm>.
|
||||
|
||||
The EVP_PKEY_CTX_get0_ecdh_kdf_ukm() macro gets the user key material for B<ctx>.
|
||||
The EVP_PKEY_CTX_get0_ecdh_kdf_ukm() macro gets the user key material for I<ctx>.
|
||||
The return value is the user key material length. The resulting pointer is owned
|
||||
by the library and should not be freed by the caller.
|
||||
|
||||
@@ -560,14 +576,14 @@ by the library and should not be freed by the caller.
|
||||
|
||||
The EVP_PKEY_CTX_set1_id(), EVP_PKEY_CTX_get1_id() and EVP_PKEY_CTX_get1_id_len()
|
||||
macros are used to manipulate the special identifier field for specific signature
|
||||
algorithms such as SM2. The EVP_PKEY_CTX_set1_id() sets an ID pointed by B<id> with
|
||||
the length B<id_len> to the library. The library takes a copy of the id so that
|
||||
the caller can safely free the original memory pointed to by B<id>. The
|
||||
algorithms such as SM2. The EVP_PKEY_CTX_set1_id() sets an ID pointed by I<id> with
|
||||
the length I<id_len> to the library. The library takes a copy of the id so that
|
||||
the caller can safely free the original memory pointed to by I<id>. The
|
||||
EVP_PKEY_CTX_get1_id_len() macro returns the length of the ID set via a previous
|
||||
call to EVP_PKEY_CTX_set1_id(). The length is usually used to allocate adequate
|
||||
memory for further calls to EVP_PKEY_CTX_get1_id(). The EVP_PKEY_CTX_get1_id()
|
||||
macro returns the previously set ID value to caller in B<id>. The caller should
|
||||
allocate adequate memory space for the B<id> before calling EVP_PKEY_CTX_get1_id().
|
||||
macro returns the previously set ID value to caller in I<id>. The caller should
|
||||
allocate adequate memory space for the I<id> before calling EVP_PKEY_CTX_get1_id().
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
@@ -598,8 +614,9 @@ EVP_PKEY_CTX_set_dh_pad(), EVP_PKEY_CTX_set_rsa_padding(),
|
||||
EVP_PKEY_CTX_get_rsa_padding(), EVP_PKEY_CTX_get_rsa_mgf1_md(),
|
||||
EVP_PKEY_CTX_set_rsa_mgf1_md(), EVP_PKEY_CTX_set_rsa_oaep_md(),
|
||||
EVP_PKEY_CTX_get_rsa_oaep_md(), EVP_PKEY_CTX_set0_rsa_oaep_label(),
|
||||
EVP_PKEY_CTX_get0_rsa_oaep_label() were macros in OpenSSL 1.1.1 and below. From
|
||||
OpenSSL 3.0 they are functions.
|
||||
EVP_PKEY_CTX_get0_rsa_oaep_label(), EVP_PKEY_CTX_set_rsa_pss_saltlen(),
|
||||
EVP_PKEY_CTX_get_rsa_pss_saltlen(), were macros in OpenSSL 1.1.1 and below.
|
||||
From OpenSSL 3.0 they are functions.
|
||||
|
||||
EVP_PKEY_CTX_get_rsa_oaep_md_name(), EVP_PKEY_CTX_get_rsa_mgf1_md_name(),
|
||||
EVP_PKEY_CTX_set_rsa_mgf1_md_name() and EVP_PKEY_CTX_set_rsa_oaep_md_name() were
|
||||
|
||||
@@ -27,7 +27,9 @@ creating a key from user data.
|
||||
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>.
|
||||
written to I<*ppkey>. The parameters that can be used for various types of key
|
||||
are as described in the "Built-in RSA Import/Export Types" section on the
|
||||
L<provider-keymgmt(7)> page.
|
||||
|
||||
EVP_PKEY_param_fromdata_settable() and EVP_PKEY_key_fromdata_settable()
|
||||
get a constant B<OSSL_PARAM> array that describes the settable parameters
|
||||
|
||||
@@ -53,8 +53,10 @@ put all intermediate values and computations there.
|
||||
|
||||
CRYPTO_secure_malloc_init() creates the secure heap, with the specified
|
||||
C<size> in bytes. The C<minsize> parameter is the minimum size to
|
||||
allocate from the heap. Both C<size> and C<minsize> must be a power
|
||||
of two.
|
||||
allocate from the heap or zero to use a reasonable default value.
|
||||
Both C<size> and, if specified, C<minsize> must be a power of two and
|
||||
C<minsize> should generally be small, for example 16 or 32.
|
||||
C<minsize> must be less than a quarter of C<size> in any case.
|
||||
|
||||
CRYPTO_secure_malloc_initialized() indicates whether or not the secure
|
||||
heap as been initialized and is available.
|
||||
|
||||
@@ -12,7 +12,8 @@ OSSL_PARAM_allocate_from_text
|
||||
int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to,
|
||||
const OSSL_PARAM *paramdefs,
|
||||
const char *key, const char *value,
|
||||
size_t value_n);
|
||||
size_t value_n,
|
||||
int *found);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -37,6 +38,9 @@ left untouched, allowing a caller to find out how large the buffer
|
||||
should be.
|
||||
I<buf> needs to be correctly aligned for the type of the B<OSSL_PARAM>
|
||||
I<key>.
|
||||
If <found> is not NULL, it is set to 1 if the parameter can be located and
|
||||
to 0 otherwise.
|
||||
|
||||
The caller must remember to free the data of I<to> when it's not
|
||||
useful any more.
|
||||
|
||||
@@ -127,7 +131,7 @@ Can be written like this instead:
|
||||
*vtmp++ = '\0';
|
||||
if (!OSSL_PARAM_allocate_from_text(¶ms[params_n],
|
||||
paramdefs, stmp,
|
||||
vtmp, strlen(vtmp)))
|
||||
vtmp, strlen(vtmp), NULL))
|
||||
goto err;
|
||||
}
|
||||
params[params_n] = OSSL_PARAM_construct_end();
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OSSL_SELF_TEST_new,
|
||||
OSSL_SELF_TEST_free,
|
||||
OSSL_SELF_TEST_onbegin,
|
||||
OSSL_SELF_TEST_oncorrupt_byte,
|
||||
OSSL_SELF_TEST_onend - functionality to trigger a callback during a self test
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/self_test.h>
|
||||
|
||||
OSSL_SELF_TEST *OSSL_SELF_TEST_new(OSSL_CALLBACK *cb, void *cbarg);
|
||||
void OSSL_SELF_TEST_free(OSSL_SELF_TEST *st);
|
||||
|
||||
void OSSL_SELF_TEST_onbegin(OSSL_SELF_TEST *st, const char *type,
|
||||
const char *desc);
|
||||
void OSSL_SELF_TEST_oncorrupt_byte(OSSL_SELF_TEST *st, unsigned char *bytes);
|
||||
void OSSL_SELF_TEST_onend(OSSL_SELF_TEST *st, int ret);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
These methods are intended for use by provider implementors, to display
|
||||
diagnostic information during self testing.
|
||||
|
||||
OSSL_SELF_TEST_new() allocates an opaque B<OSSL_SELF_TEST> object that has a
|
||||
callback and callback argument associated with it.
|
||||
|
||||
The callback I<cb> may be triggered multiple times by a self test to indicate
|
||||
different phases.
|
||||
|
||||
OSSL_SELF_TEST_free() frees the space allocated by OSSL_SELF_TEST_new().
|
||||
|
||||
OSSL_SELF_TEST_onbegin() may be inserted at the start of a block of self test
|
||||
code. It can be used for diagnostic purposes.
|
||||
If this method is called the callback I<cb> will receive the following
|
||||
B<OSSL_PARAM> object.
|
||||
|
||||
=over 4
|
||||
|
||||
=item "st-phase" (B<OSSL_PROV_PARAM_SELF_TEST_PHASE>) <UTF8 string>
|
||||
|
||||
The value is the string "Start"
|
||||
|
||||
=back
|
||||
|
||||
OSSL_SELF_TEST_oncorrupt_byte() may be inserted just after the known answer is
|
||||
calculated, but before the self test compares the result. The first byte in the
|
||||
passed in array of I<bytes> will be corrupted if the callback returns 0,
|
||||
otherwise it leaves the array unaltered. It can be used for failure testing.
|
||||
The I<type> and I<desc> can be used to identify an individual self test to
|
||||
target for failure testing.
|
||||
If this method is called the callback I<cb> will receive the following
|
||||
B<OSSL_PARAM> object.
|
||||
|
||||
=over 4
|
||||
|
||||
=item "st-phase" (B<OSSL_PROV_PARAM_SELF_TEST_PHASE>) <UTF8 string>
|
||||
|
||||
The value is the string "Corrupt"
|
||||
|
||||
=back
|
||||
|
||||
OSSL_SELF_TEST_onend() may be inserted at the end of a block of self test code
|
||||
just before cleanup to indicate if the test passed or failed. It can be used for
|
||||
diagnostic purposes.
|
||||
If this method is called the callback I<cb> will receive the following
|
||||
B<OSSL_PARAM> object.
|
||||
|
||||
=over 4
|
||||
|
||||
=item "st-phase" (B<OSSL_PROV_PARAM_SELF_TEST_PHASE>) <UTF8 string>
|
||||
|
||||
The value of the string is "Pass" if I<ret> is non zero, otherwise it has the
|
||||
value "Fail".
|
||||
|
||||
=back
|
||||
|
||||
After the callback I<cb> has been called the values that were set by
|
||||
OSSL_SELF_TEST_onbegin() for I<type> and I<desc> are set to the value "None".
|
||||
|
||||
If OSSL_SELF_TEST_onbegin(), OSSL_SELF_TEST_oncorrupt_byte() or
|
||||
OSSL_SELF_TEST_onend() is called the following additional B<OSSL_PARAM> are
|
||||
passed to the callback.
|
||||
|
||||
=over 4
|
||||
|
||||
=item "st-type" (B<OSSL_PROV_PARAM_SELF_TEST_TYPE>) <UTF8 string>
|
||||
|
||||
The value is setup by the I<type> passed to OSSL_SELF_TEST_onbegin().
|
||||
This allows the callback to identify the type of test being run.
|
||||
|
||||
=item "st-desc" (B<OSSL_PROV_PARAM_SELF_TEST_DESC>) <UTF8 string>
|
||||
|
||||
The value is setup by the I<type> passed to OSSL_SELF_TEST_onbegin().
|
||||
This allows the callback to identify the sub category of the test being run.
|
||||
|
||||
=back
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
OSSL_SELF_TEST_new() returns the allocated B<OSSL_SELF_TEST> object, or NULL if
|
||||
it fails.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
A single self test could be set up in the following way:
|
||||
|
||||
OSSL_SELF_TEST *st = NULL;
|
||||
OSSL_CALLBACK *cb;
|
||||
void *cbarg;
|
||||
int ok = 0;
|
||||
unsigned char out[EVP_MAX_MD_SIZE];
|
||||
unsigned int out_len = 0;
|
||||
EVP_MD_CTX *ctx = EVP_MD_CTX_new();
|
||||
EVP_MD *md = EVP_MD_fetch(libctx, t->algorithm, NULL);
|
||||
|
||||
/*
|
||||
* Retrieve the callback - will be NULL if not set by the application via
|
||||
* OSSL_SELF_TEST_set_callback().
|
||||
*/
|
||||
OSSL_SELF_TEST_get_callback(libctx, &cb, &cbarg);
|
||||
|
||||
st = OSSL_SELF_TEST_new(cb, cb_arg);
|
||||
|
||||
/* Trigger the optional callback */
|
||||
OSSL_SELF_TEST_onbegin(st, OSSL_SELF_TEST_TYPE_KAT_DIGEST,
|
||||
OSSL_SELF_TEST_DESC_MD_SHA2);
|
||||
|
||||
if (!EVP_DigestInit_ex(ctx, md, NULL)
|
||||
|| !EVP_DigestUpdate(ctx, pt, pt_len)
|
||||
|| !EVP_DigestFinal(ctx, out, &out_len))
|
||||
goto err;
|
||||
|
||||
/* Optional corruption - If the application callback returns 0 */
|
||||
OSSL_SELF_TEST_oncorrupt_byte(st, out);
|
||||
|
||||
if (out_len != t->expected_len
|
||||
|| memcmp(out, t->expected, out_len) != 0)
|
||||
goto err;
|
||||
ok = 1;
|
||||
err:
|
||||
OSSL_SELF_TEST_onend(st, ok);
|
||||
EVP_MD_free(md);
|
||||
EVP_MD_CTX_free(ctx);
|
||||
|
||||
Multiple self test's can be set up in a similar way by repeating the pattern of
|
||||
OSSL_SELF_TEST_onbegin(), OSSL_SELF_TEST_oncorrupt_byte(), OSSL_SELF_TEST_onend()
|
||||
for each test.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<OSSL_SELF_TEST_set_callback(3)>,
|
||||
L<openssl-core.h(7)>,
|
||||
L<OSSL_PROVIDER-FIPS(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The functions described here were added in OpenSSL 3.0.
|
||||
|
||||
=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
|
||||
@@ -32,6 +32,7 @@ not been called.
|
||||
|
||||
L<openssl-core.h(7)>,
|
||||
L<OSSL_PROVIDER-FIPS(7)>
|
||||
L<OSSL_SELF_TEST_new(3)>
|
||||
L<OPENSSL_CTX(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
+18
-6
@@ -23,8 +23,8 @@ L<openssl_user_macros(7)>:
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
RAND_bytes() puts B<num> cryptographically strong pseudo-random bytes
|
||||
into B<buf>.
|
||||
RAND_bytes() generates B<num> random bytes using a cryptographically
|
||||
secure pseudo random generator (CSPRNG) and stores them in B<buf>.
|
||||
|
||||
RAND_priv_bytes() has the same semantics as RAND_bytes(). It is intended to
|
||||
be used for generating values that should remain private. If using the
|
||||
@@ -44,10 +44,22 @@ ignored.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Always check the error return value of RAND_bytes() and
|
||||
RAND_priv_bytes() and do not take randomness for granted: an error occurs
|
||||
if the CSPRNG has not been seeded with enough randomness to ensure an
|
||||
unpredictable byte sequence.
|
||||
By default, the OpenSSL CSPRNG supports a security level of 256 bits, provided it
|
||||
was able to seed itself from a trusted entropy source.
|
||||
On all major platforms supported by OpenSSL (including the Unix-like platforms
|
||||
and Windows), OpenSSL is configured to automatically seed the CSPRNG on first use
|
||||
using the operating systems's random generator.
|
||||
|
||||
If the entropy source fails or is not available, the CSPRNG will enter an
|
||||
error state and refuse to generate random bytes. For that reason, it is important
|
||||
to always check the error return value of RAND_bytes() and RAND_priv_bytes() and
|
||||
not take randomness for granted.
|
||||
|
||||
On other platforms, there might not be a trusted entropy source available
|
||||
or OpenSSL might have been explicitly configured to use different entropy sources.
|
||||
If you are in doubt about the quality of the entropy source, don't hesitate to ask
|
||||
your operating system vendor or post a question on GitHub or the openssl-users
|
||||
mailing list.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
|
||||
@@ -8,12 +8,20 @@ RSA_check_key_ex, RSA_check_key - validate private RSA keys
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_check_key_ex(RSA *rsa, BN_GENCB *cb);
|
||||
|
||||
int RSA_check_key(RSA *rsa);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Both of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_public_check(3)>,
|
||||
L<EVP_PKEY_private_check(3)> and L<EVP_PKEY_pairwise_check(3)>.
|
||||
|
||||
RSA_check_key_ex() function validates RSA keys.
|
||||
It checks that B<p> and B<q> are
|
||||
in fact prime, and that B<n = p*q>.
|
||||
@@ -70,6 +78,8 @@ L<ERR_get_error(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
RSA_check_key_ex() appeared after OpenSSL 1.0.2.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -9,6 +9,10 @@ RSA_generate_multi_prime_key - generate RSA key pair
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
|
||||
int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb);
|
||||
|
||||
@@ -21,6 +25,10 @@ L<openssl_user_macros(7)>:
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_keygen_init(3)> and
|
||||
L<EVP_PKEY_keygen(3)>.
|
||||
|
||||
RSA_generate_key_ex() generates a 2-prime RSA key pair and stores it in the
|
||||
B<RSA> structure provided in B<rsa>. The pseudo-random number generator must
|
||||
be seeded prior to calling RSA_generate_key_ex().
|
||||
@@ -95,6 +103,8 @@ L<RAND(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
RSA_generate_key() was deprecated in OpenSSL 0.9.8; use
|
||||
RSA_generate_key_ex() instead.
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ RSA_meth_get_multi_prime_keygen, RSA_meth_set_multi_prime_keygen
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
RSA_METHOD *RSA_meth_new(const char *name, int flags);
|
||||
void RSA_meth_free(RSA_METHOD *meth);
|
||||
|
||||
@@ -123,6 +127,9 @@ RSA_meth_get_multi_prime_keygen, RSA_meth_set_multi_prime_keygen
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use the OSSL_PROVIDER APIs.
|
||||
|
||||
The B<RSA_METHOD> type is a structure used for the provision of custom
|
||||
RSA implementations. It provides a set of functions used by OpenSSL
|
||||
for the implementation of the various RSA capabilities.
|
||||
@@ -244,6 +251,8 @@ L<RSA_generate_multi_prime_key(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
RSA_meth_get_multi_prime_keygen() and RSA_meth_set_multi_prime_keygen() were
|
||||
added in OpenSSL 1.1.1.
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@ padding
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
|
||||
const unsigned char *f, int fl);
|
||||
|
||||
@@ -58,6 +62,9 @@ padding
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use the EVP PKEY APIs.
|
||||
|
||||
The RSA_padding_xxx_xxx() functions are called from the RSA encrypt,
|
||||
decrypt, sign and verify functions. Normally they should not be called
|
||||
from application programs.
|
||||
@@ -148,6 +155,10 @@ L<RSA_private_decrypt(3)>,
|
||||
L<RSA_sign(3)>, L<RSA_verify(3)>,
|
||||
L<RAND(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -8,6 +8,10 @@ RSA_private_encrypt, RSA_public_decrypt - low level signature operations
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_private_encrypt(int flen, unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
|
||||
@@ -16,6 +20,10 @@ RSA_private_encrypt, RSA_public_decrypt - low level signature operations
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Both of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_encrypt_init(3)>,
|
||||
L<EVP_PKEY_encrypt(3)>, L<EVP_PKEY_decrypt_init(3)> and L<EVP_PKEY_decrypt(3)>.
|
||||
|
||||
These functions handle RSA signatures at a low level.
|
||||
|
||||
RSA_private_encrypt() signs the B<flen> bytes at B<from> (usually a
|
||||
@@ -62,6 +70,10 @@ obtained by L<ERR_get_error(3)>.
|
||||
L<ERR_get_error(3)>,
|
||||
L<RSA_sign(3)>, L<RSA_verify(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
Both of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -8,6 +8,10 @@ RSA_public_encrypt, RSA_private_decrypt - RSA public key cryptography
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_public_encrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
|
||||
@@ -16,6 +20,10 @@ RSA_public_encrypt, RSA_private_decrypt - RSA public key cryptography
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Both of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_encrypt_init(3)>,
|
||||
L<EVP_PKEY_encrypt(3)>, L<EVP_PKEY_decrypt_init(3)> and L<EVP_PKEY_decrypt(3)>.
|
||||
|
||||
RSA_public_encrypt() encrypts the B<flen> bytes at B<from> (usually a
|
||||
session key) using the public key B<rsa> and stores the ciphertext in
|
||||
B<to>. B<to> must point to RSA_size(B<rsa>) bytes of memory.
|
||||
@@ -97,6 +105,10 @@ SSL, PKCS #1 v2.0
|
||||
L<ERR_get_error(3)>, L<RAND_bytes(3)>,
|
||||
L<RSA_size(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
Both of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -10,6 +10,10 @@ RSA_new_method - select RSA method
|
||||
|
||||
#include <openssl/rsa.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 RSA_set_default_method(const RSA_METHOD *meth);
|
||||
|
||||
RSA_METHOD *RSA_get_default_method(void);
|
||||
@@ -26,6 +30,9 @@ RSA_new_method - select RSA method
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use the OSSL_PROVIDER APIs.
|
||||
|
||||
An B<RSA_METHOD> specifies the functions that OpenSSL uses for RSA
|
||||
operations. By modifying the method, alternative implementations such as
|
||||
hardware accelerators may be used. IMPORTANT: See the NOTES section for
|
||||
@@ -171,6 +178,8 @@ L<RSA_new(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
The RSA_null_method(), which was a partial attempt to avoid patent issues,
|
||||
was replaced to always return NULL in OpenSSL 1.1.1.
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@ RSA_sign, RSA_verify - RSA signatures
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
|
||||
@@ -16,6 +20,10 @@ RSA_sign, RSA_verify - RSA signatures
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_sign_init(3)>, L<EVP_PKEY_sign(3)>,
|
||||
L<EVP_PKEY_verify_init(3)> and L<EVP_PKEY_verify(3)>.
|
||||
|
||||
RSA_sign() signs the message digest B<m> of size B<m_len> using the
|
||||
private key B<rsa> using RSASSA-PKCS1-v1_5 as specified in RFC 3447. It
|
||||
stores the signature in B<sigret> and the signature size in B<siglen>.
|
||||
@@ -53,6 +61,10 @@ L<ERR_get_error(3)>,
|
||||
L<RSA_private_encrypt(3)>,
|
||||
L<RSA_public_decrypt(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -8,6 +8,10 @@ RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
|
||||
unsigned int m_len, unsigned char *sigret,
|
||||
unsigned int *siglen, RSA *rsa);
|
||||
@@ -18,6 +22,9 @@ RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use EVP PKEY APIs.
|
||||
|
||||
RSA_sign_ASN1_OCTET_STRING() signs the octet string B<m> of size
|
||||
B<m_len> using the private key B<rsa> represented in DER using PKCS #1
|
||||
padding. It stores the signature in B<sigret> and the signature size
|
||||
@@ -55,6 +62,10 @@ L<RAND_bytes(3)>, L<RSA_sign(3)>,
|
||||
L<RSA_verify(3)>,
|
||||
L<RAND(7)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
@@ -8,6 +8,10 @@ RSA_size, RSA_bits, RSA_security_bits - get RSA modulus size or security bits
|
||||
|
||||
#include <openssl/rsa.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)>:
|
||||
|
||||
int RSA_size(const RSA *rsa);
|
||||
|
||||
int RSA_bits(const RSA *rsa);
|
||||
@@ -16,6 +20,10 @@ RSA_size, RSA_bits, RSA_security_bits - get RSA modulus size or security bits
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
All of the functions described on this page are deprecated.
|
||||
Applications should instead use L<EVP_PKEY_size(3)>, L<EVP_PKEY_bits(3)>
|
||||
and L<EVP_PKEY_security_bits(3)>.
|
||||
|
||||
RSA_size() returns the RSA modulus size in bytes. It can be used to
|
||||
determine how much memory must be allocated for an RSA encrypted
|
||||
value.
|
||||
@@ -41,6 +49,8 @@ L<BN_num_bits(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
All of these functions were deprecated in OpenSSL 3.0.
|
||||
|
||||
The RSA_bits() function was added in OpenSSL 1.1.0.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
X509_LOOKUP, X509_LOOKUP_TYPE,
|
||||
X509_LOOKUP_new, X509_LOOKUP_free, X509_LOOKUP_init,
|
||||
X509_LOOKUP_shutdown,
|
||||
X509_LOOKUP_set_method_data, X509_LOOKUP_get_method_data,
|
||||
X509_LOOKUP_ctrl,
|
||||
X509_LOOKUP_load_file, X509_LOOKUP_add_dir, X509_LOOKUP_add_store,
|
||||
X509_LOOKUP_load_store,
|
||||
X509_LOOKUP_get_store, X509_LOOKUP_by_subject,
|
||||
X509_LOOKUP_by_issuer_serial, X509_LOOKUP_by_fingerprint,
|
||||
X509_LOOKUP_by_alias
|
||||
- OpenSSL certificate lookup mechanisms
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/x509_vfy.h>
|
||||
|
||||
typedef x509_lookup_st X509_LOOKUP;
|
||||
|
||||
typedef enum X509_LOOKUP_TYPE;
|
||||
|
||||
X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
|
||||
int X509_LOOKUP_init(X509_LOOKUP *ctx);
|
||||
int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
|
||||
void X509_LOOKUP_free(X509_LOOKUP *ctx);
|
||||
|
||||
int X509_LOOKUP_set_method_data(X509_LOOKUP *ctx, void *data);
|
||||
void *X509_LOOKUP_get_method_data(const X509_LOOKUP *ctx);
|
||||
|
||||
int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
|
||||
long argl, char **ret);
|
||||
int X509_LOOKUP_load_file(X509_LOOKUP *ctx, char *name, long type);
|
||||
int X509_LOOKUP_add_dir(X509_LOOKUP *ctx, char *name, long type);
|
||||
int X509_LOOKUP_add_store(X509_LOOKUP *ctx, char *uri);
|
||||
int X509_LOOKUP_load_store(X509_LOOKUP *ctx, char *uri);
|
||||
|
||||
X509_STORE *X509_LOOKUP_get_store(const X509_LOOKUP *ctx);
|
||||
|
||||
int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name, X509_OBJECT *ret);
|
||||
int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name, ASN1_INTEGER *serial,
|
||||
X509_OBJECT *ret);
|
||||
int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
|
||||
const unsigned char *bytes, int len,
|
||||
X509_OBJECT *ret);
|
||||
int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
|
||||
const char *str, int len, X509_OBJECT *ret);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<X509_LOOKUP> structure holds the information needed to look up
|
||||
certificates and CRLs according to an associated L<X509_LOOKUP_METHOD(3)>.
|
||||
Multiple B<X509_LOOKUP> instances can be added to an L<X509_STORE(3)>
|
||||
to enable lookup in that store.
|
||||
|
||||
X509_LOOKUP_new() creates a new B<X509_LOOKUP> using the given lookup
|
||||
I<method>.
|
||||
It can also be created by calling L<X509_STORE_add_lookup(3)>, which
|
||||
will associate a B<X509_STORE> with the lookup mechanism.
|
||||
|
||||
X509_LOOKUP_init() initializes the internal state and resources as
|
||||
needed by the given B<X509_LOOKUP> to do its work.
|
||||
|
||||
X509_LOOKUP_shutdown() tears down the internal state and resources of
|
||||
the given B<X509_LOOKUP>.
|
||||
|
||||
X509_LOOKUP_free() destructs the given B<X509_LOOKUP>.
|
||||
|
||||
X509_LOOKUP_set_method_data() and X509_LOOKUP_get_method_data()
|
||||
associates and retrieves a pointer to application data to and from the
|
||||
given B<X509_LOOKUP>, respectively.
|
||||
|
||||
X509_LOOKUP_ctrl() is used to set or get additional data to or from a
|
||||
B<X509_LOOKUP> structure or its associated L<X509_LOOKUP_METHOD(3)>.
|
||||
The arguments of the control command are passed via I<argc> and I<argl>,
|
||||
its return value via I<*ret>.
|
||||
The meaning of the arguments depends on the I<cmd> number of the
|
||||
control command. In general, this function is not called directly, but
|
||||
wrapped by a macro call, see below.
|
||||
The control I<cmd>s known to OpenSSL are discussed in more depth
|
||||
in L</Control Commands>.
|
||||
|
||||
X509_LOOKUP_load_file() passes a filename to be loaded immediately
|
||||
into the associated B<X509_STORE>.
|
||||
I<type> indicates what type of object is expected.
|
||||
This can only be used with a lookup using the implementation
|
||||
L<X509_LOOKUP_file(3)>.
|
||||
|
||||
X509_LOOKUP_add_dir() passes a directory specification from which
|
||||
certificates and CRLs are loaded on demand into the associated
|
||||
B<X509_STORE>.
|
||||
I<type> indicates what type of object is expected.
|
||||
This can only be used with a lookup using the implementation
|
||||
L<X509_LOOKUP_hash_dir(3)>.
|
||||
|
||||
X509_LOOKUP_add_store() passes a URI for a directory-like structure
|
||||
from which containers with certificates and CRLs are loaded on demand
|
||||
into the associated B<X509_STORE>.
|
||||
X509_LOOKUP_load_store() passes a URI for a single container from
|
||||
which certificates and CRLs are immediately loaded into the associated
|
||||
B<X509_STORE>.
|
||||
These functions can only be used with a lookup using the
|
||||
implementation L<X509_LOOKUP_store(3)>.
|
||||
|
||||
X509_LOOKUP_load_file(), X509_LOOKUP_add_dir(),
|
||||
X509_LOOKUP_add_store(), and X509_LOOKUP_load_store() are implemented
|
||||
as macros that use X509_LOOKUP_ctrl().
|
||||
|
||||
X509_LOOKUP_by_subject(), X509_LOOKUP_by_issuer_serial(),
|
||||
X509_LOOKUP_by_fingerprint(), and X509_LOOKUP_by_alias() look up
|
||||
certificates and CRLs in the L<X509_STORE(3)> associated with the
|
||||
B<X509_LOOKUP> using different criteria, where the looked up object is
|
||||
stored in I<ret>.
|
||||
Some of the underlying B<X509_LOOKUP_METHOD>s will also cache objects
|
||||
matching the criteria in the associated B<X509_STORE>, which makes it
|
||||
possible to handle cases where the criteria have more than one hit.
|
||||
|
||||
=head2 Control Commands
|
||||
|
||||
The B<X509_LOOKUP_METHOD>s built into OpenSSL recognise the following
|
||||
X509_LOOKUP_ctrl() I<cmd>s:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<X509_L_FILE_LOAD>
|
||||
|
||||
This is the command that X509_LOOKUP_load_file() uses.
|
||||
The filename is passed in I<argc>, and the type in I<argl>.
|
||||
|
||||
=item B<X509_L_ADD_DIR>
|
||||
|
||||
This is the command that X509_LOOKUP_add_dir() uses.
|
||||
The directory specification is passed in I<argc>, and the type in
|
||||
I<argl>.
|
||||
|
||||
=item B<X509_L_ADD_STORE>
|
||||
|
||||
This is the command that X509_LOOKUP_add_store() uses.
|
||||
The URI is passed in I<argc>.
|
||||
|
||||
=item B<X509_L_LOAD_STORE>
|
||||
|
||||
This is the command that X509_LOOKUP_load_store() uses.
|
||||
The URI is passed in I<argc>.
|
||||
|
||||
=back
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
X509_LOOKUP_new() returns a B<X509_LOOKUP> pointer when successful,
|
||||
or NULL on error.
|
||||
|
||||
X509_LOOKUP_init() and X509_LOOKUP_shutdown() return 1 on success, or
|
||||
0 on error.
|
||||
|
||||
X509_LOOKUP_ctrl() returns -1 if the B<X509_LOOKUP> doesn't have an
|
||||
associated B<X509_LOOKUP_METHOD>, or 1 if the X<509_LOOKUP_METHOD>
|
||||
doesn't have a control function.
|
||||
Otherwise, it returns what the control function in the
|
||||
B<X509_LOOKUP_METHOD> returns, which is usually 1 on success and 0 in
|
||||
error.
|
||||
|
||||
X509_LOOKUP_get_store() returns a B<X509_STORE> pointer if there is
|
||||
one, otherwise NULL.
|
||||
|
||||
X509_LOOKUP_by_subject(), X509_LOOKUP_by_issuer_serial(),
|
||||
X509_LOOKUP_by_fingerprint(), and X509_LOOKUP_by_alias() all return 0
|
||||
if there is no B<X509_LOOKUP_METHOD> or that method doesn't implement
|
||||
the corresponding function.
|
||||
Otherwise, it returns what the corresponding function in the
|
||||
B<X509_LOOKUP_METHOD> returns, which is usually 1 on success and 0 in
|
||||
error.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<X509_LOOKUP_METHOD(3)>, L<X509_STORE(3)>
|
||||
|
||||
=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
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
X509_LOOKUP_METHOD,
|
||||
X509_LOOKUP_meth_new, X509_LOOKUP_meth_free, X509_LOOKUP_meth_set_new_item,
|
||||
X509_LOOKUP_meth_get_new_item, X509_LOOKUP_meth_set_free,
|
||||
X509_LOOKUP_meth_get_free, X509_LOOKUP_meth_set_init,
|
||||
@@ -16,14 +17,15 @@ X509_LOOKUP_get_by_fingerprint_fn, X509_LOOKUP_meth_set_get_by_fingerprint,
|
||||
X509_LOOKUP_meth_get_get_by_fingerprint,
|
||||
X509_LOOKUP_get_by_alias_fn, X509_LOOKUP_meth_set_get_by_alias,
|
||||
X509_LOOKUP_meth_get_get_by_alias,
|
||||
X509_LOOKUP_set_method_data, X509_LOOKUP_get_method_data,
|
||||
X509_LOOKUP_get_store, X509_OBJECT_set1_X509, X509_OBJECT_set1_X509_CRL
|
||||
X509_OBJECT_set1_X509, X509_OBJECT_set1_X509_CRL
|
||||
- Routines to build up X509_LOOKUP methods
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/x509_vfy.h>
|
||||
|
||||
typedef x509_lookup_method_st X509_LOOKUP_METHOD;
|
||||
|
||||
X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name);
|
||||
void X509_LOOKUP_meth_free(X509_LOOKUP_METHOD *method);
|
||||
|
||||
@@ -92,11 +94,6 @@ X509_LOOKUP_get_store, X509_OBJECT_set1_X509, X509_OBJECT_set1_X509_CRL
|
||||
X509_LOOKUP_get_by_alias_fn X509_LOOKUP_meth_get_get_by_alias(
|
||||
const X509_LOOKUP_METHOD *method);
|
||||
|
||||
int X509_LOOKUP_set_method_data(X509_LOOKUP *ctx, void *data);
|
||||
void *X509_LOOKUP_get_method_data(const X509_LOOKUP *ctx);
|
||||
|
||||
X509_STORE *X509_LOOKUP_get_store(const X509_LOOKUP *ctx);
|
||||
|
||||
int X509_OBJECT_set1_X509(X509_OBJECT *a, X509 *obj);
|
||||
int X509_OBJECT_set1_X509_CRL(X509_OBJECT *a, X509_CRL *obj);
|
||||
|
||||
@@ -118,7 +115,7 @@ X509_LOOKUP_get_new_item() and X509_LOOKUP_set_new_item() get and set the
|
||||
function that is called when an B<X509_LOOKUP> object is created with
|
||||
X509_LOOKUP_new(). If an X509_LOOKUP_METHOD requires any per-X509_LOOKUP
|
||||
specific data, the supplied new_item function should allocate this data and
|
||||
invoke X509_LOOKUP_set_method_data().
|
||||
invoke L<X509_LOOKUP_set_method_data(3)>.
|
||||
|
||||
X509_LOOKUP_get_free() and X509_LOOKUP_set_free() get and set the function
|
||||
that is used to free any method data that was allocated and set from within
|
||||
@@ -126,7 +123,7 @@ new_item function.
|
||||
|
||||
X509_LOOKUP_meth_get_init() and X509_LOOKUP_meth_set_init() get and set the
|
||||
function that is used to initialize the method data that was set with
|
||||
X509_LOOKUP_set_method_data() as part of the new_item routine.
|
||||
L<X509_LOOKUP_set_method_data(3)> as part of the new_item routine.
|
||||
|
||||
X509_LOOKUP_meth_get_shutdown() and X509_LOOKUP_meth_set_shutdown() get and set
|
||||
the function that is used to shut down the method data whose state was
|
||||
@@ -164,9 +161,9 @@ increments the result's reference count.
|
||||
|
||||
Any method data that was created as a result of the new_item function
|
||||
set by X509_LOOKUP_meth_set_new_item() can be accessed with
|
||||
X509_LOOKUP_get_method_data(). The B<X509_STORE> object that owns the
|
||||
X509_LOOKUP may be accessed with X509_LOOKUP_get_store(). Successful lookups
|
||||
should return 1, and unsuccessful lookups should return 0.
|
||||
L<X509_LOOKUP_get_method_data(3)>. The B<X509_STORE> object that owns the
|
||||
X509_LOOKUP may be accessed with L<X509_LOOKUP_get_store(3)>. Successful
|
||||
lookups should return 1, and unsuccessful lookups should return 0.
|
||||
|
||||
X509_LOOKUP_get_get_by_subject(), X509_LOOKUP_get_get_by_issuer_serial(),
|
||||
X509_LOOKUP_get_get_by_fingerprint(), X509_LOOKUP_get_get_by_alias() retrieve
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
X509_STORE,
|
||||
X509_STORE_add_cert, X509_STORE_add_crl, X509_STORE_set_depth,
|
||||
X509_STORE_set_flags, X509_STORE_set_purpose, X509_STORE_set_trust,
|
||||
X509_STORE_add_lookup,
|
||||
X509_STORE_load_file, X509_STORE_load_path, X509_STORE_load_store,
|
||||
X509_STORE_set_default_paths,
|
||||
X509_STORE_load_locations
|
||||
@@ -13,6 +15,8 @@ X509_STORE_load_locations
|
||||
|
||||
#include <openssl/x509_vfy.h>
|
||||
|
||||
typedef x509_store_st X509_STORE;
|
||||
|
||||
int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
|
||||
int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
|
||||
int X509_STORE_set_depth(X509_STORE *store, int depth);
|
||||
@@ -20,6 +24,9 @@ X509_STORE_load_locations
|
||||
int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
|
||||
int X509_STORE_set_trust(X509_STORE *ctx, int trust);
|
||||
|
||||
X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *store,
|
||||
X509_LOOKUP_METHOD *meth);
|
||||
|
||||
int X509_STORE_set_default_paths(X509_STORE *ctx);
|
||||
int X509_STORE_load_file(X509_STORE *ctx, const char *file);
|
||||
int X509_STORE_load_path(X509_STORE *ctx, const char *dir);
|
||||
@@ -72,6 +79,11 @@ for the corresponding values used in certificate chain validation. Their
|
||||
behavior is documented in the corresponding B<X509_VERIFY_PARAM> manual
|
||||
pages, e.g., L<X509_VERIFY_PARAM_set_depth(3)>.
|
||||
|
||||
X509_STORE_add_lookup() finds or creates a L<X509_LOOKUP(3)> with the
|
||||
L<X509_LOOKUP_METHOD(3)> I<meth> and adds it to the B<X509_STORE>
|
||||
I<store>. This also associates the B<X509_STORE> with the lookup, so
|
||||
B<X509_LOOKUP> functions can look up objects in that store.
|
||||
|
||||
X509_STORE_load_file() loads trusted certificate(s) into an
|
||||
B<X509_STORE> from a given file.
|
||||
|
||||
@@ -102,6 +114,9 @@ X509_STORE_load_path(), X509_STORE_load_store(),
|
||||
X509_STORE_load_locations(), and X509_STORE_set_default_paths() return
|
||||
1 on success or 0 on failure.
|
||||
|
||||
X509_STORE_add_lookup() returns the found or created
|
||||
L<X509_LOOKUP(3)>, or NULL on error.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<X509_LOOKUP_hash_dir(3)>.
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
i2s_ASN1_IA5STRING,
|
||||
s2i_ASN1_IA5STRING,
|
||||
i2s_ASN1_INTEGER,
|
||||
s2i_ASN1_INTEGER,
|
||||
i2s_ASN1_OCTET_STRING,
|
||||
s2i_ASN1_OCTET_STRING,
|
||||
i2s_ASN1_ENUMERATED,
|
||||
i2s_ASN1_ENUMERATED_TABLE,
|
||||
- convert objects from/to ASN.1/string representation
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
=for openssl generic
|
||||
|
||||
char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5);
|
||||
ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
|
||||
X509V3_CTX *ctx, const char *str);
|
||||
char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *method, const ASN1_INTEGER *a);
|
||||
ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value);
|
||||
char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
|
||||
const ASN1_OCTET_STRING *oct);
|
||||
ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
|
||||
X509V3_CTX *ctx, const char *str);
|
||||
char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *method, const ASN1_ENUMERATED *a);
|
||||
char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method,
|
||||
const ASN1_ENUMERATED *e);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
These functions convert OpenSSL objects to and from their ASN.1/string
|
||||
representation. This function is used for B<X509v3> extentions.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The letters B<i> and B<s> in B<i2s_ASN1_IA5STRING>() stand for
|
||||
"internal" (that is, an internal C structure) and string respectively.
|
||||
So B<i2s_ASN1_IA5STRING>() converts from internal to string.
|
||||
|
||||
It is the caller's responsibility to free the returned string.
|
||||
In the B<i2s_ASN1_IA5STRING>() function the string is copied and
|
||||
the ownership of the original string remains with the caller.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
B<i2s_ASN1_IA5STRING>() returns the pointer to a IA5 string
|
||||
or NULL if an error occurs.
|
||||
|
||||
B<s2i_ASN1_IA5STRING>() return a valid
|
||||
B<ASN1_IA5STRING> structure or NULL if an error occurs.
|
||||
|
||||
B<i2s_ASN1_INTEGER>() return a valid
|
||||
string or NULL if an error occurs.
|
||||
|
||||
B<s2i_ASN1_INTEGER>() returns the pointer to a B<ASN1_INTEGER>
|
||||
structure or NULL if an error occurs.
|
||||
|
||||
B<i2s_ASN1_OCTET_STRING>() returns the pointer to a OCTET_STRING string
|
||||
or NULL if an error occurs.
|
||||
|
||||
B<s2i_ASN1_OCTET_STRING>() return a valid
|
||||
B<ASN1_OCTET_STRING> structure or NULL if an error occurs.
|
||||
|
||||
B<i2s_ASN1_ENUMERATED>() return a valid
|
||||
string or NULL if an error occurs.
|
||||
|
||||
B<s2i_ASN1_ENUMERATED>() returns the pointer to a B<ASN1_ENUMERATED>
|
||||
structure or NULL if an error occurs.
|
||||
|
||||
=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
|
||||
Reference in New Issue
Block a user