From dbea66cd1623e97296cb30d20896a9c0c5976d2c Mon Sep 17 00:00:00 2001 From: guenther Date: Sat, 19 Apr 2014 08:52:32 +0000 Subject: [PATCH] More KNF and style consistency tweaks --- lib/libssl/d1_clnt.c | 7 +- lib/libssl/d1_lib.c | 4 +- lib/libssl/d1_meth.c | 7 +- lib/libssl/d1_srtp.c | 18 ++--- lib/libssl/d1_srvr.c | 7 +- lib/libssl/s23_clnt.c | 13 ++-- lib/libssl/s23_lib.c | 10 +-- lib/libssl/s23_srvr.c | 9 +-- lib/libssl/s3_clnt.c | 7 +- lib/libssl/s3_lib.c | 17 +++-- lib/libssl/s3_pkt.c | 4 +- lib/libssl/s3_srvr.c | 7 +- lib/libssl/src/ssl/d1_clnt.c | 7 +- lib/libssl/src/ssl/d1_lib.c | 4 +- lib/libssl/src/ssl/d1_meth.c | 7 +- lib/libssl/src/ssl/d1_srtp.c | 18 ++--- lib/libssl/src/ssl/d1_srvr.c | 7 +- lib/libssl/src/ssl/kssl.c | 16 ++-- lib/libssl/src/ssl/s23_clnt.c | 13 ++-- lib/libssl/src/ssl/s23_lib.c | 10 +-- lib/libssl/src/ssl/s23_meth.c | 13 ++-- lib/libssl/src/ssl/s23_srvr.c | 9 +-- lib/libssl/src/ssl/s3_clnt.c | 7 +- lib/libssl/src/ssl/s3_lib.c | 17 +++-- lib/libssl/src/ssl/s3_meth.c | 7 +- lib/libssl/src/ssl/s3_pkt.c | 4 +- lib/libssl/src/ssl/s3_srvr.c | 7 +- lib/libssl/src/ssl/srtp.h | 10 +-- lib/libssl/src/ssl/ssl.h | 5 +- lib/libssl/src/ssl/ssl_asn1.c | 5 +- lib/libssl/src/ssl/ssl_cert.c | 28 +++---- lib/libssl/src/ssl/ssl_ciph.c | 36 ++++----- lib/libssl/src/ssl/ssl_lib.c | 140 +++++++++++++++++----------------- lib/libssl/src/ssl/ssl_sess.c | 24 +++--- lib/libssl/src/ssl/ssl_stat.c | 32 ++++---- lib/libssl/src/ssl/ssltest.c | 16 ++-- lib/libssl/src/ssl/t1_clnt.c | 12 +-- lib/libssl/src/ssl/t1_lib.c | 12 +-- lib/libssl/src/ssl/t1_meth.c | 12 +-- lib/libssl/src/ssl/t1_srvr.c | 12 +-- lib/libssl/src/ssl/tls_srp.c | 16 ++-- lib/libssl/srtp.h | 10 +-- lib/libssl/ssl.h | 5 +- lib/libssl/ssl_asn1.c | 5 +- lib/libssl/ssl_cert.c | 28 +++---- lib/libssl/ssl_ciph.c | 36 ++++----- lib/libssl/ssl_lib.c | 140 +++++++++++++++++----------------- lib/libssl/ssl_sess.c | 24 +++--- lib/libssl/ssl_stat.c | 32 ++++---- lib/libssl/t1_clnt.c | 12 +-- lib/libssl/t1_lib.c | 12 +-- lib/libssl/t1_meth.c | 12 +-- lib/libssl/t1_srvr.c | 12 +-- 53 files changed, 465 insertions(+), 479 deletions(-) diff --git a/lib/libssl/d1_clnt.c b/lib/libssl/d1_clnt.c index b919baf7faa..6bceeea55b1 100644 --- a/lib/libssl/d1_clnt.c +++ b/lib/libssl/d1_clnt.c @@ -131,13 +131,12 @@ static const SSL_METHOD *dtls1_get_client_method(int ver); static int dtls1_get_hello_verify(SSL *s); -static const SSL_METHOD -*dtls1_get_client_method(int ver) +static const SSL_METHOD * +dtls1_get_client_method(int ver) { if (ver == DTLS1_VERSION || ver == DTLS1_BAD_VER) return (DTLSv1_client_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_dtls1_meth_func(DTLSv1_client_method, diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c index 7da57b0a36e..0217b68928f 100644 --- a/lib/libssl/d1_lib.c +++ b/lib/libssl/d1_lib.c @@ -277,8 +277,8 @@ dtls1_ctrl(SSL *s, int cmd, long larg, void *parg) * to explicitly list their SSL_* codes. Currently RC4 is the only one * available, but if new ones emerge, they will have to be added... */ -const SSL_CIPHER -*dtls1_get_cipher(unsigned int u) +const SSL_CIPHER * +dtls1_get_cipher(unsigned int u) { const SSL_CIPHER *ciph = ssl3_get_cipher(u); diff --git a/lib/libssl/d1_meth.c b/lib/libssl/d1_meth.c index 2d3f3920ec9..1140da6825e 100644 --- a/lib/libssl/d1_meth.c +++ b/lib/libssl/d1_meth.c @@ -62,13 +62,12 @@ #include "ssl_locl.h" static const SSL_METHOD *dtls1_get_method(int ver); -static const SSL_METHOD -*dtls1_get_method(int ver) +static const SSL_METHOD * +dtls1_get_method(int ver) { if (ver == DTLS1_VERSION) return (DTLSv1_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_dtls1_meth_func(DTLSv1_method, diff --git a/lib/libssl/d1_srtp.c b/lib/libssl/d1_srtp.c index fadd9f381f6..146ce321c8e 100644 --- a/lib/libssl/d1_srtp.c +++ b/lib/libssl/d1_srtp.c @@ -109,11 +109,11 @@ * */ /* - DTLS code by Eric Rescorla - - Copyright (C) 2006, Network Resonance, Inc. - Copyright (C) 2011, RTFM, Inc. -*/ + * DTLS code by Eric Rescorla + * + * Copyright (C) 2006, Network Resonance, Inc. + * Copyright (C) 2011, RTFM, Inc. + */ #include #include @@ -232,8 +232,8 @@ SSL_set_tlsext_use_srtp(SSL *s, const char *profiles) } -STACK_OF(SRTP_PROTECTION_PROFILE) -*SSL_get_srtp_profiles(SSL *s) +STACK_OF(SRTP_PROTECTION_PROFILE) * +SSL_get_srtp_profiles(SSL *s) { if (s != NULL) { if (s->srtp_profiles != NULL) { @@ -247,8 +247,8 @@ STACK_OF(SRTP_PROTECTION_PROFILE) return NULL; } -SRTP_PROTECTION_PROFILE -*SSL_get_selected_srtp_profile(SSL *s) +SRTP_PROTECTION_PROFILE * +SSL_get_selected_srtp_profile(SSL *s) { return s->srtp_profile; } diff --git a/lib/libssl/d1_srvr.c b/lib/libssl/d1_srvr.c index 6a10f7a3ddb..fc475485baa 100644 --- a/lib/libssl/d1_srvr.c +++ b/lib/libssl/d1_srvr.c @@ -129,13 +129,12 @@ static const SSL_METHOD *dtls1_get_server_method(int ver); static int dtls1_send_hello_verify_request(SSL *s); -static const SSL_METHOD -*dtls1_get_server_method(int ver) +static const SSL_METHOD * +dtls1_get_server_method(int ver) { if (ver == DTLS1_VERSION) return (DTLSv1_server_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_dtls1_meth_func(DTLSv1_server_method, diff --git a/lib/libssl/s23_clnt.c b/lib/libssl/s23_clnt.c index 196ef1dfade..65e2be0c8c2 100644 --- a/lib/libssl/s23_clnt.c +++ b/lib/libssl/s23_clnt.c @@ -119,19 +119,18 @@ static const SSL_METHOD *ssl23_get_client_method(int ver); static int ssl23_client_hello(SSL *s); static int ssl23_get_server_hello(SSL *s); -static const SSL_METHOD -*ssl23_get_client_method(int ver) +static const SSL_METHOD * +ssl23_get_client_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_client_method()); - else if (ver == TLS1_VERSION) + if (ver == TLS1_VERSION) return (TLSv1_client_method()); - else if (ver == TLS1_1_VERSION) + if (ver == TLS1_1_VERSION) return (TLSv1_1_client_method()); - else if (ver == TLS1_2_VERSION) + if (ver == TLS1_2_VERSION) return (TLSv1_2_client_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl23_meth_func(SSLv23_client_method, diff --git a/lib/libssl/s23_lib.c b/lib/libssl/s23_lib.c index 74afe01d944..226af4b3cb7 100644 --- a/lib/libssl/s23_lib.c +++ b/lib/libssl/s23_lib.c @@ -69,11 +69,11 @@ ssl23_default_timeout(void) int ssl23_num_ciphers(void) { - return(ssl3_num_ciphers()); + return (ssl3_num_ciphers()); } -const SSL_CIPHER -*ssl23_get_cipher(unsigned int u) +const SSL_CIPHER * +ssl23_get_cipher(unsigned int u) { unsigned int uu = ssl3_num_ciphers(); @@ -85,8 +85,8 @@ const SSL_CIPHER /* This function needs to check if the ciphers required are actually * available */ -const SSL_CIPHER -*ssl23_get_cipher_by_char(const unsigned char *p) +const SSL_CIPHER * +ssl23_get_cipher_by_char(const unsigned char *p) { const SSL_CIPHER *cp; diff --git a/lib/libssl/s23_srvr.c b/lib/libssl/s23_srvr.c index c63ede8680a..665907ee128 100644 --- a/lib/libssl/s23_srvr.c +++ b/lib/libssl/s23_srvr.c @@ -123,14 +123,13 @@ ssl23_get_server_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_server_method()); - else if (ver == TLS1_VERSION) + if (ver == TLS1_VERSION) return (TLSv1_server_method()); - else if (ver == TLS1_1_VERSION) + if (ver == TLS1_1_VERSION) return (TLSv1_1_server_method()); - else if (ver == TLS1_2_VERSION) + if (ver == TLS1_2_VERSION) return (TLSv1_2_server_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl23_meth_func(SSLv23_server_method, diff --git a/lib/libssl/s3_clnt.c b/lib/libssl/s3_clnt.c index 8aef4b4f3d2..10546ee8481 100644 --- a/lib/libssl/s3_clnt.c +++ b/lib/libssl/s3_clnt.c @@ -167,13 +167,12 @@ static const SSL_METHOD *ssl3_get_client_method(int ver); static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b); -static const SSL_METHOD -*ssl3_get_client_method(int ver) +static const SSL_METHOD * +ssl3_get_client_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_client_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl3_meth_func(SSLv3_client_method, diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c index fe638e84a92..95e5c903ec8 100644 --- a/lib/libssl/s3_lib.c +++ b/lib/libssl/s3_lib.c @@ -2754,8 +2754,8 @@ ssl3_num_ciphers(void) return (SSL3_NUM_CIPHERS); } -const SSL_CIPHER -*ssl3_get_cipher(unsigned int u) +const SSL_CIPHER * +ssl3_get_cipher(unsigned int u) { if (u < SSL3_NUM_CIPHERS) return (&(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u])); @@ -3470,8 +3470,8 @@ ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) /* This function needs to check if the ciphers required are actually * available */ -const SSL_CIPHER -*ssl3_get_cipher_by_char(const unsigned char *p) +const SSL_CIPHER * +ssl3_get_cipher_by_char(const unsigned char *p) { SSL_CIPHER c; const SSL_CIPHER *cp; @@ -3954,10 +3954,11 @@ ssl3_renegotiate_check(SSL *s) if (s->s3->renegotiate) { if ((s->s3->rbuf.left == 0) && (s->s3->wbuf.left == 0) && !SSL_in_init(s)) { -/* -if we are the server, and we have sent a 'RENEGOTIATE' message, we -need to go to SSL_ST_ACCEPT. -*/ + /* + * If we are the server, and we have sent + * a 'RENEGOTIATE' message, we need to go + * to SSL_ST_ACCEPT. + */ /* SSL_ST_ACCEPT */ s->state = SSL_ST_RENEGOTIATE; s->s3->renegotiate = 0; diff --git a/lib/libssl/s3_pkt.c b/lib/libssl/s3_pkt.c index ec73ef50bd9..52c48e945e1 100644 --- a/lib/libssl/s3_pkt.c +++ b/lib/libssl/s3_pkt.c @@ -756,9 +756,9 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf, wr->data = p; if (eivlen) { - /* if (RAND_pseudo_bytes(p, eivlen) <= 0) + /* if (RAND_pseudo_bytes(p, eivlen) <= 0) goto err; -*/ + */ wr->length += eivlen; } diff --git a/lib/libssl/s3_srvr.c b/lib/libssl/s3_srvr.c index 79b89d7e958..8416eb7042c 100644 --- a/lib/libssl/s3_srvr.c +++ b/lib/libssl/s3_srvr.c @@ -171,13 +171,12 @@ static const SSL_METHOD *ssl3_get_server_method(int ver); -static const SSL_METHOD -*ssl3_get_server_method(int ver) +static const SSL_METHOD * +ssl3_get_server_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_server_method()); - else - return (NULL); + return (NULL); } #ifndef OPENSSL_NO_SRP diff --git a/lib/libssl/src/ssl/d1_clnt.c b/lib/libssl/src/ssl/d1_clnt.c index b919baf7faa..6bceeea55b1 100644 --- a/lib/libssl/src/ssl/d1_clnt.c +++ b/lib/libssl/src/ssl/d1_clnt.c @@ -131,13 +131,12 @@ static const SSL_METHOD *dtls1_get_client_method(int ver); static int dtls1_get_hello_verify(SSL *s); -static const SSL_METHOD -*dtls1_get_client_method(int ver) +static const SSL_METHOD * +dtls1_get_client_method(int ver) { if (ver == DTLS1_VERSION || ver == DTLS1_BAD_VER) return (DTLSv1_client_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_dtls1_meth_func(DTLSv1_client_method, diff --git a/lib/libssl/src/ssl/d1_lib.c b/lib/libssl/src/ssl/d1_lib.c index 7da57b0a36e..0217b68928f 100644 --- a/lib/libssl/src/ssl/d1_lib.c +++ b/lib/libssl/src/ssl/d1_lib.c @@ -277,8 +277,8 @@ dtls1_ctrl(SSL *s, int cmd, long larg, void *parg) * to explicitly list their SSL_* codes. Currently RC4 is the only one * available, but if new ones emerge, they will have to be added... */ -const SSL_CIPHER -*dtls1_get_cipher(unsigned int u) +const SSL_CIPHER * +dtls1_get_cipher(unsigned int u) { const SSL_CIPHER *ciph = ssl3_get_cipher(u); diff --git a/lib/libssl/src/ssl/d1_meth.c b/lib/libssl/src/ssl/d1_meth.c index 2d3f3920ec9..1140da6825e 100644 --- a/lib/libssl/src/ssl/d1_meth.c +++ b/lib/libssl/src/ssl/d1_meth.c @@ -62,13 +62,12 @@ #include "ssl_locl.h" static const SSL_METHOD *dtls1_get_method(int ver); -static const SSL_METHOD -*dtls1_get_method(int ver) +static const SSL_METHOD * +dtls1_get_method(int ver) { if (ver == DTLS1_VERSION) return (DTLSv1_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_dtls1_meth_func(DTLSv1_method, diff --git a/lib/libssl/src/ssl/d1_srtp.c b/lib/libssl/src/ssl/d1_srtp.c index fadd9f381f6..146ce321c8e 100644 --- a/lib/libssl/src/ssl/d1_srtp.c +++ b/lib/libssl/src/ssl/d1_srtp.c @@ -109,11 +109,11 @@ * */ /* - DTLS code by Eric Rescorla - - Copyright (C) 2006, Network Resonance, Inc. - Copyright (C) 2011, RTFM, Inc. -*/ + * DTLS code by Eric Rescorla + * + * Copyright (C) 2006, Network Resonance, Inc. + * Copyright (C) 2011, RTFM, Inc. + */ #include #include @@ -232,8 +232,8 @@ SSL_set_tlsext_use_srtp(SSL *s, const char *profiles) } -STACK_OF(SRTP_PROTECTION_PROFILE) -*SSL_get_srtp_profiles(SSL *s) +STACK_OF(SRTP_PROTECTION_PROFILE) * +SSL_get_srtp_profiles(SSL *s) { if (s != NULL) { if (s->srtp_profiles != NULL) { @@ -247,8 +247,8 @@ STACK_OF(SRTP_PROTECTION_PROFILE) return NULL; } -SRTP_PROTECTION_PROFILE -*SSL_get_selected_srtp_profile(SSL *s) +SRTP_PROTECTION_PROFILE * +SSL_get_selected_srtp_profile(SSL *s) { return s->srtp_profile; } diff --git a/lib/libssl/src/ssl/d1_srvr.c b/lib/libssl/src/ssl/d1_srvr.c index 6a10f7a3ddb..fc475485baa 100644 --- a/lib/libssl/src/ssl/d1_srvr.c +++ b/lib/libssl/src/ssl/d1_srvr.c @@ -129,13 +129,12 @@ static const SSL_METHOD *dtls1_get_server_method(int ver); static int dtls1_send_hello_verify_request(SSL *s); -static const SSL_METHOD -*dtls1_get_server_method(int ver) +static const SSL_METHOD * +dtls1_get_server_method(int ver) { if (ver == DTLS1_VERSION) return (DTLSv1_server_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_dtls1_meth_func(DTLSv1_server_method, diff --git a/lib/libssl/src/ssl/kssl.c b/lib/libssl/src/ssl/kssl.c index 163079de20f..a0beabe7536 100644 --- a/lib/libssl/src/ssl/kssl.c +++ b/lib/libssl/src/ssl/kssl.c @@ -104,8 +104,8 @@ kssl_calloc(size_t nmemb, size_t size) #define kssl_free(ptr) free((ptr)) -char -*kstring(char *string) +char * +kstring(char *string) { static char *null = "[NULL]"; @@ -207,8 +207,8 @@ kssl_test_confound(unsigned char *p) ** what the highest assigned CKSUMTYPE_ constant is. As of 1.2.2 ** it is 0x000c (CKSUMTYPE_HMAC_SHA1_DES3). So we will use 0x0010. */ -static size_t -*populate_cksumlens(void) +static size_t * +populate_cksumlens(void) { int i, j, n; static size_t *cklens = NULL; @@ -250,8 +250,8 @@ static size_t ** This hackery wouldn't be necessary if MIT KRB5 1.0.6 had the ** krb5_auth_con_getcksumtype() function advertised in its krb5.h. */ -unsigned char -*kssl_skip_confound(krb5_enctype etype, unsigned char *a) +unsigned char * +kssl_skip_confound(krb5_enctype etype, unsigned char *a) { int i, conlen; size_t cklen; @@ -1213,8 +1213,8 @@ kssl_krb5_free_data_contents(krb5_context context, krb5_data *data) ** Return pointer to the (partially) filled in struct tm on success, ** return NULL on failure. */ -static struct tm -*k_gmtime(ASN1_GENERALIZEDTIME *gtime, struct tm *k_tm) { +static struct tm * +k_gmtime(ASN1_GENERALIZEDTIME *gtime, struct tm *k_tm) { char c, *p; if (!k_tm) diff --git a/lib/libssl/src/ssl/s23_clnt.c b/lib/libssl/src/ssl/s23_clnt.c index 196ef1dfade..65e2be0c8c2 100644 --- a/lib/libssl/src/ssl/s23_clnt.c +++ b/lib/libssl/src/ssl/s23_clnt.c @@ -119,19 +119,18 @@ static const SSL_METHOD *ssl23_get_client_method(int ver); static int ssl23_client_hello(SSL *s); static int ssl23_get_server_hello(SSL *s); -static const SSL_METHOD -*ssl23_get_client_method(int ver) +static const SSL_METHOD * +ssl23_get_client_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_client_method()); - else if (ver == TLS1_VERSION) + if (ver == TLS1_VERSION) return (TLSv1_client_method()); - else if (ver == TLS1_1_VERSION) + if (ver == TLS1_1_VERSION) return (TLSv1_1_client_method()); - else if (ver == TLS1_2_VERSION) + if (ver == TLS1_2_VERSION) return (TLSv1_2_client_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl23_meth_func(SSLv23_client_method, diff --git a/lib/libssl/src/ssl/s23_lib.c b/lib/libssl/src/ssl/s23_lib.c index 74afe01d944..226af4b3cb7 100644 --- a/lib/libssl/src/ssl/s23_lib.c +++ b/lib/libssl/src/ssl/s23_lib.c @@ -69,11 +69,11 @@ ssl23_default_timeout(void) int ssl23_num_ciphers(void) { - return(ssl3_num_ciphers()); + return (ssl3_num_ciphers()); } -const SSL_CIPHER -*ssl23_get_cipher(unsigned int u) +const SSL_CIPHER * +ssl23_get_cipher(unsigned int u) { unsigned int uu = ssl3_num_ciphers(); @@ -85,8 +85,8 @@ const SSL_CIPHER /* This function needs to check if the ciphers required are actually * available */ -const SSL_CIPHER -*ssl23_get_cipher_by_char(const unsigned char *p) +const SSL_CIPHER * +ssl23_get_cipher_by_char(const unsigned char *p) { const SSL_CIPHER *cp; diff --git a/lib/libssl/src/ssl/s23_meth.c b/lib/libssl/src/ssl/s23_meth.c index f7d9910b8a7..ad9a513fd41 100644 --- a/lib/libssl/src/ssl/s23_meth.c +++ b/lib/libssl/src/ssl/s23_meth.c @@ -61,19 +61,18 @@ #include "ssl_locl.h" static const SSL_METHOD *ssl23_get_method(int ver); -static const SSL_METHOD -*ssl23_get_method(int ver) +static const SSL_METHOD * +ssl23_get_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_method()); - else if (ver == TLS1_VERSION) + if (ver == TLS1_VERSION) return (TLSv1_method()); - else if (ver == TLS1_1_VERSION) + if (ver == TLS1_1_VERSION) return (TLSv1_1_method()); - else if (ver == TLS1_2_VERSION) + if (ver == TLS1_2_VERSION) return (TLSv1_2_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl23_meth_func(SSLv23_method, diff --git a/lib/libssl/src/ssl/s23_srvr.c b/lib/libssl/src/ssl/s23_srvr.c index c63ede8680a..665907ee128 100644 --- a/lib/libssl/src/ssl/s23_srvr.c +++ b/lib/libssl/src/ssl/s23_srvr.c @@ -123,14 +123,13 @@ ssl23_get_server_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_server_method()); - else if (ver == TLS1_VERSION) + if (ver == TLS1_VERSION) return (TLSv1_server_method()); - else if (ver == TLS1_1_VERSION) + if (ver == TLS1_1_VERSION) return (TLSv1_1_server_method()); - else if (ver == TLS1_2_VERSION) + if (ver == TLS1_2_VERSION) return (TLSv1_2_server_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl23_meth_func(SSLv23_server_method, diff --git a/lib/libssl/src/ssl/s3_clnt.c b/lib/libssl/src/ssl/s3_clnt.c index 8aef4b4f3d2..10546ee8481 100644 --- a/lib/libssl/src/ssl/s3_clnt.c +++ b/lib/libssl/src/ssl/s3_clnt.c @@ -167,13 +167,12 @@ static const SSL_METHOD *ssl3_get_client_method(int ver); static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b); -static const SSL_METHOD -*ssl3_get_client_method(int ver) +static const SSL_METHOD * +ssl3_get_client_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_client_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl3_meth_func(SSLv3_client_method, diff --git a/lib/libssl/src/ssl/s3_lib.c b/lib/libssl/src/ssl/s3_lib.c index fe638e84a92..95e5c903ec8 100644 --- a/lib/libssl/src/ssl/s3_lib.c +++ b/lib/libssl/src/ssl/s3_lib.c @@ -2754,8 +2754,8 @@ ssl3_num_ciphers(void) return (SSL3_NUM_CIPHERS); } -const SSL_CIPHER -*ssl3_get_cipher(unsigned int u) +const SSL_CIPHER * +ssl3_get_cipher(unsigned int u) { if (u < SSL3_NUM_CIPHERS) return (&(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u])); @@ -3470,8 +3470,8 @@ ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) /* This function needs to check if the ciphers required are actually * available */ -const SSL_CIPHER -*ssl3_get_cipher_by_char(const unsigned char *p) +const SSL_CIPHER * +ssl3_get_cipher_by_char(const unsigned char *p) { SSL_CIPHER c; const SSL_CIPHER *cp; @@ -3954,10 +3954,11 @@ ssl3_renegotiate_check(SSL *s) if (s->s3->renegotiate) { if ((s->s3->rbuf.left == 0) && (s->s3->wbuf.left == 0) && !SSL_in_init(s)) { -/* -if we are the server, and we have sent a 'RENEGOTIATE' message, we -need to go to SSL_ST_ACCEPT. -*/ + /* + * If we are the server, and we have sent + * a 'RENEGOTIATE' message, we need to go + * to SSL_ST_ACCEPT. + */ /* SSL_ST_ACCEPT */ s->state = SSL_ST_RENEGOTIATE; s->s3->renegotiate = 0; diff --git a/lib/libssl/src/ssl/s3_meth.c b/lib/libssl/src/ssl/s3_meth.c index ff3b0d33033..b6d6771a21c 100644 --- a/lib/libssl/src/ssl/s3_meth.c +++ b/lib/libssl/src/ssl/s3_meth.c @@ -61,13 +61,12 @@ #include "ssl_locl.h" static const SSL_METHOD *ssl3_get_method(int ver); -static const SSL_METHOD -*ssl3_get_method(int ver) +static const SSL_METHOD * +ssl3_get_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_method()); - else - return (NULL); + return (NULL); } IMPLEMENT_ssl3_meth_func(SSLv3_method, diff --git a/lib/libssl/src/ssl/s3_pkt.c b/lib/libssl/src/ssl/s3_pkt.c index ec73ef50bd9..52c48e945e1 100644 --- a/lib/libssl/src/ssl/s3_pkt.c +++ b/lib/libssl/src/ssl/s3_pkt.c @@ -756,9 +756,9 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf, wr->data = p; if (eivlen) { - /* if (RAND_pseudo_bytes(p, eivlen) <= 0) + /* if (RAND_pseudo_bytes(p, eivlen) <= 0) goto err; -*/ + */ wr->length += eivlen; } diff --git a/lib/libssl/src/ssl/s3_srvr.c b/lib/libssl/src/ssl/s3_srvr.c index 79b89d7e958..8416eb7042c 100644 --- a/lib/libssl/src/ssl/s3_srvr.c +++ b/lib/libssl/src/ssl/s3_srvr.c @@ -171,13 +171,12 @@ static const SSL_METHOD *ssl3_get_server_method(int ver); -static const SSL_METHOD -*ssl3_get_server_method(int ver) +static const SSL_METHOD * +ssl3_get_server_method(int ver) { if (ver == SSL3_VERSION) return (SSLv3_server_method()); - else - return (NULL); + return (NULL); } #ifndef OPENSSL_NO_SRP diff --git a/lib/libssl/src/ssl/srtp.h b/lib/libssl/src/ssl/srtp.h index 06075f2c863..e2dfee54262 100644 --- a/lib/libssl/src/ssl/srtp.h +++ b/lib/libssl/src/ssl/srtp.h @@ -109,11 +109,11 @@ * */ /* - DTLS code by Eric Rescorla - - Copyright (C) 2006, Network Resonance, Inc. - Copyright (C) 2011, RTFM, Inc. -*/ + * DTLS code by Eric Rescorla + * + * Copyright (C) 2006, Network Resonance, Inc. + * Copyright (C) 2011, RTFM, Inc. + */ #ifndef HEADER_D1_SRTP_H #define HEADER_D1_SRTP_H diff --git a/lib/libssl/src/ssl/ssl.h b/lib/libssl/src/ssl/ssl.h index ef829797b7a..f3ca8c5c4e6 100644 --- a/lib/libssl/src/ssl/ssl.h +++ b/lib/libssl/src/ssl/ssl.h @@ -1728,9 +1728,8 @@ SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, unsigned int sid_ctx_len); SSL_SESSION *SSL_SESSION_new(void); -const unsigned char -*SSL_SESSION_get_id(const SSL_SESSION *s, -unsigned int *len); +const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, + unsigned int *len); unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s); #ifndef OPENSSL_NO_FP_API int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); diff --git a/lib/libssl/src/ssl/ssl_asn1.c b/lib/libssl/src/ssl/ssl_asn1.c index 60ee189f298..c551ec48772 100644 --- a/lib/libssl/src/ssl/ssl_asn1.c +++ b/lib/libssl/src/ssl/ssl_asn1.c @@ -355,9 +355,8 @@ i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) M_ASN1_I2D_finish(); } -SSL_SESSION -*d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, -long length) +SSL_SESSION * +d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length) { int ssl_version = 0, i; long id; diff --git a/lib/libssl/src/ssl/ssl_cert.c b/lib/libssl/src/ssl/ssl_cert.c index a823c16edff..389d47408c2 100644 --- a/lib/libssl/src/ssl/ssl_cert.c +++ b/lib/libssl/src/ssl/ssl_cert.c @@ -171,8 +171,8 @@ ssl_cert_set_default_md(CERT *cert) #endif } -CERT -*ssl_cert_new(void) +CERT * +ssl_cert_new(void) { CERT *ret; @@ -189,8 +189,8 @@ CERT return (ret); } -CERT -*ssl_cert_dup(CERT *cert) +CERT * +ssl_cert_dup(CERT *cert) { CERT *ret; int i; @@ -398,8 +398,8 @@ ssl_cert_inst(CERT **o) } -SESS_CERT -*ssl_sess_cert_new(void) +SESS_CERT * +ssl_sess_cert_new(void) { SESS_CERT *ret; @@ -531,8 +531,8 @@ set_client_CA_list(STACK_OF(X509_NAME) **ca_list, STACK_OF(X509_NAME) *name_list *ca_list = name_list; } -STACK_OF(X509_NAME) -*SSL_dup_CA_list(STACK_OF(X509_NAME) *sk) +STACK_OF(X509_NAME) * +SSL_dup_CA_list(STACK_OF(X509_NAME) *sk) { int i; STACK_OF(X509_NAME) *ret; @@ -561,14 +561,14 @@ SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list) set_client_CA_list(&(ctx->client_CA), name_list); } -STACK_OF(X509_NAME) -*SSL_CTX_get_client_CA_list(const SSL_CTX *ctx) +STACK_OF(X509_NAME) * +SSL_CTX_get_client_CA_list(const SSL_CTX *ctx) { return (ctx->client_CA); } -STACK_OF(X509_NAME) -*SSL_get_client_CA_list(const SSL *s) +STACK_OF(X509_NAME) * +SSL_get_client_CA_list(const SSL *s) { if (s->type == SSL_ST_CONNECT) { /* we are in the client */ @@ -632,8 +632,8 @@ xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) * \param file the file containing one or more certs. * \return a ::STACK containing the certs. */ -STACK_OF(X509_NAME) -*SSL_load_client_CA_file(const char *file) +STACK_OF(X509_NAME) * +SSL_load_client_CA_file(const char *file) { BIO *in; X509 *x = NULL; diff --git a/lib/libssl/src/ssl/ssl_ciph.c b/lib/libssl/src/ssl/ssl_ciph.c index 140a00ceca5..7d2ea6c481c 100644 --- a/lib/libssl/src/ssl/ssl_ciph.c +++ b/lib/libssl/src/ssl/ssl_ciph.c @@ -1295,8 +1295,8 @@ const SSL_CIPHER **ca_list) return (retval); } -STACK_OF(SSL_CIPHER) -*ssl_create_cipher_list(const SSL_METHOD *ssl_method, +STACK_OF(SSL_CIPHER) * +ssl_create_cipher_list(const SSL_METHOD *ssl_method, STACK_OF(SSL_CIPHER) **cipher_list, STACK_OF(SSL_CIPHER) **cipher_list_by_id, const char *rule_str) @@ -1466,8 +1466,8 @@ STACK_OF(SSL_CIPHER) return (cipherstack); } -char -*SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) +char * +SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) { int is_export, pkl, kl, l; const char *ver, *exp_str; @@ -1652,8 +1652,8 @@ char return (buf); } -char -*SSL_CIPHER_get_version(const SSL_CIPHER *c) +char * +SSL_CIPHER_get_version(const SSL_CIPHER *c) { int i; @@ -1669,8 +1669,8 @@ char } /* return the actual cipher being used */ -const char -*SSL_CIPHER_get_name(const SSL_CIPHER *c) +const char * +SSL_CIPHER_get_name(const SSL_CIPHER *c) { if (c != NULL) return (c->name); @@ -1697,8 +1697,8 @@ SSL_CIPHER_get_id(const SSL_CIPHER *c) return c->id; } -SSL_COMP -*ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n) +SSL_COMP * +ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n) { SSL_COMP *ctmp; int i, nn; @@ -1715,8 +1715,8 @@ SSL_COMP } #ifdef OPENSSL_NO_COMP -void -*SSL_COMP_get_compression_methods(void) +void * +SSL_COMP_get_compression_methods(void) { return NULL; } @@ -1727,14 +1727,14 @@ SSL_COMP_add_compression_method(int id, void *cm) return 1; } -const char -*SSL_COMP_get_name(const void *comp) +const char * +SSL_COMP_get_name(const void *comp) { return NULL; } #else -STACK_OF(SSL_COMP) -*SSL_COMP_get_compression_methods(void) +STACK_OF(SSL_COMP) * +SSL_COMP_get_compression_methods(void) { load_builtin_compressions(); return (ssl_comp_methods); @@ -1782,8 +1782,8 @@ SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) } } -const char -*SSL_COMP_get_name(const COMP_METHOD *comp) +const char * +SSL_COMP_get_name(const COMP_METHOD *comp) { if (comp) return comp->name; diff --git a/lib/libssl/src/ssl/ssl_lib.c b/lib/libssl/src/ssl/ssl_lib.c index dc36747833d..3ab353b8eb9 100644 --- a/lib/libssl/src/ssl/ssl_lib.c +++ b/lib/libssl/src/ssl/ssl_lib.c @@ -256,8 +256,8 @@ SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth) return (1); } -SSL -*SSL_new(SSL_CTX *ctx) +SSL * +SSL_new(SSL_CTX *ctx) { SSL *s; @@ -604,14 +604,16 @@ SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) s->wbio = wbio; } -BIO -*SSL_get_rbio(const SSL *s) - { return (s->rbio); +BIO * +SSL_get_rbio(const SSL *s) +{ + return (s->rbio); } -BIO -*SSL_get_wbio(const SSL *s) - { return (s->wbio); +BIO * +SSL_get_wbio(const SSL *s) +{ + return (s->wbio); } int @@ -819,8 +821,8 @@ SSL_pending(const SSL *s) return (s->method->ssl_pending(s)); } -X509 -*SSL_get_peer_certificate(const SSL *s) +X509 * +SSL_get_peer_certificate(const SSL *s) { X509 *r; @@ -837,8 +839,8 @@ X509 return (r); } -STACK_OF(X509) -*SSL_get_peer_cert_chain(const SSL *s) +STACK_OF(X509) * +SSL_get_peer_cert_chain(const SSL *s) { STACK_OF(X509) *r; @@ -1115,8 +1117,8 @@ SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) } } -LHASH_OF(SSL_SESSION) -*SSL_CTX_sessions(SSL_CTX *ctx) +LHASH_OF(SSL_SESSION) * +SSL_CTX_sessions(SSL_CTX *ctx) { return ctx->sessions; } @@ -1240,8 +1242,8 @@ ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, /** return a STACK of the ciphers available for the SSL and in order of * preference */ -STACK_OF(SSL_CIPHER) -*SSL_get_ciphers(const SSL *s) +STACK_OF(SSL_CIPHER) * +SSL_get_ciphers(const SSL *s) { if (s != NULL) { if (s->cipher_list != NULL) { @@ -1256,8 +1258,8 @@ STACK_OF(SSL_CIPHER) /** return a STACK of the ciphers available for the SSL and in order of * algorithm id */ -STACK_OF(SSL_CIPHER) -*ssl_get_ciphers_by_id(SSL *s) +STACK_OF(SSL_CIPHER) * +ssl_get_ciphers_by_id(SSL *s) { if (s != NULL) { if (s->cipher_list_by_id != NULL) { @@ -1271,8 +1273,8 @@ STACK_OF(SSL_CIPHER) } /** The old interface to get the same thing as SSL_get_ciphers() */ -const char -*SSL_get_cipher_list(const SSL *s, int n) +const char * +SSL_get_cipher_list(const SSL *s, int n) { SSL_CIPHER *c; STACK_OF(SSL_CIPHER) *sk; @@ -1331,8 +1333,8 @@ SSL_set_cipher_list(SSL *s, const char *str) } /* works well for SSLv2, not so good for SSLv3 */ -char -*SSL_get_shared_ciphers(const SSL *s, char *buf, int len) +char * +SSL_get_shared_ciphers(const SSL *s, char *buf, int len) { char *end; STACK_OF(SSL_CIPHER) *sk; @@ -1414,9 +1416,9 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p, return (p - q); } -STACK_OF(SSL_CIPHER) -*ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num, -STACK_OF(SSL_CIPHER) **skp) +STACK_OF(SSL_CIPHER) * +ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num, + STACK_OF(SSL_CIPHER) **skp) { const SSL_CIPHER *c; STACK_OF(SSL_CIPHER) *sk; @@ -1481,8 +1483,8 @@ err: * So far, only host_name types are defined (RFC 3546). */ -const char -*SSL_get_servername(const SSL *s, const int type) +const char * +SSL_get_servername(const SSL *s, const int type) { if (type != TLSEXT_NAMETYPE_host_name) return NULL; @@ -1669,8 +1671,8 @@ IMPLEMENT_LHASH_HASH_FN(ssl_session, SSL_SESSION) static IMPLEMENT_LHASH_COMP_FN(ssl_session, SSL_SESSION) -SSL_CTX -*SSL_CTX_new(const SSL_METHOD *meth) +SSL_CTX * +SSL_CTX_new(const SSL_METHOD *meth) { SSL_CTX *ret = NULL; @@ -2217,8 +2219,8 @@ ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) #endif /* THIS NEEDS CLEANING UP */ -CERT_PKEY -*ssl_get_server_send_pkey(const SSL *s) +CERT_PKEY * +ssl_get_server_send_pkey(const SSL *s) { unsigned long alg_k, alg_a; CERT *c; @@ -2272,8 +2274,8 @@ CERT_PKEY return c->pkeys + i; } -X509 -*ssl_get_server_send_cert(const SSL *s) +X509 * +ssl_get_server_send_cert(const SSL *s) { CERT_PKEY *cpk; cpk = ssl_get_server_send_pkey(s); @@ -2282,8 +2284,8 @@ X509 return cpk->x509; } -EVP_PKEY -*ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd) +EVP_PKEY * +ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd) { unsigned long alg_a; CERT *c; @@ -2343,8 +2345,8 @@ ssl_update_cache(SSL *s, int mode) } } -const SSL_METHOD -*SSL_get_ssl_method(SSL *s) +const SSL_METHOD * +SSL_get_ssl_method(SSL *s) { return (s->method); } @@ -2684,8 +2686,8 @@ ssl_clear_cipher_ctx(SSL *s) } /* Fix this function so that it takes an optional type parameter */ -X509 -*SSL_get_certificate(const SSL *s) +X509 * +SSL_get_certificate(const SSL *s) { if (s->cert != NULL) return (s->cert->key->x509); @@ -2694,8 +2696,8 @@ X509 } /* Fix this function so that it takes an optional type parameter */ -EVP_PKEY -*SSL_get_privatekey(SSL *s) +EVP_PKEY * +SSL_get_privatekey(SSL *s) { if (s->cert != NULL) return (s->cert->key->privatekey); @@ -2703,37 +2705,37 @@ EVP_PKEY return (NULL); } -const SSL_CIPHER -*SSL_get_current_cipher(const SSL *s) +const SSL_CIPHER * +SSL_get_current_cipher(const SSL *s) { if ((s->session != NULL) && (s->session->cipher != NULL)) return (s->session->cipher); return (NULL); } #ifdef OPENSSL_NO_COMP -const void -*SSL_get_current_compression(SSL *s) +const void * +SSL_get_current_compression(SSL *s) { return NULL; } -const void -*SSL_get_current_expansion(SSL *s) +const void * +SSL_get_current_expansion(SSL *s) { return NULL; } #else -const COMP_METHOD -*SSL_get_current_compression(SSL *s) +const COMP_METHOD * +SSL_get_current_compression(SSL *s) { if (s->compress != NULL) return (s->compress->meth); return (NULL); } -const COMP_METHOD -*SSL_get_current_expansion(SSL *s) +const COMP_METHOD * +SSL_get_current_expansion(SSL *s) { if (s->expand != NULL) return (s->expand->meth); @@ -2828,14 +2830,14 @@ SSL_version(const SSL *s) return (s->version); } -SSL_CTX -*SSL_get_SSL_CTX(const SSL *ssl) +SSL_CTX * +SSL_get_SSL_CTX(const SSL *ssl) { return (ssl->ctx); } -SSL_CTX -*SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) +SSL_CTX * +SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) { if (ssl->ctx == ctx) return ssl->ctx; @@ -2920,8 +2922,8 @@ SSL_set_ex_data(SSL *s, int idx, void *arg) return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); } -void -*SSL_get_ex_data(const SSL *s, int idx) +void * +SSL_get_ex_data(const SSL *s, int idx) { return (CRYPTO_get_ex_data(&s->ex_data, idx)); } @@ -2940,8 +2942,8 @@ SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg) return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); } -void -*SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) +void * +SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) { return (CRYPTO_get_ex_data(&s->ex_data, idx)); } @@ -2952,8 +2954,8 @@ ssl_ok(SSL *s) return (1); } -X509_STORE -*SSL_CTX_get_cert_store(const SSL_CTX *ctx) +X509_STORE * +SSL_CTX_get_cert_store(const SSL_CTX *ctx) { return (ctx->cert_store); } @@ -3005,8 +3007,8 @@ int keylength)) * \sa SSL_CTX_set_tmp_rsa_callback, SSL_set_tmp_rsa_callback */ -RSA -*cb(SSL *ssl, int is_export, int keylength) +RSA * +cb(SSL *ssl, int is_export, int keylength) {} #endif @@ -3091,16 +3093,16 @@ SSL_use_psk_identity_hint(SSL *s, const char *identity_hint) return 1; } -const char -*SSL_get_psk_identity_hint(const SSL *s) +const char * +SSL_get_psk_identity_hint(const SSL *s) { if (s == NULL || s->session == NULL) return NULL; return (s->session->psk_identity_hint); } -const char -*SSL_get_psk_identity(const SSL *s) +const char * +SSL_get_psk_identity(const SSL *s) { if (s == NULL || s->session == NULL) return NULL; @@ -3160,8 +3162,8 @@ SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_ * Returns newly allocated ctx; */ -EVP_MD_CTX -*ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) +EVP_MD_CTX * +ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) { ssl_clear_hash_ctx(hash); *hash = EVP_MD_CTX_create(); diff --git a/lib/libssl/src/ssl/ssl_sess.c b/lib/libssl/src/ssl/ssl_sess.c index cbfff0b3982..c67ae1c22f6 100644 --- a/lib/libssl/src/ssl/ssl_sess.c +++ b/lib/libssl/src/ssl/ssl_sess.c @@ -147,16 +147,16 @@ static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s); static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck); -SSL_SESSION -*SSL_get_session(const SSL *ssl) /* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */ +SSL_SESSION * +SSL_get_session(const SSL *ssl) { return (ssl->session); } -SSL_SESSION -*SSL_get1_session(SSL *ssl) /* variant of SSL_get_session: caller really gets something */ +SSL_SESSION * +SSL_get1_session(SSL *ssl) { SSL_SESSION *sess; /* Need to lock this all up rather than just use CRYPTO_add so that @@ -184,14 +184,14 @@ SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg) return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); } -void -*SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) +void * +SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) { return (CRYPTO_get_ex_data(&s->ex_data, idx)); } -SSL_SESSION -*SSL_SESSION_new(void) +SSL_SESSION * +SSL_SESSION_new(void) { SSL_SESSION *ss; @@ -230,8 +230,8 @@ SSL_SESSION return (ss); } -const unsigned char -*SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) +const unsigned char * +SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) { if (len) *len = s->session_id_length; @@ -824,8 +824,8 @@ SSL_SESSION_set_time(SSL_SESSION *s, long t) return (t); } -X509 -*SSL_SESSION_get0_peer(SSL_SESSION *s) +X509 * +SSL_SESSION_get0_peer(SSL_SESSION *s) { return s->peer; } diff --git a/lib/libssl/src/ssl/ssl_stat.c b/lib/libssl/src/ssl/ssl_stat.c index da55c92de2e..0dae5694b41 100644 --- a/lib/libssl/src/ssl/ssl_stat.c +++ b/lib/libssl/src/ssl/ssl_stat.c @@ -85,8 +85,8 @@ #include #include "ssl_locl.h" -const char -*SSL_state_string_long(const SSL *s) +const char * +SSL_state_string_long(const SSL *s) { const char *str; @@ -249,8 +249,8 @@ const char return (str); } -const char -*SSL_rstate_string_long(const SSL *s) +const char * +SSL_rstate_string_long(const SSL *s) { const char *str; @@ -267,8 +267,8 @@ const char return (str); } -const char -*SSL_state_string(const SSL *s) +const char * +SSL_state_string(const SSL *s) { const char *str; @@ -412,8 +412,8 @@ const char return (str); } -const char -*SSL_alert_type_string_long(int value) +const char * +SSL_alert_type_string_long(int value) { value>>=8; if (value == SSL3_AL_WARNING) @@ -424,8 +424,8 @@ const char return("unknown"); } -const char -*SSL_alert_type_string(int value) +const char * +SSL_alert_type_string(int value) { value>>=8; if (value == SSL3_AL_WARNING) @@ -436,8 +436,8 @@ const char return("U"); } -const char -*SSL_alert_desc_string(int value) +const char * +SSL_alert_desc_string(int value) { const char *str; @@ -508,8 +508,8 @@ const char return (str); } -const char -*SSL_alert_desc_string_long(int value) +const char * +SSL_alert_desc_string_long(int value) { const char *str; @@ -610,8 +610,8 @@ const char return (str); } -const char -*SSL_rstate_string(const SSL *s) +const char * +SSL_rstate_string(const SSL *s) { const char *str; diff --git a/lib/libssl/src/ssl/ssltest.c b/lib/libssl/src/ssl/ssltest.c index cee5834fef2..1f5014baf38 100644 --- a/lib/libssl/src/ssl/ssltest.c +++ b/lib/libssl/src/ssl/ssltest.c @@ -2069,8 +2069,8 @@ app_verify_callback(X509_STORE_CTX *ctx, void *arg) static RSA *rsa_tmp = NULL; -static RSA -*tmp_rsa_cb(SSL *s, int is_export, int keylength) +static RSA * +tmp_rsa_cb(SSL *s, int is_export, int keylength) { BIGNUM *bn = NULL; if (rsa_tmp == NULL) { @@ -2112,8 +2112,8 @@ free_tmp_rsa(void) * $ openssl dhparam -C -noout -dsaparam 1024 * (The third function has been renamed to avoid name conflicts.) */ -static DH -*get_dh512() +static DH * +get_dh512() { static unsigned char dh512_p[] = { 0xCB, 0xC8, 0xE1, 0x86, 0xD0, 0x1F, 0x94, 0x17, 0xA6, 0x99, 0xF0, 0xC6, @@ -2138,8 +2138,8 @@ static DH return (dh); } -static DH -*get_dh1024() +static DH * +get_dh1024() { static unsigned char dh1024_p[] = { 0xF8, 0x81, 0x89, 0x7D, 0x14, 0x24, 0xC5, 0xD1, 0xE6, 0xF7, 0xBF, 0x3A, @@ -2169,8 +2169,8 @@ static DH return (dh); } -static DH -*get_dh1024dsa() +static DH * +get_dh1024dsa() { static unsigned char dh1024_p[] = { 0xC8, 0x00, 0xF7, 0x08, 0x07, 0x89, 0x4D, 0x90, 0x53, 0xF3, 0xD5, 0x00, diff --git a/lib/libssl/src/ssl/t1_clnt.c b/lib/libssl/src/ssl/t1_clnt.c index ac8ff7309ff..fa333259ae1 100644 --- a/lib/libssl/src/ssl/t1_clnt.c +++ b/lib/libssl/src/ssl/t1_clnt.c @@ -65,16 +65,16 @@ static const SSL_METHOD *tls1_get_client_method(int ver); -static const SSL_METHOD -*tls1_get_client_method(int ver) +static const SSL_METHOD * +tls1_get_client_method(int ver) { if (ver == TLS1_2_VERSION) - return TLSv1_2_client_method(); + return (TLSv1_2_client_method()); if (ver == TLS1_1_VERSION) - return TLSv1_1_client_method(); + return (TLSv1_1_client_method()); if (ver == TLS1_VERSION) - return TLSv1_client_method(); - return NULL; + return (TLSv1_client_method()); + return (NULL); } IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_client_method, diff --git a/lib/libssl/src/ssl/t1_lib.c b/lib/libssl/src/ssl/t1_lib.c index f6cfb508f60..85d0fa49705 100644 --- a/lib/libssl/src/ssl/t1_lib.c +++ b/lib/libssl/src/ssl/t1_lib.c @@ -343,8 +343,8 @@ tls12_get_req_sig_algs(SSL *s, unsigned char *p) return (int)slen; } -unsigned char -*ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) +unsigned char * +ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) { int extdatalen = 0; unsigned char *ret = p; @@ -671,8 +671,8 @@ skip_ext: return ret; } -unsigned char -*ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) +unsigned char * +ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) { int extdatalen = 0; unsigned char *ret = p; @@ -2249,8 +2249,8 @@ tls12_get_sigid(const EVP_PKEY *pk) sizeof(tls12_sig)/sizeof(tls12_lookup)); } -const EVP_MD -*tls12_get_hash(unsigned char hash_alg) +const EVP_MD * +tls12_get_hash(unsigned char hash_alg) { switch (hash_alg) { case TLSEXT_hash_sha1: diff --git a/lib/libssl/src/ssl/t1_meth.c b/lib/libssl/src/ssl/t1_meth.c index ab2d789e591..cf62fe5c3d7 100644 --- a/lib/libssl/src/ssl/t1_meth.c +++ b/lib/libssl/src/ssl/t1_meth.c @@ -60,16 +60,16 @@ #include #include "ssl_locl.h" -static const SSL_METHOD -*tls1_get_method(int ver) +static const SSL_METHOD * +tls1_get_method(int ver) { if (ver == TLS1_2_VERSION) - return TLSv1_2_method(); + return (TLSv1_2_method()); if (ver == TLS1_1_VERSION) - return TLSv1_1_method(); + return (TLSv1_1_method()); if (ver == TLS1_VERSION) - return TLSv1_method(); - return NULL; + return (TLSv1_method()); + return (NULL); } IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_method, diff --git a/lib/libssl/src/ssl/t1_srvr.c b/lib/libssl/src/ssl/t1_srvr.c index 776bcabc465..c0d186e425d 100644 --- a/lib/libssl/src/ssl/t1_srvr.c +++ b/lib/libssl/src/ssl/t1_srvr.c @@ -66,16 +66,16 @@ static const SSL_METHOD *tls1_get_server_method(int ver); -static const SSL_METHOD -*tls1_get_server_method(int ver) +static const SSL_METHOD * +tls1_get_server_method(int ver) { if (ver == TLS1_2_VERSION) - return TLSv1_2_server_method(); + return (TLSv1_2_server_method()); if (ver == TLS1_1_VERSION) - return TLSv1_1_server_method(); + return (TLSv1_1_server_method()); if (ver == TLS1_VERSION) - return TLSv1_server_method(); - return NULL; + return (TLSv1_server_method()); + return (NULL); } IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_server_method, diff --git a/lib/libssl/src/ssl/tls_srp.c b/lib/libssl/src/ssl/tls_srp.c index a3acb6fd14b..c585211cd0b 100644 --- a/lib/libssl/src/ssl/tls_srp.c +++ b/lib/libssl/src/ssl/tls_srp.c @@ -426,32 +426,32 @@ SRP_Calc_A_param(SSL *s) return 1; } -BIGNUM -*SSL_get_srp_g(SSL *s) +BIGNUM * +SSL_get_srp_g(SSL *s) { if (s->srp_ctx.g != NULL) return s->srp_ctx.g; return s->ctx->srp_ctx.g; } -BIGNUM -*SSL_get_srp_N(SSL *s) +BIGNUM * +SSL_get_srp_N(SSL *s) { if (s->srp_ctx.N != NULL) return s->srp_ctx.N; return s->ctx->srp_ctx.N; } -char -*SSL_get_srp_username(SSL *s) +char * +SSL_get_srp_username(SSL *s) { if (s->srp_ctx.login != NULL) return s->srp_ctx.login; return s->ctx->srp_ctx.login; } -char -*SSL_get_srp_userinfo(SSL *s) +char * +SSL_get_srp_userinfo(SSL *s) { if (s->srp_ctx.info != NULL) return s->srp_ctx.info; diff --git a/lib/libssl/srtp.h b/lib/libssl/srtp.h index 06075f2c863..e2dfee54262 100644 --- a/lib/libssl/srtp.h +++ b/lib/libssl/srtp.h @@ -109,11 +109,11 @@ * */ /* - DTLS code by Eric Rescorla - - Copyright (C) 2006, Network Resonance, Inc. - Copyright (C) 2011, RTFM, Inc. -*/ + * DTLS code by Eric Rescorla + * + * Copyright (C) 2006, Network Resonance, Inc. + * Copyright (C) 2011, RTFM, Inc. + */ #ifndef HEADER_D1_SRTP_H #define HEADER_D1_SRTP_H diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h index ef829797b7a..f3ca8c5c4e6 100644 --- a/lib/libssl/ssl.h +++ b/lib/libssl/ssl.h @@ -1728,9 +1728,8 @@ SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, unsigned int sid_ctx_len); SSL_SESSION *SSL_SESSION_new(void); -const unsigned char -*SSL_SESSION_get_id(const SSL_SESSION *s, -unsigned int *len); +const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, + unsigned int *len); unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s); #ifndef OPENSSL_NO_FP_API int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); diff --git a/lib/libssl/ssl_asn1.c b/lib/libssl/ssl_asn1.c index 60ee189f298..c551ec48772 100644 --- a/lib/libssl/ssl_asn1.c +++ b/lib/libssl/ssl_asn1.c @@ -355,9 +355,8 @@ i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) M_ASN1_I2D_finish(); } -SSL_SESSION -*d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, -long length) +SSL_SESSION * +d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length) { int ssl_version = 0, i; long id; diff --git a/lib/libssl/ssl_cert.c b/lib/libssl/ssl_cert.c index a823c16edff..389d47408c2 100644 --- a/lib/libssl/ssl_cert.c +++ b/lib/libssl/ssl_cert.c @@ -171,8 +171,8 @@ ssl_cert_set_default_md(CERT *cert) #endif } -CERT -*ssl_cert_new(void) +CERT * +ssl_cert_new(void) { CERT *ret; @@ -189,8 +189,8 @@ CERT return (ret); } -CERT -*ssl_cert_dup(CERT *cert) +CERT * +ssl_cert_dup(CERT *cert) { CERT *ret; int i; @@ -398,8 +398,8 @@ ssl_cert_inst(CERT **o) } -SESS_CERT -*ssl_sess_cert_new(void) +SESS_CERT * +ssl_sess_cert_new(void) { SESS_CERT *ret; @@ -531,8 +531,8 @@ set_client_CA_list(STACK_OF(X509_NAME) **ca_list, STACK_OF(X509_NAME) *name_list *ca_list = name_list; } -STACK_OF(X509_NAME) -*SSL_dup_CA_list(STACK_OF(X509_NAME) *sk) +STACK_OF(X509_NAME) * +SSL_dup_CA_list(STACK_OF(X509_NAME) *sk) { int i; STACK_OF(X509_NAME) *ret; @@ -561,14 +561,14 @@ SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list) set_client_CA_list(&(ctx->client_CA), name_list); } -STACK_OF(X509_NAME) -*SSL_CTX_get_client_CA_list(const SSL_CTX *ctx) +STACK_OF(X509_NAME) * +SSL_CTX_get_client_CA_list(const SSL_CTX *ctx) { return (ctx->client_CA); } -STACK_OF(X509_NAME) -*SSL_get_client_CA_list(const SSL *s) +STACK_OF(X509_NAME) * +SSL_get_client_CA_list(const SSL *s) { if (s->type == SSL_ST_CONNECT) { /* we are in the client */ @@ -632,8 +632,8 @@ xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) * \param file the file containing one or more certs. * \return a ::STACK containing the certs. */ -STACK_OF(X509_NAME) -*SSL_load_client_CA_file(const char *file) +STACK_OF(X509_NAME) * +SSL_load_client_CA_file(const char *file) { BIO *in; X509 *x = NULL; diff --git a/lib/libssl/ssl_ciph.c b/lib/libssl/ssl_ciph.c index 140a00ceca5..7d2ea6c481c 100644 --- a/lib/libssl/ssl_ciph.c +++ b/lib/libssl/ssl_ciph.c @@ -1295,8 +1295,8 @@ const SSL_CIPHER **ca_list) return (retval); } -STACK_OF(SSL_CIPHER) -*ssl_create_cipher_list(const SSL_METHOD *ssl_method, +STACK_OF(SSL_CIPHER) * +ssl_create_cipher_list(const SSL_METHOD *ssl_method, STACK_OF(SSL_CIPHER) **cipher_list, STACK_OF(SSL_CIPHER) **cipher_list_by_id, const char *rule_str) @@ -1466,8 +1466,8 @@ STACK_OF(SSL_CIPHER) return (cipherstack); } -char -*SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) +char * +SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len) { int is_export, pkl, kl, l; const char *ver, *exp_str; @@ -1652,8 +1652,8 @@ char return (buf); } -char -*SSL_CIPHER_get_version(const SSL_CIPHER *c) +char * +SSL_CIPHER_get_version(const SSL_CIPHER *c) { int i; @@ -1669,8 +1669,8 @@ char } /* return the actual cipher being used */ -const char -*SSL_CIPHER_get_name(const SSL_CIPHER *c) +const char * +SSL_CIPHER_get_name(const SSL_CIPHER *c) { if (c != NULL) return (c->name); @@ -1697,8 +1697,8 @@ SSL_CIPHER_get_id(const SSL_CIPHER *c) return c->id; } -SSL_COMP -*ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n) +SSL_COMP * +ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n) { SSL_COMP *ctmp; int i, nn; @@ -1715,8 +1715,8 @@ SSL_COMP } #ifdef OPENSSL_NO_COMP -void -*SSL_COMP_get_compression_methods(void) +void * +SSL_COMP_get_compression_methods(void) { return NULL; } @@ -1727,14 +1727,14 @@ SSL_COMP_add_compression_method(int id, void *cm) return 1; } -const char -*SSL_COMP_get_name(const void *comp) +const char * +SSL_COMP_get_name(const void *comp) { return NULL; } #else -STACK_OF(SSL_COMP) -*SSL_COMP_get_compression_methods(void) +STACK_OF(SSL_COMP) * +SSL_COMP_get_compression_methods(void) { load_builtin_compressions(); return (ssl_comp_methods); @@ -1782,8 +1782,8 @@ SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) } } -const char -*SSL_COMP_get_name(const COMP_METHOD *comp) +const char * +SSL_COMP_get_name(const COMP_METHOD *comp) { if (comp) return comp->name; diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c index dc36747833d..3ab353b8eb9 100644 --- a/lib/libssl/ssl_lib.c +++ b/lib/libssl/ssl_lib.c @@ -256,8 +256,8 @@ SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth) return (1); } -SSL -*SSL_new(SSL_CTX *ctx) +SSL * +SSL_new(SSL_CTX *ctx) { SSL *s; @@ -604,14 +604,16 @@ SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) s->wbio = wbio; } -BIO -*SSL_get_rbio(const SSL *s) - { return (s->rbio); +BIO * +SSL_get_rbio(const SSL *s) +{ + return (s->rbio); } -BIO -*SSL_get_wbio(const SSL *s) - { return (s->wbio); +BIO * +SSL_get_wbio(const SSL *s) +{ + return (s->wbio); } int @@ -819,8 +821,8 @@ SSL_pending(const SSL *s) return (s->method->ssl_pending(s)); } -X509 -*SSL_get_peer_certificate(const SSL *s) +X509 * +SSL_get_peer_certificate(const SSL *s) { X509 *r; @@ -837,8 +839,8 @@ X509 return (r); } -STACK_OF(X509) -*SSL_get_peer_cert_chain(const SSL *s) +STACK_OF(X509) * +SSL_get_peer_cert_chain(const SSL *s) { STACK_OF(X509) *r; @@ -1115,8 +1117,8 @@ SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) } } -LHASH_OF(SSL_SESSION) -*SSL_CTX_sessions(SSL_CTX *ctx) +LHASH_OF(SSL_SESSION) * +SSL_CTX_sessions(SSL_CTX *ctx) { return ctx->sessions; } @@ -1240,8 +1242,8 @@ ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, /** return a STACK of the ciphers available for the SSL and in order of * preference */ -STACK_OF(SSL_CIPHER) -*SSL_get_ciphers(const SSL *s) +STACK_OF(SSL_CIPHER) * +SSL_get_ciphers(const SSL *s) { if (s != NULL) { if (s->cipher_list != NULL) { @@ -1256,8 +1258,8 @@ STACK_OF(SSL_CIPHER) /** return a STACK of the ciphers available for the SSL and in order of * algorithm id */ -STACK_OF(SSL_CIPHER) -*ssl_get_ciphers_by_id(SSL *s) +STACK_OF(SSL_CIPHER) * +ssl_get_ciphers_by_id(SSL *s) { if (s != NULL) { if (s->cipher_list_by_id != NULL) { @@ -1271,8 +1273,8 @@ STACK_OF(SSL_CIPHER) } /** The old interface to get the same thing as SSL_get_ciphers() */ -const char -*SSL_get_cipher_list(const SSL *s, int n) +const char * +SSL_get_cipher_list(const SSL *s, int n) { SSL_CIPHER *c; STACK_OF(SSL_CIPHER) *sk; @@ -1331,8 +1333,8 @@ SSL_set_cipher_list(SSL *s, const char *str) } /* works well for SSLv2, not so good for SSLv3 */ -char -*SSL_get_shared_ciphers(const SSL *s, char *buf, int len) +char * +SSL_get_shared_ciphers(const SSL *s, char *buf, int len) { char *end; STACK_OF(SSL_CIPHER) *sk; @@ -1414,9 +1416,9 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p, return (p - q); } -STACK_OF(SSL_CIPHER) -*ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num, -STACK_OF(SSL_CIPHER) **skp) +STACK_OF(SSL_CIPHER) * +ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num, + STACK_OF(SSL_CIPHER) **skp) { const SSL_CIPHER *c; STACK_OF(SSL_CIPHER) *sk; @@ -1481,8 +1483,8 @@ err: * So far, only host_name types are defined (RFC 3546). */ -const char -*SSL_get_servername(const SSL *s, const int type) +const char * +SSL_get_servername(const SSL *s, const int type) { if (type != TLSEXT_NAMETYPE_host_name) return NULL; @@ -1669,8 +1671,8 @@ IMPLEMENT_LHASH_HASH_FN(ssl_session, SSL_SESSION) static IMPLEMENT_LHASH_COMP_FN(ssl_session, SSL_SESSION) -SSL_CTX -*SSL_CTX_new(const SSL_METHOD *meth) +SSL_CTX * +SSL_CTX_new(const SSL_METHOD *meth) { SSL_CTX *ret = NULL; @@ -2217,8 +2219,8 @@ ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) #endif /* THIS NEEDS CLEANING UP */ -CERT_PKEY -*ssl_get_server_send_pkey(const SSL *s) +CERT_PKEY * +ssl_get_server_send_pkey(const SSL *s) { unsigned long alg_k, alg_a; CERT *c; @@ -2272,8 +2274,8 @@ CERT_PKEY return c->pkeys + i; } -X509 -*ssl_get_server_send_cert(const SSL *s) +X509 * +ssl_get_server_send_cert(const SSL *s) { CERT_PKEY *cpk; cpk = ssl_get_server_send_pkey(s); @@ -2282,8 +2284,8 @@ X509 return cpk->x509; } -EVP_PKEY -*ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd) +EVP_PKEY * +ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd) { unsigned long alg_a; CERT *c; @@ -2343,8 +2345,8 @@ ssl_update_cache(SSL *s, int mode) } } -const SSL_METHOD -*SSL_get_ssl_method(SSL *s) +const SSL_METHOD * +SSL_get_ssl_method(SSL *s) { return (s->method); } @@ -2684,8 +2686,8 @@ ssl_clear_cipher_ctx(SSL *s) } /* Fix this function so that it takes an optional type parameter */ -X509 -*SSL_get_certificate(const SSL *s) +X509 * +SSL_get_certificate(const SSL *s) { if (s->cert != NULL) return (s->cert->key->x509); @@ -2694,8 +2696,8 @@ X509 } /* Fix this function so that it takes an optional type parameter */ -EVP_PKEY -*SSL_get_privatekey(SSL *s) +EVP_PKEY * +SSL_get_privatekey(SSL *s) { if (s->cert != NULL) return (s->cert->key->privatekey); @@ -2703,37 +2705,37 @@ EVP_PKEY return (NULL); } -const SSL_CIPHER -*SSL_get_current_cipher(const SSL *s) +const SSL_CIPHER * +SSL_get_current_cipher(const SSL *s) { if ((s->session != NULL) && (s->session->cipher != NULL)) return (s->session->cipher); return (NULL); } #ifdef OPENSSL_NO_COMP -const void -*SSL_get_current_compression(SSL *s) +const void * +SSL_get_current_compression(SSL *s) { return NULL; } -const void -*SSL_get_current_expansion(SSL *s) +const void * +SSL_get_current_expansion(SSL *s) { return NULL; } #else -const COMP_METHOD -*SSL_get_current_compression(SSL *s) +const COMP_METHOD * +SSL_get_current_compression(SSL *s) { if (s->compress != NULL) return (s->compress->meth); return (NULL); } -const COMP_METHOD -*SSL_get_current_expansion(SSL *s) +const COMP_METHOD * +SSL_get_current_expansion(SSL *s) { if (s->expand != NULL) return (s->expand->meth); @@ -2828,14 +2830,14 @@ SSL_version(const SSL *s) return (s->version); } -SSL_CTX -*SSL_get_SSL_CTX(const SSL *ssl) +SSL_CTX * +SSL_get_SSL_CTX(const SSL *ssl) { return (ssl->ctx); } -SSL_CTX -*SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) +SSL_CTX * +SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) { if (ssl->ctx == ctx) return ssl->ctx; @@ -2920,8 +2922,8 @@ SSL_set_ex_data(SSL *s, int idx, void *arg) return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); } -void -*SSL_get_ex_data(const SSL *s, int idx) +void * +SSL_get_ex_data(const SSL *s, int idx) { return (CRYPTO_get_ex_data(&s->ex_data, idx)); } @@ -2940,8 +2942,8 @@ SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg) return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); } -void -*SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) +void * +SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) { return (CRYPTO_get_ex_data(&s->ex_data, idx)); } @@ -2952,8 +2954,8 @@ ssl_ok(SSL *s) return (1); } -X509_STORE -*SSL_CTX_get_cert_store(const SSL_CTX *ctx) +X509_STORE * +SSL_CTX_get_cert_store(const SSL_CTX *ctx) { return (ctx->cert_store); } @@ -3005,8 +3007,8 @@ int keylength)) * \sa SSL_CTX_set_tmp_rsa_callback, SSL_set_tmp_rsa_callback */ -RSA -*cb(SSL *ssl, int is_export, int keylength) +RSA * +cb(SSL *ssl, int is_export, int keylength) {} #endif @@ -3091,16 +3093,16 @@ SSL_use_psk_identity_hint(SSL *s, const char *identity_hint) return 1; } -const char -*SSL_get_psk_identity_hint(const SSL *s) +const char * +SSL_get_psk_identity_hint(const SSL *s) { if (s == NULL || s->session == NULL) return NULL; return (s->session->psk_identity_hint); } -const char -*SSL_get_psk_identity(const SSL *s) +const char * +SSL_get_psk_identity(const SSL *s) { if (s == NULL || s->session == NULL) return NULL; @@ -3160,8 +3162,8 @@ SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_ * Returns newly allocated ctx; */ -EVP_MD_CTX -*ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) +EVP_MD_CTX * +ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md) { ssl_clear_hash_ctx(hash); *hash = EVP_MD_CTX_create(); diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c index cbfff0b3982..c67ae1c22f6 100644 --- a/lib/libssl/ssl_sess.c +++ b/lib/libssl/ssl_sess.c @@ -147,16 +147,16 @@ static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s); static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck); -SSL_SESSION -*SSL_get_session(const SSL *ssl) /* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */ +SSL_SESSION * +SSL_get_session(const SSL *ssl) { return (ssl->session); } -SSL_SESSION -*SSL_get1_session(SSL *ssl) /* variant of SSL_get_session: caller really gets something */ +SSL_SESSION * +SSL_get1_session(SSL *ssl) { SSL_SESSION *sess; /* Need to lock this all up rather than just use CRYPTO_add so that @@ -184,14 +184,14 @@ SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg) return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); } -void -*SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) +void * +SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) { return (CRYPTO_get_ex_data(&s->ex_data, idx)); } -SSL_SESSION -*SSL_SESSION_new(void) +SSL_SESSION * +SSL_SESSION_new(void) { SSL_SESSION *ss; @@ -230,8 +230,8 @@ SSL_SESSION return (ss); } -const unsigned char -*SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) +const unsigned char * +SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) { if (len) *len = s->session_id_length; @@ -824,8 +824,8 @@ SSL_SESSION_set_time(SSL_SESSION *s, long t) return (t); } -X509 -*SSL_SESSION_get0_peer(SSL_SESSION *s) +X509 * +SSL_SESSION_get0_peer(SSL_SESSION *s) { return s->peer; } diff --git a/lib/libssl/ssl_stat.c b/lib/libssl/ssl_stat.c index da55c92de2e..0dae5694b41 100644 --- a/lib/libssl/ssl_stat.c +++ b/lib/libssl/ssl_stat.c @@ -85,8 +85,8 @@ #include #include "ssl_locl.h" -const char -*SSL_state_string_long(const SSL *s) +const char * +SSL_state_string_long(const SSL *s) { const char *str; @@ -249,8 +249,8 @@ const char return (str); } -const char -*SSL_rstate_string_long(const SSL *s) +const char * +SSL_rstate_string_long(const SSL *s) { const char *str; @@ -267,8 +267,8 @@ const char return (str); } -const char -*SSL_state_string(const SSL *s) +const char * +SSL_state_string(const SSL *s) { const char *str; @@ -412,8 +412,8 @@ const char return (str); } -const char -*SSL_alert_type_string_long(int value) +const char * +SSL_alert_type_string_long(int value) { value>>=8; if (value == SSL3_AL_WARNING) @@ -424,8 +424,8 @@ const char return("unknown"); } -const char -*SSL_alert_type_string(int value) +const char * +SSL_alert_type_string(int value) { value>>=8; if (value == SSL3_AL_WARNING) @@ -436,8 +436,8 @@ const char return("U"); } -const char -*SSL_alert_desc_string(int value) +const char * +SSL_alert_desc_string(int value) { const char *str; @@ -508,8 +508,8 @@ const char return (str); } -const char -*SSL_alert_desc_string_long(int value) +const char * +SSL_alert_desc_string_long(int value) { const char *str; @@ -610,8 +610,8 @@ const char return (str); } -const char -*SSL_rstate_string(const SSL *s) +const char * +SSL_rstate_string(const SSL *s) { const char *str; diff --git a/lib/libssl/t1_clnt.c b/lib/libssl/t1_clnt.c index ac8ff7309ff..fa333259ae1 100644 --- a/lib/libssl/t1_clnt.c +++ b/lib/libssl/t1_clnt.c @@ -65,16 +65,16 @@ static const SSL_METHOD *tls1_get_client_method(int ver); -static const SSL_METHOD -*tls1_get_client_method(int ver) +static const SSL_METHOD * +tls1_get_client_method(int ver) { if (ver == TLS1_2_VERSION) - return TLSv1_2_client_method(); + return (TLSv1_2_client_method()); if (ver == TLS1_1_VERSION) - return TLSv1_1_client_method(); + return (TLSv1_1_client_method()); if (ver == TLS1_VERSION) - return TLSv1_client_method(); - return NULL; + return (TLSv1_client_method()); + return (NULL); } IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_client_method, diff --git a/lib/libssl/t1_lib.c b/lib/libssl/t1_lib.c index f6cfb508f60..85d0fa49705 100644 --- a/lib/libssl/t1_lib.c +++ b/lib/libssl/t1_lib.c @@ -343,8 +343,8 @@ tls12_get_req_sig_algs(SSL *s, unsigned char *p) return (int)slen; } -unsigned char -*ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) +unsigned char * +ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) { int extdatalen = 0; unsigned char *ret = p; @@ -671,8 +671,8 @@ skip_ext: return ret; } -unsigned char -*ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) +unsigned char * +ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) { int extdatalen = 0; unsigned char *ret = p; @@ -2249,8 +2249,8 @@ tls12_get_sigid(const EVP_PKEY *pk) sizeof(tls12_sig)/sizeof(tls12_lookup)); } -const EVP_MD -*tls12_get_hash(unsigned char hash_alg) +const EVP_MD * +tls12_get_hash(unsigned char hash_alg) { switch (hash_alg) { case TLSEXT_hash_sha1: diff --git a/lib/libssl/t1_meth.c b/lib/libssl/t1_meth.c index ab2d789e591..cf62fe5c3d7 100644 --- a/lib/libssl/t1_meth.c +++ b/lib/libssl/t1_meth.c @@ -60,16 +60,16 @@ #include #include "ssl_locl.h" -static const SSL_METHOD -*tls1_get_method(int ver) +static const SSL_METHOD * +tls1_get_method(int ver) { if (ver == TLS1_2_VERSION) - return TLSv1_2_method(); + return (TLSv1_2_method()); if (ver == TLS1_1_VERSION) - return TLSv1_1_method(); + return (TLSv1_1_method()); if (ver == TLS1_VERSION) - return TLSv1_method(); - return NULL; + return (TLSv1_method()); + return (NULL); } IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_method, diff --git a/lib/libssl/t1_srvr.c b/lib/libssl/t1_srvr.c index 776bcabc465..c0d186e425d 100644 --- a/lib/libssl/t1_srvr.c +++ b/lib/libssl/t1_srvr.c @@ -66,16 +66,16 @@ static const SSL_METHOD *tls1_get_server_method(int ver); -static const SSL_METHOD -*tls1_get_server_method(int ver) +static const SSL_METHOD * +tls1_get_server_method(int ver) { if (ver == TLS1_2_VERSION) - return TLSv1_2_server_method(); + return (TLSv1_2_server_method()); if (ver == TLS1_1_VERSION) - return TLSv1_1_server_method(); + return (TLSv1_1_server_method()); if (ver == TLS1_VERSION) - return TLSv1_server_method(); - return NULL; + return (TLSv1_server_method()); + return (NULL); } IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_server_method, -- 2.20.1