summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2015-04-16 01:50:03 -0400
committerViktor Dukhovni <openssl-users@dukhovni.org>2015-04-16 13:44:59 -0400
commit61986d32f37cbaeaed08bd955ff27d35b72ea29a (patch)
treea93f68aa58dd5dea6550887b9f44796d92a5b183 /apps
parentb65558328a9fcda5cef38857f9cc033c15ec1c32 (diff)
Code style: space after 'if'
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c4
-rw-r--r--apps/ca.c10
-rw-r--r--apps/cms.c2
-rw-r--r--apps/s_cb.c4
-rw-r--r--apps/s_client.c10
-rw-r--r--apps/s_server.c20
-rw-r--r--apps/s_time.c10
-rw-r--r--apps/sess_id.c2
-rw-r--r--apps/speed.c6
-rw-r--r--apps/srp.c4
10 files changed, 36 insertions, 36 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 65d4e46d57..76e0ee3c13 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -576,7 +576,7 @@ int password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA *cb_tmp)
char *prompt = NULL;
prompt = UI_construct_prompt(ui, "pass phrase", prompt_info);
- if(!prompt) {
+ if (!prompt) {
BIO_printf(bio_err, "Out of memory\n");
UI_free(ui);
return 0;
@@ -590,7 +590,7 @@ int password_callback(char *buf, int bufsiz, int verify, PW_CB_DATA *cb_tmp)
PW_MIN_LENGTH, bufsiz - 1);
if (ok >= 0 && verify) {
buff = (char *)OPENSSL_malloc(bufsiz);
- if(!buff) {
+ if (!buff) {
BIO_printf(bio_err, "Out of memory\n");
UI_free(ui);
OPENSSL_free(prompt);
diff --git a/apps/ca.c b/apps/ca.c
index 89bece8ed1..e2eab91033 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -563,7 +563,7 @@ int MAIN(int argc, char **argv)
#ifdef OPENSSL_SYS_VMS
len = strlen(s) + sizeof(CONFIG_FILE);
tofree = OPENSSL_malloc(len);
- if(!tofree) {
+ if (!tofree) {
BIO_printf(bio_err, "Out of memory\n");
goto err;
}
@@ -571,7 +571,7 @@ int MAIN(int argc, char **argv)
#else
len = strlen(s) + sizeof(CONFIG_FILE) + 1;
tofree = OPENSSL_malloc(len);
- if(!tofree) {
+ if (!tofree) {
BIO_printf(bio_err, "Out of memory\n");
goto err;
}
@@ -2808,7 +2808,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
ASN1_GENERALIZEDTIME *comp_time = NULL;
tmp = BUF_strdup(str);
- if(!tmp) {
+ if (!tmp) {
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
@@ -2830,7 +2830,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
if (prevtm) {
*prevtm = ASN1_UTCTIME_new();
- if(!*prevtm) {
+ if (!*prevtm) {
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
@@ -2874,7 +2874,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
goto err;
}
comp_time = ASN1_GENERALIZEDTIME_new();
- if(!comp_time) {
+ if (!comp_time) {
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
diff --git a/apps/cms.c b/apps/cms.c
index 0877426924..73f9037c04 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -465,7 +465,7 @@ int MAIN(int argc, char **argv)
if (key_param == NULL || key_param->idx != keyidx) {
cms_key_param *nparam;
nparam = OPENSSL_malloc(sizeof(cms_key_param));
- if(!nparam) {
+ if (!nparam) {
BIO_printf(bio_err, "Out of memory\n");
goto argerr;
}
diff --git a/apps/s_cb.c b/apps/s_cb.c
index 7e69fc8f51..06050dbc7c 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -460,7 +460,7 @@ int ssl_print_curves(BIO *out, SSL *s, int noshared)
if (ncurves <= 0)
return 1;
curves = OPENSSL_malloc(ncurves * sizeof(int));
- if(!curves) {
+ if (!curves) {
BIO_puts(out, "Malloc error getting supported curves\n");
return 0;
}
@@ -1181,7 +1181,7 @@ static int set_cert_cb(SSL *ssl, void *arg)
print_chain_flags(bio_err, ssl, rv);
if (rv & CERT_PKEY_VALID) {
- if(!SSL_use_certificate(ssl, exc->cert)
+ if (!SSL_use_certificate(ssl, exc->cert)
|| !SSL_use_PrivateKey(ssl, exc->key)) {
return 0;
}
diff --git a/apps/s_client.c b/apps/s_client.c
index a7e03a5f33..761f352fe3 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -550,7 +550,7 @@ static char *ssl_give_srp_client_pwd_cb(SSL *s, void *arg)
PW_CB_DATA cb_tmp;
int l;
- if(!pass) {
+ if (!pass) {
BIO_printf(bio_err, "Malloc failure\n");
return NULL;
}
@@ -1304,7 +1304,7 @@ int MAIN(int argc, char **argv)
#ifndef OPENSSL_NO_SRTP
if (srtp_profiles != NULL) {
/* Returns 0 on success!! */
- if(SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles)) {
+ if (SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles)) {
BIO_printf(bio_err, "Error setting SRTP profile\n");
ERR_print_errors(bio_err);
goto end;
@@ -1328,7 +1328,7 @@ int MAIN(int argc, char **argv)
goto end;
}
/* Returns 0 on success!! */
- if(SSL_CTX_set_alpn_protos(ctx, alpn, alpn_len)) {
+ if (SSL_CTX_set_alpn_protos(ctx, alpn, alpn_len)) {
BIO_printf(bio_err, "Error setting ALPN\n");
goto end;
}
@@ -1337,7 +1337,7 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_TLSEXT
for (i = 0; i < serverinfo_types_count; i++) {
- if(!SSL_CTX_add_client_custom_ext(ctx,
+ if (!SSL_CTX_add_client_custom_ext(ctx,
serverinfo_types[i],
NULL, NULL, NULL,
serverinfo_cli_parse_cb, NULL)) {
@@ -1405,7 +1405,7 @@ int MAIN(int argc, char **argv)
ERR_print_errors(bio_err);
goto end;
}
- if(!SSL_set_session(con, sess)) {
+ if (!SSL_set_session(con, sess)) {
BIO_printf(bio_err, "Can't set session\n");
ERR_print_errors(bio_err);
goto end;
diff --git a/apps/s_server.c b/apps/s_server.c
index a66098efe7..8e350c89d8 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -707,7 +707,7 @@ static int ebcdic_write(BIO *b, const char *in, int inl)
num = inl;
wbuf =
(EBCDIC_OUTBUFF *) OPENSSL_malloc(sizeof(EBCDIC_OUTBUFF) + num);
- if(!wbuf)
+ if (!wbuf)
return 0;
OPENSSL_free(b->ptr);
@@ -1725,7 +1725,7 @@ int MAIN(int argc, char *argv[])
#ifndef OPENSSL_NO_SRTP
if (srtp_profiles != NULL) {
/* Returns 0 on success!! */
- if(SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles)) {
+ if (SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles)) {
BIO_printf(bio_err, "Error setting SRTP profile\n");
ERR_print_errors(bio_err);
goto end;
@@ -1925,7 +1925,7 @@ int MAIN(int argc, char *argv[])
#endif
SSL_CTX_set_verify(ctx, s_server_verify, verify_callback);
- if(!SSL_CTX_set_session_id_context(ctx,
+ if (!SSL_CTX_set_session_id_context(ctx,
(void *)&s_server_session_id_context,
sizeof s_server_session_id_context)) {
BIO_printf(bio_err, "error setting session id context\n");
@@ -1940,7 +1940,7 @@ int MAIN(int argc, char *argv[])
#ifndef OPENSSL_NO_TLSEXT
if (ctx2) {
SSL_CTX_set_verify(ctx2, s_server_verify, verify_callback);
- if(!SSL_CTX_set_session_id_context(ctx2,
+ if (!SSL_CTX_set_session_id_context(ctx2,
(void *)&s_server_session_id_context,
sizeof s_server_session_id_context)) {
BIO_printf(bio_err, "error setting session id context\n");
@@ -2147,7 +2147,7 @@ static int sv_body(char *hostname, int s, int stype, unsigned char *context)
goto err;
}
}
- if(!SSL_clear(con)) {
+ if (!SSL_clear(con)) {
BIO_printf(bio_err, "Error clearing SSL connection\n");
ret = -1;
goto err;
@@ -3227,7 +3227,7 @@ static int add_session(SSL *ssl, SSL_SESSION *session)
unsigned char *p;
sess = OPENSSL_malloc(sizeof(simple_ssl_session));
- if(!sess) {
+ if (!sess) {
BIO_printf(bio_err, "Out of memory adding session to external cache\n");
return 0;
}
@@ -3238,18 +3238,18 @@ static int add_session(SSL *ssl, SSL_SESSION *session)
sess->id = BUF_memdup(SSL_SESSION_get_id(session, NULL), sess->idlen);
sess->der = OPENSSL_malloc(sess->derlen);
- if(!sess->id || !sess->der) {
+ if (!sess->id || !sess->der) {
BIO_printf(bio_err, "Out of memory adding session to external cache\n");
- if(sess->id)
+ if (sess->id)
OPENSSL_free(sess->id);
- if(sess->der)
+ if (sess->der)
OPENSSL_free(sess->der);
OPENSSL_free(sess);
return 0;
}
p = sess->der;
- if(i2d_SSL_SESSION(session, &p) < 0) {
+ if (i2d_SSL_SESSION(session, &p) < 0) {
BIO_printf(bio_err, "Error encoding session\n");
return 0;
}
diff --git a/apps/s_time.c b/apps/s_time.c
index 4f460b6a45..8f4980b677 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -283,7 +283,7 @@ static int parseArgs(int argc, char **argv)
if (--argc < 1)
goto bad;
maxTime = atoi(*(++argv));
- if(maxTime <= 0) {
+ if (maxTime <= 0) {
BIO_printf(bio_err, "time must be > 0\n");
badop = 1;
}
@@ -356,7 +356,7 @@ int MAIN(int argc, char **argv)
if (st_bugs)
SSL_CTX_set_options(tm_ctx, SSL_OP_ALL);
- if(!SSL_CTX_set_cipher_list(tm_ctx, tm_cipher))
+ if (!SSL_CTX_set_cipher_list(tm_ctx, tm_cipher))
goto end;
if (!set_cert_stuff(tm_ctx, t_cert_file, t_key_file))
goto end;
@@ -406,7 +406,7 @@ int MAIN(int argc, char **argv)
if (s_www_path != NULL) {
BIO_snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n",
s_www_path);
- if(SSL_write(scon, buf, strlen(buf)) <= 0)
+ if (SSL_write(scon, buf, strlen(buf)) <= 0)
goto end;
while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
bytes_read += i;
@@ -463,7 +463,7 @@ int MAIN(int argc, char **argv)
if (s_www_path != NULL) {
BIO_snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
- if(SSL_write(scon, buf, strlen(buf)) <= 0)
+ if (SSL_write(scon, buf, strlen(buf)) <= 0)
goto end;
while (SSL_read(scon, buf, sizeof(buf)) > 0) ;
}
@@ -501,7 +501,7 @@ int MAIN(int argc, char **argv)
if (s_www_path) {
BIO_snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n",
s_www_path);
- if(SSL_write(scon, buf, strlen(buf)) <= 0)
+ if (SSL_write(scon, buf, strlen(buf)) <= 0)
goto end;
while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
bytes_read += i;
diff --git a/apps/sess_id.c b/apps/sess_id.c
index 53ccbb3576..9421e40842 100644
--- a/apps/sess_id.c
+++ b/apps/sess_id.c
@@ -166,7 +166,7 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err, "Context too long\n");
goto end;
}
- if(!SSL_SESSION_set1_id_context(x, (unsigned char *)context, ctx_len)) {
+ if (!SSL_SESSION_set1_id_context(x, (unsigned char *)context, ctx_len)) {
BIO_printf(bio_err, "Error setting id context\n");
goto end;
}
diff --git a/apps/speed.c b/apps/speed.c
index df972a3b90..71aa74a446 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -2723,7 +2723,7 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
inp = OPENSSL_malloc(mblengths[num - 1]);
out = OPENSSL_malloc(mblengths[num - 1] + 1024);
- if(!inp || !out) {
+ if (!inp || !out) {
BIO_printf(bio_err,"Out of memory\n");
goto end;
}
@@ -2813,8 +2813,8 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
}
end:
- if(inp)
+ if (inp)
OPENSSL_free(inp);
- if(out)
+ if (out)
OPENSSL_free(out);
}
diff --git a/apps/srp.c b/apps/srp.c
index b9312f8dfc..5acc7835d1 100644
--- a/apps/srp.c
+++ b/apps/srp.c
@@ -437,7 +437,7 @@ int MAIN(int argc, char **argv)
# ifdef OPENSSL_SYS_VMS
len = strlen(s) + sizeof(CONFIG_FILE);
tofree = OPENSSL_malloc(len);
- if(!tofree) {
+ if (!tofree) {
BIO_printf(bio_err, "Out of memory\n");
goto err;
}
@@ -445,7 +445,7 @@ int MAIN(int argc, char **argv)
# else
len = strlen(s) + sizeof(CONFIG_FILE) + 1;
tofree = OPENSSL_malloc(len);
- if(!tofree) {
+ if (!tofree) {
BIO_printf(bio_err, "Out of memory\n");
goto err;
}