diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-03-20 17:29:28 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2020-05-23 15:31:14 +0200 |
commit | 712e8debb5b2238450b303acb5f24298382c63a5 (patch) | |
tree | fbcbc73a1b34465cee2c4ab6199c3ae2a1ad9384 /doc/man3/CRYPTO_get_ex_new_index.pod | |
parent | 2de64666a07cccf8477e6483de62ae31f463df64 (diff) |
Fix the parameter types of the CRYPTO_EX_dup function type.
This fixes a strict aliasing issue in ui_dup_method_data.
The parameter type of CRYPTO_EX_dup's from_d parameter
is in fact void **, since it points to a pointer.
This function is rarely used, therefore fix the param type
although that may be considered an API breaking change.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2986)
Diffstat (limited to 'doc/man3/CRYPTO_get_ex_new_index.pod')
-rw-r--r-- | doc/man3/CRYPTO_get_ex_new_index.pod | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/man3/CRYPTO_get_ex_new_index.pod b/doc/man3/CRYPTO_get_ex_new_index.pod index e569a3d500..fcedd0ec88 100644 --- a/doc/man3/CRYPTO_get_ex_new_index.pod +++ b/doc/man3/CRYPTO_get_ex_new_index.pod @@ -23,7 +23,7 @@ CRYPTO_free_ex_data, CRYPTO_new_ex_data typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp); typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, - void *from_d, int idx, long argl, void *argp); + void **from_d, int idx, long argl, void *argp); int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad) @@ -140,10 +140,8 @@ dup_func() is called when a structure is being copied. This is only done for B<SSL>, B<SSL_SESSION>, B<EC_KEY> objects and B<BIO> chains via BIO_dup_chain(). The B<to> and B<from> parameters are pointers to the destination and source B<CRYPTO_EX_DATA> structures, -respectively. The B<from_d> parameter needs to be cast to a B<void **pptr> -as the API has currently the wrong signature; that will be changed in a -future version. The B<*pptr> is a pointer to the source exdata. -When the dup_func() returns, the value in B<*pptr> is copied to the +respectively. The B<*from_d> parameter is a pointer to the source exdata. +When the dup_func() returns, the value in B<*from_d> is copied to the destination ex_data. If the pointer contained in B<*pptr> is not modified by the dup_func(), then both B<to> and B<from> will point to the same data. The B<idx>, B<argl> and B<argp> parameters are as described for the other @@ -165,6 +163,8 @@ dup_func() should return 0 for failure and 1 for success. =head1 HISTORY CRYPTO_alloc_ex_data() was added in OpenSSL 3.0. +The signature of the dup_func() callback was changed in OpenSSL 3.0 to use the +type B<void **> for B<from_d>. Previously this parameter was of type B<void *>. =head1 COPYRIGHT |