diff options
author | Richard Levitte <levitte@openssl.org> | 2019-09-03 18:11:49 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-09-04 10:38:13 +0200 |
commit | 550f974a09942ace37cf3cf14021ea5e51e6dd11 (patch) | |
tree | 6a5fc648e9b04b21f844e4998540c4b8c286394e /doc/man3/EVP_EncryptInit.pod | |
parent | 3fd7026276475d72a3b5bbbe42cd1f5ff6b0e736 (diff) | |
download | openssl-new-550f974a09942ace37cf3cf14021ea5e51e6dd11.tar.gz |
New function EVP_CIPHER_free()
This function re-implements EVP_CIPHER_meth_free(), but has a name that
isn't encumbered by legacy EVP_CIPHER construction functionality.
We also refactor most of EVP_CIPHER_meth_new() into an internal
evp_cipher_new() that's used when creating fetched methods.
EVP_CIPHER_meth_new() and EVP_CIPHER_meth_free() are rewritten in terms of
evp_cipher_new() and EVP_CIPHER_free(). This means that at any time, we can
deprecate all the EVP_CIPHER_meth_ functions with no harmful consequence.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9758)
Diffstat (limited to 'doc/man3/EVP_EncryptInit.pod')
-rw-r--r-- | doc/man3/EVP_EncryptInit.pod | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod index 7f69a23dd7..11d0250a0d 100644 --- a/doc/man3/EVP_EncryptInit.pod +++ b/doc/man3/EVP_EncryptInit.pod @@ -3,6 +3,8 @@ =head1 NAME EVP_CIPHER_fetch, +EVP_CIPHER_up_ref, +EVP_CIPHER_free, EVP_CIPHER_CTX_new, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX_free, @@ -67,6 +69,8 @@ EVP_CIPHER_do_all_ex EVP_CIPHER *EVP_CIPHER_fetch(OPENSSL_CTX *ctx, const char *algorithm, const char *properties); + int EVP_CIPHER_up_ref(EVP_CIPHER *cipher); + void EVP_CIPHER_free(EVP_CIPHER *cipher); EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx); void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx); @@ -150,13 +154,21 @@ EVP_CIPHER_do_all_ex The EVP cipher routines are a high level interface to certain symmetric ciphers. +The B<EVP_CIPHER> type is a structure for cipher method implementation. + EVP_CIPHER_fetch() fetches the cipher implementation for the given B<algorithm> from any provider offering it, within the criteria given by the B<properties>. See L<provider(7)/Fetching algorithms> for further information. -The returned value must eventually be freed with -L<EVP_CIPHER_meth_free(3)>. +The returned value must eventually be freed with EVP_CIPHER_free(). + +EVP_CIPHER_up_ref() increments the reference count for an B<EVP_CIPHER> +structure. + +EVP_CIPHER_free() decrements the reference count for the B<EVP_CIPHER> +structure. +If the reference count drops to 0 then the structure is freed. EVP_CIPHER_CTX_new() creates a cipher context. @@ -351,6 +363,8 @@ and the given I<arg> as argument. EVP_CIPHER_fetch() returns a pointer to a B<EVP_CIPHER> for success and B<NULL> for failure. +EVP_CIPHER_up_ref() returns 1 for success or 0 otherwise. + EVP_CIPHER_CTX_new() returns a pointer to a newly created B<EVP_CIPHER_CTX> for success and B<NULL> for failure. @@ -757,6 +771,10 @@ EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared. EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset(). +The EVP_CIPHER_fetch(), EVP_CIPHER_free(), EVP_CIPHER_up_ref(), +EVP_CIPHER_CTX_set_params() and EVP_CIPHER_CTX_get_params() functions +were added in 3.0. + =head1 COPYRIGHT Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. |