aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-23 07:53:24 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-24 23:58:22 +0100
commitdbadaebfc4e9d453232795f54d4fe5618cf8e84d (patch)
tree5899d1f99ce0d767d28d753e6e6552896d47d01f /lib/vtls
parentbc7e08471c1884a5100b6e0513a006c263ec3c6b (diff)
checksrc: code style: use 'char *name' style
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/gtls.c2
-rw-r--r--lib/vtls/mbedtls.c2
-rw-r--r--lib/vtls/nss.c12
-rw-r--r--lib/vtls/openssl.c2
-rw-r--r--lib/vtls/polarssl.c2
-rw-r--r--lib/vtls/schannel.c2
-rw-r--r--lib/vtls/vtls.c21
-rw-r--r--lib/vtls/vtls.h10
8 files changed, 27 insertions, 26 deletions
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
index 4c9d9fada..b45be37e1 100644
--- a/lib/vtls/gtls.c
+++ b/lib/vtls/gtls.c
@@ -410,7 +410,7 @@ gtls_connect_step1(struct connectdata *conn,
requested in the priority string, so treat it specially
*/
#define GNUTLS_SRP "+SRP"
- const char* prioritylist;
+ const char *prioritylist;
const char *err = NULL;
#endif
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index c84e597a3..c428a210d 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -455,7 +455,7 @@ mbed_connect_step2(struct connectdata *conn,
const mbedtls_x509_crt *peercert;
#ifdef HAS_ALPN
- const char* next_protocol;
+ const char *next_protocol;
#endif
char errorbuf[128];
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 2d8439934..6bb50f3e0 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -200,14 +200,14 @@ static const cipher_s cipherlist[] = {
#endif
};
-static const char* pem_library = "libnsspem.so";
-static SECMODModule* mod = NULL;
+static const char *pem_library = "libnsspem.so";
+static SECMODModule *mod = NULL;
/* NSPR I/O layer we use to detect blocking direction during SSL handshake */
static PRDescIdentity nspr_io_identity = PR_INVALID_IO_LAYER;
static PRIOMethods nspr_io_methods;
-static const char* nss_error_to_name(PRErrorCode code)
+static const char *nss_error_to_name(PRErrorCode code)
{
const char *name = PR_ErrorToName(code);
if(name)
@@ -337,7 +337,7 @@ static int is_file(const char *filename)
* should be later deallocated using free(). If the OOM failure occurs, we
* return NULL, too.
*/
-static char* dup_nickname(struct Curl_easy *data, const char *str)
+static char *dup_nickname(struct Curl_easy *data, const char *str)
{
const char *n;
@@ -513,7 +513,7 @@ static CURLcode nss_cache_crl(SECItem *crl_der)
return CURLE_OK;
}
-static CURLcode nss_load_crl(const char* crlfilename)
+static CURLcode nss_load_crl(const char *crlfilename)
{
PRFileDesc *infile;
PRFileInfo info;
@@ -663,7 +663,7 @@ static CURLcode cert_stuff(struct connectdata *conn, int sockindex,
return CURLE_OK;
}
-static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg)
+static char *nss_get_password(PK11SlotInfo *slot, PRBool retry, void *arg)
{
(void)slot; /* unused */
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index f6dd529b0..624f868ac 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -2305,7 +2305,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex)
* negotiated
*/
if(conn->bits.tls_enable_alpn) {
- const unsigned char* neg_protocol;
+ const unsigned char *neg_protocol;
unsigned int len;
SSL_get0_alpn_selected(connssl->handle, &neg_protocol, &len);
if(len != 0) {
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
index d6b0f238e..f2f973c50 100644
--- a/lib/vtls/polarssl.c
+++ b/lib/vtls/polarssl.c
@@ -361,7 +361,7 @@ polarssl_connect_step1(struct connectdata *conn,
#ifdef HAS_ALPN
if(conn->bits.tls_enable_alpn) {
- static const char* protocols[3];
+ static const char *protocols[3];
int cur = 0;
#ifdef USE_NGHTTP2
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 25d44382c..147797d4c 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -273,7 +273,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
if(connssl->use_alpn) {
int cur = 0;
int list_start_index = 0;
- unsigned int* extension_len = NULL;
+ unsigned int *extension_len = NULL;
unsigned short* list_len = NULL;
/* The first four bytes will be an unsigned int indicating number
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index 07d64ab9d..02418934d 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -81,13 +81,14 @@
(data->share->specifier & \
(1<<CURL_LOCK_DATA_SSL_SESSION)))
-#define CLONE_STRING(var) if(source->var) { \
- dest->var = strdup(source->var); \
- if(!dest->var) \
- return FALSE; \
- } \
- else \
- dest->var = NULL;
+#define CLONE_STRING(var) \
+ if(source->var) { \
+ dest->var = strdup(source->var); \
+ if(!dest->var) \
+ return FALSE; \
+ } \
+ else \
+ dest->var = NULL;
bool
Curl_ssl_config_matches(struct ssl_primary_config* data,
@@ -653,9 +654,9 @@ CURLcode Curl_ssl_push_certinfo_len(struct Curl_easy *data,
const char *value,
size_t valuelen)
{
- struct curl_certinfo * ci = &data->info.certs;
- char * output;
- struct curl_slist * nl;
+ struct curl_certinfo *ci = &data->info.certs;
+ char *output;
+ struct curl_slist *nl;
CURLcode result = CURLE_OK;
size_t labellen = strlen(label);
size_t outlen = labellen + 1 + valuelen + 1; /* label:value\0 */
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h
index 88fdb9ab2..2aabeda20 100644
--- a/lib/vtls/vtls.h
+++ b/lib/vtls/vtls.h
@@ -98,12 +98,12 @@ int Curl_ssl_check_cxn(struct connectdata *conn);
/* Certificate information list handling. */
void Curl_ssl_free_certinfo(struct Curl_easy *data);
-CURLcode Curl_ssl_init_certinfo(struct Curl_easy * data, int num);
-CURLcode Curl_ssl_push_certinfo_len(struct Curl_easy * data, int certnum,
- const char * label, const char * value,
+CURLcode Curl_ssl_init_certinfo(struct Curl_easy *data, int num);
+CURLcode Curl_ssl_push_certinfo_len(struct Curl_easy *data, int certnum,
+ const char *label, const char *value,
size_t valuelen);
-CURLcode Curl_ssl_push_certinfo(struct Curl_easy * data, int certnum,
- const char * label, const char * value);
+CURLcode Curl_ssl_push_certinfo(struct Curl_easy *data, int certnum,
+ const char *label, const char *value);
/* Functions to be used by SSL library adaptation functions */