openssl/openssl

Clean up names of callback function typedefs in ssl.h

Aperta

#5548 aperta il 7 mar 2018

 (4 commenti) (0 reazioni) (0 assegnatari)C (11.262 fork)batch import
backlog fixhelp wantedtriaged: refactor

Metriche repository

Star
 (30.157 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

This was noticed on function callbacks, but it would be good to have consistency in naming (and namespace) for various typedefs.

ssl.h examples:

typedef int (*tls_session_ticket_ext_cb_fn) (SSL *s,
                                             const unsigned char *data,
                                             int len, void *arg);
typedef int (*tls_session_secret_cb_fn) (SSL *s, void *secret,
                                         int *secret_len,
                                         STACK_OF(SSL_CIPHER) *peer_ciphers,
                                         const SSL_CIPHER **cipher, void *arg);
typedef int (*custom_ext_add_cb) (SSL *s, unsigned int ext_type,
                                  const unsigned char **out,
                                  size_t *outlen, int *al, void *add_arg);
typedef void (*custom_ext_free_cb) (SSL *s, unsigned int ext_type,
                                    const unsigned char *out, void *add_arg);
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 int (*SSL_custom_ext_add_cb_ex) (SSL *s, unsigned int ext_type,
                                         unsigned int context,
                                         const unsigned char **out,
                                         size_t *outlen, X509 *x,
                                         size_t chainidx,
                                         int *al, void *add_arg);
typedef void (*SSL_custom_ext_free_cb_ex) (SSL *s, unsigned int ext_type,
                                           unsigned int context,
                                           const unsigned char *out,
                                           void *add_arg);
typedef int (*SSL_custom_ext_parse_cb_ex) (SSL *s, unsigned int ext_type,
                                           unsigned int context,
                                           const unsigned char *in,
                                           size_t inlen, X509 *x,
                                           size_t chainidx,
                                           int *al, void *parse_arg);
typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx);

Guida contributor