diff options
author | Rich Salz <rsalz@openssl.org> | 2016-12-27 15:00:06 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-01-09 16:19:08 -0500 |
commit | 0d3020caefb93653b6cbbe0533f77c46e625f269 (patch) | |
tree | e739004cbc7edf70edb6ff326d92ab15497e0ce8 /include | |
parent | 75f12d7cbffcaa31cc8ff5c7fee02e614785632a (diff) |
Doc nits: callback function typedefs
Enhance find-doc-nits to be better about finding typedefs for
callback functions. Fix all nits it now finds. Added some new
typedef names to ssl.h some of which were documented but did not
exist
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2151)
(cherry picked from commit 121677b4875b08df99a48d20ab5c26f54782f21d)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/ssl.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index bab3ee66eb..3283d987b8 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -262,6 +262,9 @@ typedef int (*custom_ext_parse_cb) (SSL *s, unsigned int ext_type, const unsigned char *in, size_t inlen, int *al, void *parse_arg); +/* Typedef for verification callback */ +typedef int (*verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx); + /* Allow initial connection to servers that don't support RI */ # define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004U /* Removed from OpenSSL 0.9.8q and 1.0.0c */ @@ -1342,9 +1345,8 @@ __owur int SSL_set_cipher_list(SSL *s, const char *str); void SSL_set_read_ahead(SSL *s, int yes); __owur int SSL_get_verify_mode(const SSL *s); __owur int SSL_get_verify_depth(const SSL *s); -__owur int (*SSL_get_verify_callback(const SSL *s)) (int, X509_STORE_CTX *); -void SSL_set_verify(SSL *s, int mode, - int (*callback) (int ok, X509_STORE_CTX *ctx)); +__owur verify_cb SSL_get_verify_callback(const SSL *s); +void SSL_set_verify(SSL *s, int mode, verify_cb callback); void SSL_set_verify_depth(SSL *s, int depth); void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg); # ifndef OPENSSL_NO_RSA @@ -1443,10 +1445,8 @@ __owur STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s); __owur int SSL_CTX_get_verify_mode(const SSL_CTX *ctx); __owur int SSL_CTX_get_verify_depth(const SSL_CTX *ctx); -__owur int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx)) (int, - X509_STORE_CTX *); -void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, - int (*callback) (int, X509_STORE_CTX *)); +__owur verify_cb SSL_CTX_get_verify_callback(const SSL_CTX *ctx); +void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, verify_cb callback); void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth); void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb) (X509_STORE_CTX *, void *), |