diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-03-20 18:52:44 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-03-20 19:35:39 +0100 |
commit | d63f25ff84740b4fd955bc2de4bb5f55b9d79adf (patch) | |
tree | f07216ecf04173d68a6e55fb9768fa148e60239b /doc | |
parent | 2af4b3fe32a82aed296c88cea13508701d0dd34b (diff) |
Fix the error handling in CRYPTO_dup_ex_data.
Fix a strict aliasing issue in ui_dup_method_data.
Add test coverage for CRYPTO_dup_ex_data, use OPENSSL_assert.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2997)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/crypto/CRYPTO_get_ex_new_index.pod | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/crypto/CRYPTO_get_ex_new_index.pod b/doc/crypto/CRYPTO_get_ex_new_index.pod index ede5fc14ce..0853ce588c 100644 --- a/doc/crypto/CRYPTO_get_ex_new_index.pod +++ b/doc/crypto/CRYPTO_get_ex_new_index.pod @@ -130,12 +130,15 @@ the same callback handles different types of exdata. dup_func() is called when a structure is being copied. This is only done for B<SSL> and B<SSL_SESSION> objects. The B<to> and B<from> parameters are pointers to the destination and source B<CRYPTO_EX_DATA> structures, -respectively. The B<srcp> parameter is a pointer to the source exdata. -When the dup_func() returns, the value in B<srcp> is copied to the -destination ex_data. If the pointer contained in B<srcp> is not modified +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 +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 -two callbacks. +two callbacks. If the dup_func() returns B<0> the whole CRYPTO_dup_ex_data() +will fail. =head1 RETURN VALUES |