diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-05-21 16:58:08 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-01 12:40:00 +0200 |
commit | ed576acdf591d4164905ab98e89ca5a3b99d90ab (patch) | |
tree | c0f36ca1b3d42f34c0c502e700ad09b69b713d3c /doc | |
parent | 5e2d22d53ed322a7124e26a4fbd116a8210eb77a (diff) |
Rename all getters to use get/get0 in name
For functions that exist in 1.1.1 provide a simple aliases via #define.
Fixes #15236
Functions with OSSL_DECODER_, OSSL_ENCODER_, OSSL_STORE_LOADER_,
EVP_KEYEXCH_, EVP_KEM_, EVP_ASYM_CIPHER_, EVP_SIGNATURE_,
EVP_KEYMGMT_, EVP_RAND_, EVP_MAC_, EVP_KDF_, EVP_PKEY_,
EVP_MD_, and EVP_CIPHER_ prefixes are renamed.
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15405)
Diffstat (limited to 'doc')
34 files changed, 455 insertions, 400 deletions
diff --git a/doc/build.info b/doc/build.info index 42c1804d6c..b77dac210c 100644 --- a/doc/build.info +++ b/doc/build.info @@ -1227,6 +1227,10 @@ DEPEND[html/man3/EVP_PKEY_get_group_name.html]=man3/EVP_PKEY_get_group_name.pod GENERATE[html/man3/EVP_PKEY_get_group_name.html]=man3/EVP_PKEY_get_group_name.pod DEPEND[man/man3/EVP_PKEY_get_group_name.3]=man3/EVP_PKEY_get_group_name.pod GENERATE[man/man3/EVP_PKEY_get_group_name.3]=man3/EVP_PKEY_get_group_name.pod +DEPEND[html/man3/EVP_PKEY_get_size.html]=man3/EVP_PKEY_get_size.pod +GENERATE[html/man3/EVP_PKEY_get_size.html]=man3/EVP_PKEY_get_size.pod +DEPEND[man/man3/EVP_PKEY_get_size.3]=man3/EVP_PKEY_get_size.pod +GENERATE[man/man3/EVP_PKEY_get_size.3]=man3/EVP_PKEY_get_size.pod DEPEND[html/man3/EVP_PKEY_gettable_params.html]=man3/EVP_PKEY_gettable_params.pod GENERATE[html/man3/EVP_PKEY_gettable_params.html]=man3/EVP_PKEY_gettable_params.pod DEPEND[man/man3/EVP_PKEY_gettable_params.3]=man3/EVP_PKEY_gettable_params.pod @@ -1275,10 +1279,6 @@ DEPEND[html/man3/EVP_PKEY_sign.html]=man3/EVP_PKEY_sign.pod GENERATE[html/man3/EVP_PKEY_sign.html]=man3/EVP_PKEY_sign.pod DEPEND[man/man3/EVP_PKEY_sign.3]=man3/EVP_PKEY_sign.pod GENERATE[man/man3/EVP_PKEY_sign.3]=man3/EVP_PKEY_sign.pod -DEPEND[html/man3/EVP_PKEY_size.html]=man3/EVP_PKEY_size.pod -GENERATE[html/man3/EVP_PKEY_size.html]=man3/EVP_PKEY_size.pod -DEPEND[man/man3/EVP_PKEY_size.3]=man3/EVP_PKEY_size.pod -GENERATE[man/man3/EVP_PKEY_size.3]=man3/EVP_PKEY_size.pod DEPEND[html/man3/EVP_PKEY_todata.html]=man3/EVP_PKEY_todata.pod GENERATE[html/man3/EVP_PKEY_todata.html]=man3/EVP_PKEY_todata.pod DEPEND[man/man3/EVP_PKEY_todata.3]=man3/EVP_PKEY_todata.pod @@ -3014,6 +3014,7 @@ html/man3/EVP_PKEY_fromdata.html \ html/man3/EVP_PKEY_get_default_digest_nid.html \ html/man3/EVP_PKEY_get_field_type.html \ html/man3/EVP_PKEY_get_group_name.html \ +html/man3/EVP_PKEY_get_size.html \ html/man3/EVP_PKEY_gettable_params.html \ html/man3/EVP_PKEY_is_a.html \ html/man3/EVP_PKEY_keygen.html \ @@ -3026,7 +3027,6 @@ html/man3/EVP_PKEY_set1_encoded_public_key.html \ html/man3/EVP_PKEY_set_type.html \ html/man3/EVP_PKEY_settable_params.html \ html/man3/EVP_PKEY_sign.html \ -html/man3/EVP_PKEY_size.html \ html/man3/EVP_PKEY_todata.html \ html/man3/EVP_PKEY_verify.html \ html/man3/EVP_PKEY_verify_recover.html \ @@ -3603,6 +3603,7 @@ man/man3/EVP_PKEY_fromdata.3 \ man/man3/EVP_PKEY_get_default_digest_nid.3 \ man/man3/EVP_PKEY_get_field_type.3 \ man/man3/EVP_PKEY_get_group_name.3 \ +man/man3/EVP_PKEY_get_size.3 \ man/man3/EVP_PKEY_gettable_params.3 \ man/man3/EVP_PKEY_is_a.3 \ man/man3/EVP_PKEY_keygen.3 \ @@ -3615,7 +3616,6 @@ man/man3/EVP_PKEY_set1_encoded_public_key.3 \ man/man3/EVP_PKEY_set_type.3 \ man/man3/EVP_PKEY_settable_params.3 \ man/man3/EVP_PKEY_sign.3 \ -man/man3/EVP_PKEY_size.3 \ man/man3/EVP_PKEY_todata.3 \ man/man3/EVP_PKEY_verify.3 \ man/man3/EVP_PKEY_verify_recover.3 \ diff --git a/doc/man3/BIO_f_md.pod b/doc/man3/BIO_f_md.pod index 8ad694853f..aa60ff4eb8 100644 --- a/doc/man3/BIO_f_md.pod +++ b/doc/man3/BIO_f_md.pod @@ -128,7 +128,7 @@ outputs them. This could be used with the examples above. if (!mdtmp) break; BIO_get_md(mdtmp, &md); - printf("%s digest", OBJ_nid2sn(EVP_MD_type(md))); + printf("%s digest", OBJ_nid2sn(EVP_MD_get_type(md))); mdlen = BIO_gets(mdtmp, mdbuf, EVP_MAX_MD_SIZE); for (i = 0; i < mdlen; i++) printf(":%02X", mdbuf[i]); printf("\n"); diff --git a/doc/man3/DH_size.pod b/doc/man3/DH_size.pod index e4b7e429a0..75cdc9744c 100644 --- a/doc/man3/DH_size.pod +++ b/doc/man3/DH_size.pod @@ -22,8 +22,8 @@ L<openssl_user_macros(7)>: =head1 DESCRIPTION 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)>. +Applications should instead use L<EVP_PKEY_get_bits(3)>, +L<EVP_PKEY_get_security_bits(3)> and L<EVP_PKEY_get_size(3)>. DH_bits() returns the number of significant bits. @@ -49,7 +49,7 @@ B<dh> doesn't hold any key parameters. =head1 SEE ALSO -L<EVP_PKEY_bits(3)>, +L<EVP_PKEY_get_bits(3)>, L<DH_new(3)>, L<DH_generate_key(3)>, L<BN_num_bits(3)> diff --git a/doc/man3/DSA_size.pod b/doc/man3/DSA_size.pod index b904845447..0d0d1e5994 100644 --- a/doc/man3/DSA_size.pod +++ b/doc/man3/DSA_size.pod @@ -21,8 +21,8 @@ L<openssl_user_macros(7)>: =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)>. +Applications should instead use L<EVP_PKEY_get_bits(3)>, +L<EVP_PKEY_get_security_bits(3)> and L<EVP_PKEY_get_size(3)>. DSA_bits() returns the number of bits in key I<dsa>: this is the number of bits in the I<p> parameter. @@ -47,9 +47,9 @@ hold any key parameters. =head1 SEE ALSO -L<EVP_PKEY_bits(3)>, -L<EVP_PKEY_security_bits(3)>, -L<EVP_PKEY_size(3)>, +L<EVP_PKEY_get_bits(3)>, +L<EVP_PKEY_get_security_bits(3)>, +L<EVP_PKEY_get_size(3)>, L<DSA_new(3)>, L<DSA_sign(3)> =head1 HISTORY diff --git a/doc/man3/EVP_ASYM_CIPHER_free.pod b/doc/man3/EVP_ASYM_CIPHER_free.pod index 93df44ec8f..2b34eb4469 100644 --- a/doc/man3/EVP_ASYM_CIPHER_free.pod +++ b/doc/man3/EVP_ASYM_CIPHER_free.pod @@ -3,9 +3,9 @@ =head1 NAME EVP_ASYM_CIPHER_fetch, EVP_ASYM_CIPHER_free, EVP_ASYM_CIPHER_up_ref, -EVP_ASYM_CIPHER_number, EVP_ASYM_CIPHER_is_a, EVP_ASYM_CIPHER_provider, +EVP_ASYM_CIPHER_get_number, EVP_ASYM_CIPHER_is_a, EVP_ASYM_CIPHER_get0_provider, EVP_ASYM_CIPHER_do_all_provided, EVP_ASYM_CIPHER_names_do_all, -EVP_ASYM_CIPHER_name, EVP_ASYM_CIPHER_description, +EVP_ASYM_CIPHER_get0_name, EVP_ASYM_CIPHER_get0_description, EVP_ASYM_CIPHER_gettable_ctx_params, EVP_ASYM_CIPHER_settable_ctx_params - Functions to manage EVP_ASYM_CIPHER algorithm objects @@ -17,10 +17,10 @@ EVP_ASYM_CIPHER_gettable_ctx_params, EVP_ASYM_CIPHER_settable_ctx_params const char *properties); void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher); int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher); - int EVP_ASYM_CIPHER_number(const EVP_ASYM_CIPHER *cipher); - const char *EVP_ASYM_CIPHER_name(const EVP_ASYM_CIPHER *cipher); + int EVP_ASYM_CIPHER_get_number(const EVP_ASYM_CIPHER *cipher); + const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher); int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name); - OSSL_PROVIDER *EVP_ASYM_CIPHER_provider(const EVP_ASYM_CIPHER *cipher); + OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher); void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx, void (*fn)(EVP_ASYM_CIPHER *cipher, void *arg), @@ -28,7 +28,7 @@ EVP_ASYM_CIPHER_gettable_ctx_params, EVP_ASYM_CIPHER_settable_ctx_params int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher, void (*fn)(const char *name, void *data), void *data); - const char *EVP_ASYM_CIPHER_description(const EVP_ASYM_CIPHER *cipher); + const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher); const OSSL_PARAM *EVP_ASYM_CIPHER_gettable_ctx_params(const EVP_ASYM_CIPHER *cip); const OSSL_PARAM *EVP_ASYM_CIPHER_settable_ctx_params(const EVP_ASYM_CIPHER *cip); @@ -54,17 +54,18 @@ B<EVP_ASYM_CIPHER> structure. EVP_ASYM_CIPHER_is_a() returns 1 if I<cipher> is an implementation of an algorithm that's identifiable with I<name>, otherwise 0. -EVP_ASYM_CIPHER_provider() returns the provider that I<cipher> was fetched from. +EVP_ASYM_CIPHER_get0_provider() returns the provider that I<cipher> was +fetched from. EVP_ASYM_CIPHER_do_all_provided() traverses all EVP_ASYM_CIPHERs implemented by all activated providers in the given library context I<libctx>, and for each of the implementations, calls the given function I<fn> with the implementation method and the given I<arg> as argument. -EVP_ASYM_CIPHER_number() returns the internal dynamic number assigned to +EVP_ASYM_CIPHER_get_number() returns the internal dynamic number assigned to I<cipher>. -EVP_ASYM_CIPHER_name() returns the algorithm name from the provided +EVP_ASYM_CIPHER_get0_name() returns the algorithm name from the provided implementation for the given I<cipher>. Note that the I<cipher> may have multiple synonyms associated with it. In this case the first name from the algorithm definition is returned. Ownership of the returned string is retained @@ -73,9 +74,9 @@ by the I<cipher> object and should not be freed by the caller. EVP_ASYM_CIPHER_names_do_all() traverses all names for I<cipher>, and calls I<fn> with each name and I<data>. -EVP_ASYM_CIPHER_description() returns a description of the I<cipher>, meant -for display and human consumption. The description is at the discretion of -the I<cipher> implementation. +EVP_ASYM_CIPHER_get0_description() returns a description of the I<cipher>, +meant for display and human consumption. The description is at the +discretion of the I<cipher> implementation. EVP_ASYM_CIPHER_gettable_ctx_params() and EVP_ASYM_CIPHER_settable_ctx_params() return a constant B<OSSL_PARAM> array that describes the names and types of key diff --git a/doc/man3/EVP_CIPHER_CTX_get_original_iv.pod b/doc/man3/EVP_CIPHER_CTX_get_original_iv.pod index c5995a584d..f5021b8728 100644 --- a/doc/man3/EVP_CIPHER_CTX_get_original_iv.pod +++ b/doc/man3/EVP_CIPHER_CTX_get_original_iv.pod @@ -25,11 +25,12 @@ L<openssl_user_macros(7)>: EVP_CIPHER_CTX_get_original_iv() and EVP_CIPHER_CTX_get_updated_iv() copy initialization vector (IV) information from the B<EVP_CIPHER_CTX> into the -caller-supplied buffer. L<EVP_CIPHER_CTX_iv_length(3)> can be used to determine -an appropriate buffer size, and if the supplied buffer is too small, an error -will be returned (and no data copied). EVP_CIPHER_CTX_get_original_iv() -accesses the ("original") IV that was supplied when the B<EVP_CIPHER_CTX> was -initialized, and EVP_CIPHER_CTX_get_updated_iv() accesses the current "IV state" +caller-supplied buffer. L<EVP_CIPHER_CTX_get_iv_length(3)> can be used to +determine an appropriate buffer size, and if the supplied buffer is too small, +an error will be returned (and no data copied). +EVP_CIPHER_CTX_get_original_iv() accesses the ("original") IV that was +supplied when the B<EVP_CIPHER_CTX> was initialized, and +EVP_CIPHER_CTX_get_updated_iv() accesses the current "IV state" of the cipher, which is updated during cipher operation for certain cipher modes (e.g., CBC and OFB). diff --git a/doc/man3/EVP_DigestInit.pod b/doc/man3/EVP_DigestInit.pod index 4b6aaeeb1c..9c9403cbd3 100644 --- a/doc/man3/EVP_DigestInit.pod +++ b/doc/man3/EVP_DigestInit.pod @@ -12,16 +12,16 @@ EVP_MD_CTX_settable_params, EVP_MD_CTX_gettable_params, EVP_MD_CTX_set_flags, EVP_MD_CTX_clear_flags, EVP_MD_CTX_test_flags, EVP_Q_digest, EVP_Digest, EVP_DigestInit_ex2, EVP_DigestInit_ex, EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal_ex, EVP_DigestFinalXOF, EVP_DigestFinal, -EVP_MD_is_a, EVP_MD_name, EVP_MD_description, EVP_MD_number, -EVP_MD_names_do_all, EVP_MD_provider, -EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, EVP_MD_block_size, EVP_MD_flags, -EVP_MD_CTX_name, +EVP_MD_is_a, EVP_MD_get0_name, EVP_MD_get0_description, EVP_MD_get_number, +EVP_MD_names_do_all, EVP_MD_get0_provider, +EVP_MD_get_type, EVP_MD_get_pkey_type, EVP_MD_get_size, EVP_MD_get_block_size, EVP_MD_get_flags, +EVP_MD_CTX_get0_name, EVP_MD_CTX_md, EVP_MD_CTX_get0_md, EVP_MD_CTX_get1_md, -EVP_MD_CTX_type, EVP_MD_CTX_size, EVP_MD_CTX_block_size, -EVP_MD_CTX_md_data, EVP_MD_CTX_update_fn, EVP_MD_CTX_set_update_fn, +EVP_MD_CTX_get_type, EVP_MD_CTX_get_size, EVP_MD_CTX_get_block_size, +EVP_MD_CTX_get0_md_data, EVP_MD_CTX_update_fn, EVP_MD_CTX_set_update_fn, EVP_md_null, EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj, -EVP_MD_CTX_pkey_ctx, EVP_MD_CTX_set_pkey_ctx, +EVP_MD_CTX_get_pkey_ctx, EVP_MD_CTX_set_pkey_ctx, EVP_MD_do_all_provided - EVP digest routines @@ -68,27 +68,27 @@ EVP_MD_do_all_provided int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in); - const char *EVP_MD_name(const EVP_MD *md); - const char *EVP_MD_description(const EVP_MD *md); - int EVP_MD_number(const EVP_MD *md); + const char *EVP_MD_get0_name(const EVP_MD *md); + const char *EVP_MD_get0_description(const EVP_MD *md); + int EVP_MD_get_number(const EVP_MD *md); int EVP_MD_is_a(const EVP_MD *md, const char *name); int EVP_MD_names_do_all(const EVP_MD *md, void (*fn)(const char *name, void *data), void *data); - const OSSL_PROVIDER *EVP_MD_provider(const EVP_MD *md); - int EVP_MD_type(const EVP_MD *md); - int EVP_MD_pkey_type(const EVP_MD *md); - int EVP_MD_size(const EVP_MD *md); - int EVP_MD_block_size(const EVP_MD *md); - unsigned long EVP_MD_flags(const EVP_MD *md); + const OSSL_PROVIDER *EVP_MD_get0_provider(const EVP_MD *md); + int EVP_MD_get_type(const EVP_MD *md); + int EVP_MD_get_pkey_type(const EVP_MD *md); + int EVP_MD_get_size(const EVP_MD *md); + int EVP_MD_get_block_size(const EVP_MD *md); + unsigned long EVP_MD_get_flags(const EVP_MD *md); const EVP_MD *EVP_MD_CTX_get0_md(const EVP_MD_CTX *ctx); EVP_MD *EVP_MD_CTX_get1_md(EVP_MD_CTX *ctx); - const char *EVP_MD_CTX_name(const EVP_MD_CTX *ctx); - int EVP_MD_CTX_size(const EVP_MD_CTX *ctx); - int EVP_MD_CTX_block_size(const EVP_MD_CTX *ctx); - int EVP_MD_CTX_type(const EVP_MD_CTX *ctx); - void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); + const char *EVP_MD_CTX_get0_name(const EVP_MD_CTX *ctx); + int EVP_MD_CTX_get_size(const EVP_MD_CTX *ctx); + int EVP_MD_CTX_get_block_size(const EVP_MD_CTX *ctx); + int EVP_MD_CTX_get_type(const EVP_MD_CTX *ctx); + void *EVP_MD_CTX_get0_md_data(const EVP_MD_CTX *ctx); const EVP_MD *EVP_md_null(void); @@ -96,7 +96,7 @@ EVP_MD_do_all_provided const EVP_MD *EVP_get_digestbynid(int type); const EVP_MD *EVP_get_digestbyobj(const ASN1_OBJECT *o); - EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx); + EVP_PKEY_CTX *EVP_MD_CTX_get_pkey_ctx(const EVP_MD_CTX *ctx); void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); void EVP_MD_do_all_provided(OSSL_LIB_CTX *libctx, @@ -312,13 +312,13 @@ EVP_sha256() rather than the result of an EVP_MD_fetch()), only cipher names registered with the default library context (see L<OSSL_LIB_CTX(3)>) will be considered. -=item EVP_MD_number() +=item EVP_MD_get_number() Returns the internal dynamic number assigned to the I<md>. This is only useful with fetched B<EVP_MD>s. -=item EVP_MD_name(), -EVP_MD_CTX_name() +=item EVP_MD_get0_name(), +EVP_MD_CTX_get0_name() Return the name of the given message digest. For fetched message digests with multiple names, only one of them is returned; it's @@ -329,36 +329,36 @@ recommended to use EVP_MD_names_do_all() instead. Traverses all names for the I<md>, and calls I<fn> with each name and I<data>. This is only useful with fetched B<EVP_MD>s. -=item EVP_MD_description() +=item EVP_MD_get0_description() Returns a description of the digest, meant for display and human consumption. The description is at the discretion of the digest implementation. -=item EVP_MD_provider() +=item EVP_MD_get0_provider() Returns an B<OSSL_PROVIDER> pointer to the provider that implements the given B<EVP_MD>. -=item EVP_MD_size(), -EVP_MD_CTX_size() +=item EVP_MD_get_size(), +EVP_MD_CTX_get_size() Return the size of the message digest when passed an B<EVP_MD> or an B<EVP_MD_CTX> structure, i.e. the size of the hash. -=item EVP_MD_block_size(), -EVP_MD_CTX_block_size() +=item EVP_MD_get_block_size(), +EVP_MD_CTX_get_block_size() Return the block size of the message digest when passed an B<EVP_MD> or an B<EVP_MD_CTX> structure. -=item EVP_MD_type(), -EVP_MD_CTX_type() +=item EVP_MD_get_type(), +EVP_MD_CTX_get_type() Return the NID of the OBJECT IDENTIFIER representing the given message digest -when passed an B<EVP_MD> structure. For example, C<EVP_MD_type(EVP_sha1())> +when passed an B<EVP_MD> structure. For example, C<EVP_MD_get_type(EVP_sha1())> returns B<NID_sha1>. This function is normally used when setting ASN1 OIDs. -=item EVP_MD_CTX_md_data() +=item EVP_MD_CTX_get0_md_data() Return the digest method private data for the passed B<EVP_MD_CTX>. The space is allocated by OpenSSL and has the size originally set with @@ -386,12 +386,12 @@ update function from the B<EVP_MD> type specified at initialization is used. Returns the update function for I<ctx>. -=item EVP_MD_flags() +=item EVP_MD_get_flags() Returns the I<md> flags. Note that these are different from the B<EVP_MD_CTX> ones. See L<EVP_MD_meth_set_flags(3)> for more information. -=item EVP_MD_pkey_type() +=item EVP_MD_get_pkey_type() Returns the NID of the public key signing algorithm associated with this digest. For example EVP_sha1() is associated with RSA so this will return @@ -410,7 +410,7 @@ EVP_get_digestbyobj() Returns an B<EVP_MD> structure when passed a digest name, a digest B<NID> or an B<ASN1_OBJECT> structure respectively. -=item EVP_MD_CTX_pkey_ctx() +=item EVP_MD_CTX_get_pkey_ctx() Returns the B<EVP_PKEY_CTX> assigned to I<ctx>. The returned pointer should not be freed by the caller. @@ -568,16 +568,16 @@ to get. Returns 1 if successful or 0 for failure. -=item EVP_MD_type(), -EVP_MD_pkey_type() +=item EVP_MD_get_type(), +EVP_MD_get_pkey_type() Returns the NID of the corresponding OBJECT IDENTIFIER or NID_undef if none exists. -=item EVP_MD_size(), -EVP_MD_block_size(), -EVP_MD_CTX_size(), -EVP_MD_CTX_block_size() +=item EVP_MD_get_size(), +EVP_MD_get_block_size(), +EVP_MD_CTX_get_size(), +EVP_MD_CTX_get_block_size() Returns the digest or block size in bytes. @@ -625,9 +625,9 @@ implementations of digests to be specified. If digest contexts are not cleaned up after use, memory leaks will occur. -EVP_MD_CTX_name(), EVP_MD_CTX_size(), EVP_MD_CTX_block_size(), -EVP_MD_CTX_type(), EVP_get_digestbynid() and EVP_get_digestbyobj() are defined -as macros. +EVP_MD_CTX_get0_name(), EVP_MD_CTX_get_size(), EVP_MD_CTX_get_block_size(), +EVP_MD_CTX_get_type(), EVP_get_digestbynid() and EVP_get_digestbyobj() are +defined as macros. EVP_MD_CTX_ctrl() sends commands to message digests for additional configuration or control. diff --git a/doc/man3/EVP_DigestSignInit.pod b/doc/man3/EVP_DigestSignInit.pod index a24db53949..86d4270ed4 100644 --- a/doc/man3/EVP_DigestSignInit.pod +++ b/doc/man3/EVP_DigestSignInit.pod @@ -165,9 +165,9 @@ Since only a copy of the digest context is ever finalized, the context must be cleaned up after use by calling EVP_MD_CTX_free() or a memory leak will occur. -The use of EVP_PKEY_size() with these functions is discouraged because some +The use of EVP_PKEY_get_size() with these functions is discouraged because some signature operations may have a signature length which depends on the -parameters set. As a result EVP_PKEY_size() would have to return a value +parameters set. As a result EVP_PKEY_get_size() would have to return a value which indicates the maximum possible signature for any set of parameters. =head1 SEE ALSO diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod index 0fc7b1e82c..ea43e26369 100644 --- a/doc/man3/EVP_EncryptInit.pod +++ b/doc/man3/EVP_EncryptInit.pod @@ -33,43 +33,46 @@ EVP_get_cipherbyname, EVP_get_cipherbynid, EVP_get_cipherbyobj, EVP_CIPHER_is_a, -EVP_CIPHER_name, -EVP_CIPHER_description, -EVP_CIPHER_number, +EVP_CIPHER_get0_name, +EVP_CIPHER_get0_description, +EVP_CIPHER_get_number, EVP_CIPHER_names_do_all, -EVP_CIPHER_provider, -EVP_CIPHER_nid, +EVP_CIPHER_get0_provider, +EVP_CIPHER_get_nid, EVP_CIPHER_get_params, EVP_CIPHER_gettable_params, -EVP_CIPHER_block_size, -EVP_CIPHER_key_length, -EVP_CIPHER_iv_length, -EVP_CIPHER_flags, -EVP_CIPHER_mode, -EVP_CIPHER_type, +EVP_CIPHER_get_block_size, +EVP_CIPHER_get_key_length, +EVP_CIPHER_get_iv_length, +EVP_CIPHER_get_flags, +EVP_CIPHER_get_mode, +EVP_CIPHER_get_type, EVP_CIPHER_CTX_cipher, EVP_CIPHER_CTX_get0_cipher, EVP_CIPHER_CTX_get1_cipher, -EVP_CIPHER_CTX_name, -EVP_CIPHER_CTX_nid, +EVP_CIPHER_CTX_get0_name, +EVP_CIPHER_CTX_get_nid, EVP_CIPHER_CTX_get_params, EVP_CIPHER_gettable_ctx_params, EVP_CIPHER_CTX_gettable_params, EVP_CIPHER_CTX_set_params, EVP_CIPHER_settable_ctx_params, EVP_CIPHER_CTX_settable_params, -EVP_CIPHER_CTX_block_size, -EVP_CIPHER_CTX_key_length, -EVP_CIPHER_CTX_iv_length, -EVP_CIPHER_CTX_tag_length, +EVP_CIPHER_CTX_get_block_size, +EVP_CIPHER_CTX_get_key_length, +EVP_CIPHER_CTX_get_iv_length, +EVP_CIPHER_CTX_get_tag_length, EVP_CIPHER_CTX_get_app_data, EVP_CIPHER_CTX_set_app_data, -EVP_CIPHER_CTX_type, EVP_CIPHER_CTX_flags, EVP_CIPHER_CTX_set_flags, EVP_CIPHER_CTX_clear_flags, EVP_CIPHER_CTX_test_flags, -EVP_CIPHER_CTX_mode, +EVP_CIPHER_CTX_get_type, +EVP_CIPHER_CTX_get_mode, +EVP_CIPHER_CTX_get_num, +EVP_CIPHER_CTX_set_num, +EVP_CIPHER_CTX_is_encrypting, EVP_CIPHER_param_to_asn1, EVP_CIPHER_asn1_to_param, EVP_CIPHER_CTX_set_padding, @@ -145,26 +148,26 @@ EVP_CIPHER_do_all_provided const EVP_CIPHER *EVP_get_cipherbynid(int nid); const EVP_CIPHER *EVP_get_cipherbyobj(const ASN1_OBJECT *a); - int EVP_CIPHER_nid(const EVP_CIPHER *e); - int EVP_CIPHER_number(const EVP_CIPHER *e); + int EVP_CIPHER_get_nid(const EVP_CIPHER *e); + int EVP_CIPHER_get_number(const EVP_CIPHER *e); int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name); int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher, void (*fn)(const char *name, void *data), void *data); - const char *EVP_CIPHER_name(const EVP_CIPHER *cipher); - const char *EVP_CIPHER_description(const EVP_CIPHER *cipher); - const OSSL_PROVIDER *EVP_CIPHER_provider(const EVP_CIPHER *cipher); - int EVP_CIPHER_block_size(const EVP_CIPHER *e); - int EVP_CIPHER_key_length(const EVP_CIPHER *e); - int EVP_CIPHER_iv_length(const EVP_CIPHER *e); - unsigned long EVP_CIPHER_flags(const EVP_CIPHER *e); - unsigned long EVP_CIPHER_mode(const EVP_CIPHER *e); - int EVP_CIPHER_type(const EVP_CIPHER *cipher); + const char *EVP_CIPHER_get0_name(const EVP_CIPHER *cipher); + const char *EVP_CIPHER_get0_description(const EVP_CIPHER *cipher); + const OSSL_PROVIDER *EVP_CIPHER_get0_provider(const EVP_CIPHER *cipher); + int EVP_CIPHER_get_block_size(const EVP_CIPHER *e); + int EVP_CIPHER_get_key_length(const EVP_CIPHER *e); + int EVP_CIPHER_get_iv_length(const EVP_CIPHER *e); + unsigned long EVP_CIPHER_get_flags(const EVP_CIPHER *e); + unsigned long EVP_CIPHER_get_mode(const EVP_CIPHER *e); + int EVP_CIPHER_get_type(const EVP_CIPHER *cipher); const EVP_CIPHER *EVP_CIPHER_CTX_get0_cipher(const EVP_CIPHER_CTX *ctx); EVP_CIPHER *EVP_CIPHER_CTX_get1_cipher(const EVP_CIPHER_CTX *ctx); - int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); - const char *EVP_CIPHER_CTX_name(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_nid(const EVP_CIPHER_CTX *ctx); + const char *EVP_CIPHER_CTX_get0_name(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_get_params(EVP_CIPHER *cipher, OSSL_PARAM params[]); int EVP_CIPHER_CTX_set_params(EVP_CIPHER_CTX *ctx, const OSSL_PARAM params[]); @@ -174,14 +177,17 @@ EVP_CIPHER_do_all_provided const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher); const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *ctx); const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *ctx); - int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); - int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); - int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx); - int EVP_CIPHER_CTX_tag_length(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_block_size(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_key_length(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_iv_length(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_tag_length(const EVP_CIPHER_CTX *ctx); void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); void EVP_CIPHER_CTX_set_app_data(const EVP_CIPHER_CTX *ctx, void *data); - int EVP_CIPHER_CTX_type(const EVP_CIPHER_CTX *ctx); - int EVP_CIPHER_CTX_mode(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_type(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_mode(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_get_num(const EVP_CIPHER_CTX *ctx); + int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num); + int EVP_CIPHER_CTX_is_encrypting(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); @@ -196,6 +202,12 @@ L<openssl_user_macros(7)>: const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); +Deprecated since OpenSSL 1.1.0, can be hidden entirely by defining +B<OPENSSL_API_COMPAT> with a suitable version value, see +L<openssl_user_macros(7)>: + + int EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); + =head1 DESCRIPTION The EVP cipher routines are a high-level interface to certain @@ -390,7 +402,7 @@ result in I<out>. For legacy ciphers - If the cipher doesn't have the flag B<EVP_CIPH_FLAG_CUSTOM_CIPHER> set, then I<inl> must be a multiple of -EVP_CIPHER_block_size(). If it isn't, the result is undefined. If the cipher +EVP_CIPHER_get_block_size(). If it isn't, the result is undefined. If the cipher has that flag set, then I<inl> can be any size. Due to the constraints of the API contract of this function it shouldn't be used @@ -402,7 +414,7 @@ EVP_CipherFinal_ex() instead. Return an EVP_CIPHER structure when passed a cipher name, a NID or an ASN1_OBJECT structure. -=item EVP_CIPHER_nid() and EVP_CIPHER_CTX_nid() +=item EVP_CIPHER_get_nid() and EVP_CIPHER_CTX_get_nid() Return the NID of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX> structure. The actual NID value is an internal value which may not have a @@ -426,12 +438,12 @@ when decrypting. If the I<pad> parameter is zero then no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur. -=item EVP_CIPHER_key_length() and EVP_CIPHER_CTX_key_length() +=item EVP_CIPHER_get_key_length() and EVP_CIPHER_CTX_get_key_length() Return the key length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX> structure. The constant B<EVP_MAX_KEY_LENGTH> is the maximum -key length for all ciphers. Note: although EVP_CIPHER_key_length() is fixed for -a given cipher, the value of EVP_CIPHER_CTX_key_length() may be different for +key length for all ciphers. Note: although EVP_CIPHER_get_key_length() is fixed for +a given cipher, the value of EVP_CIPHER_CTX_get_key_length() may be different for variable key length ciphers. =item EVP_CIPHER_CTX_set_key_length() @@ -440,25 +452,25 @@ Sets the key length of the cipher context. If the cipher is a fixed length cipher then attempting to set the key length to any value other than the fixed value is an error. -=item EVP_CIPHER_iv_length() and EVP_CIPHER_CTX_iv_length() +=item EVP_CIPHER_get_iv_length() and EVP_CIPHER_CTX_get_iv_length() Return the IV length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX>. It will return zero if the cipher does not use an IV. The constant B<EVP_MAX_IV_LENGTH> is the maximum IV length for all ciphers. -=item EVP_CIPHER_CTX_tag_length() +=item EVP_CIPHER_CTX_get_tag_length() Returns the tag length of an AEAD cipher w |