projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf5b8ff
)
Code style: space after 'if'
author
Viktor Dukhovni
<openssl-users@dukhovni.org>
Thu, 16 Apr 2015 05:50:03 +0000
(
01:50
-0400)
committer
Viktor Dukhovni
<openssl-users@dukhovni.org>
Thu, 16 Apr 2015 17:50:01 +0000
(13:50 -0400)
Reviewed-by: Matt Caswell <gitlab@openssl.org>
44 files changed:
apps/apps.c
patch
|
blob
|
history
apps/ca.c
patch
|
blob
|
history
apps/cms.c
patch
|
blob
|
history
apps/s_cb.c
patch
|
blob
|
history
apps/s_client.c
patch
|
blob
|
history
apps/s_server.c
patch
|
blob
|
history
apps/s_time.c
patch
|
blob
|
history
apps/speed.c
patch
|
blob
|
history
apps/srp.c
patch
|
blob
|
history
crypto/asn1/asn_mime.c
patch
|
blob
|
history
crypto/asn1/bio_ndef.c
patch
|
blob
|
history
crypto/asn1/tasn_prn.c
patch
|
blob
|
history
crypto/asn1/x_x509.c
patch
|
blob
|
history
crypto/bio/b_print.c
patch
|
blob
|
history
crypto/bio/bf_nbio.c
patch
|
blob
|
history
crypto/bio/bss_dgram.c
patch
|
blob
|
history
crypto/bn/bn_rand.c
patch
|
blob
|
history
crypto/cms/cms_pwri.c
patch
|
blob
|
history
crypto/des/des.c
patch
|
blob
|
history
crypto/des/enc_writ.c
patch
|
blob
|
history
crypto/dh/dh_ameth.c
patch
|
blob
|
history
crypto/dh/dh_pmeth.c
patch
|
blob
|
history
crypto/dsa/dsa_gen.c
patch
|
blob
|
history
crypto/dsa/dsa_ossl.c
patch
|
blob
|
history
crypto/dso/dso_lib.c
patch
|
blob
|
history
crypto/dso/dso_vms.c
patch
|
blob
|
history
crypto/evp/bio_ok.c
patch
|
blob
|
history
crypto/evp/e_des3.c
patch
|
blob
|
history
crypto/evp/encode.c
patch
|
blob
|
history
crypto/hmac/hmac.c
patch
|
blob
|
history
crypto/hmac/hmactest.c
patch
|
blob
|
history
crypto/objects/o_names.c
patch
|
blob
|
history
crypto/ocsp/ocsp_ext.c
patch
|
blob
|
history
crypto/rand/rand_os2.c
patch
|
blob
|
history
crypto/srp/srp_vfy.c
patch
|
blob
|
history
crypto/threads/th-lock.c
patch
|
blob
|
history
crypto/x509v3/v3_cpols.c
patch
|
blob
|
history
demos/easy_tls/easy-tls.c
patch
|
blob
|
history
ssl/d1_both.c
patch
|
blob
|
history
ssl/s3_clnt.c
patch
|
blob
|
history
ssl/s3_pkt.c
patch
|
blob
|
history
ssl/t1_enc.c
patch
|
blob
|
history
ssl/t1_lib.c
patch
|
blob
|
history
ssl/tls_srp.c
patch
|
blob
|
history
diff --git
a/apps/apps.c
b/apps/apps.c
index b0acbc7c14fa2954caaa9fe033ae02b35fc20656..6d22a080205cbc0db6d1130ee325d3c1e9a2b079 100644
(file)
--- a/
apps/apps.c
+++ b/
apps/apps.c
@@
-574,7
+574,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);
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;
BIO_printf(bio_err, "Out of memory\n");
UI_free(ui);
return 0;
@@
-588,7
+588,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);
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);
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 d64ec4f14ce591515ce1766be2dc2c8608eff341..3b7336c0466e5dd8ace6995f939737b2129cff1d 100644
(file)
--- 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);
#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;
}
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);
#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;
}
BIO_printf(bio_err, "Out of memory\n");
goto err;
}
@@
-2821,7
+2821,7
@@
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
ASN1_GENERALIZEDTIME *comp_time = NULL;
tmp = BUF_strdup(str);
ASN1_GENERALIZEDTIME *comp_time = NULL;
tmp = BUF_strdup(str);
- if(!tmp) {
+ if
(!tmp) {
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
@@
-2843,7
+2843,7
@@
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
if (prevtm) {
*prevtm = ASN1_UTCTIME_new();
if (prevtm) {
*prevtm = ASN1_UTCTIME_new();
- if(!*prevtm) {
+ if
(!*prevtm) {
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
@@
-2887,7
+2887,7
@@
int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold,
goto err;
}
comp_time = ASN1_GENERALIZEDTIME_new();
goto err;
}
comp_time = ASN1_GENERALIZEDTIME_new();
- if(!comp_time) {
+ if
(!comp_time) {
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
BIO_printf(bio_err, "memory allocation failure\n");
goto err;
}
diff --git
a/apps/cms.c
b/apps/cms.c
index 2c922537c5c0b6fd51a8164417d93b7915ba87f6..d287a2ba4bae8969a0108a695a69821134a729b7 100644
(file)
--- a/
apps/cms.c
+++ b/
apps/cms.c
@@
-463,7
+463,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 (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;
}
BIO_printf(bio_err, "Out of memory\n");
goto argerr;
}
diff --git
a/apps/s_cb.c
b/apps/s_cb.c
index 36e22848f46e6d0645d452916af9465a1e0f5472..ee57537083afd3714f14300ec9532691cbb288ca 100644
(file)
--- a/
apps/s_cb.c
+++ b/
apps/s_cb.c
@@
-456,7
+456,7
@@
int ssl_print_curves(BIO *out, SSL *s, int noshared)
if (ncurves <= 0)
return 1;
curves = OPENSSL_malloc(ncurves * sizeof(int));
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;
}
BIO_puts(out, "Malloc error getting supported curves\n");
return 0;
}
diff --git
a/apps/s_client.c
b/apps/s_client.c
index 6c244acfadc09eea18f93a126a4a1dbb613bf144..d53bca14a0b75d29ff45ce1428f2c7d3d06acc1a 100644
(file)
--- a/
apps/s_client.c
+++ b/
apps/s_client.c
@@
-560,7
+560,7
@@
static char *MS_CALLBACK ssl_give_srp_client_pwd_cb(SSL *s, void *arg)
PW_CB_DATA cb_tmp;
int l;
PW_CB_DATA cb_tmp;
int l;
- if(!pass) {
+ if
(!pass) {
BIO_printf(bio_err, "Malloc failure\n");
return NULL;
}
BIO_printf(bio_err, "Malloc failure\n");
return NULL;
}
diff --git
a/apps/s_server.c
b/apps/s_server.c
index 083cc4c5531b58a5d7ee0cbed2f0d3e3e732e4be..2597e8c7085b2aa32c795dda33cea5e62493e87e 100644
(file)
--- a/
apps/s_server.c
+++ b/
apps/s_server.c
@@
-754,7
+754,7
@@
static int ebcdic_write(BIO *b, const char *in, int inl)
num = inl;
wbuf =
(EBCDIC_OUTBUFF *) OPENSSL_malloc(sizeof(EBCDIC_OUTBUFF) + num);
num = inl;
wbuf =
(EBCDIC_OUTBUFF *) OPENSSL_malloc(sizeof(EBCDIC_OUTBUFF) + num);
- if(!wbuf)
+ if
(!wbuf)
return 0;
OPENSSL_free(b->ptr);
return 0;
OPENSSL_free(b->ptr);
@@
-3281,7
+3281,7
@@
static int generate_session_id(const SSL *ssl, unsigned char *id,
{
unsigned int count = 0;
do {
{
unsigned int count = 0;
do {
- if(RAND_pseudo_bytes(id, *id_len) < 0)
+ if
(RAND_pseudo_bytes(id, *id_len) < 0)
return 0;
/*
* Prefix the session_id with the required prefix. NB: If our prefix
return 0;
/*
* Prefix the session_id with the required prefix. NB: If our prefix
@@
-3324,7
+3324,7
@@
static int add_session(SSL *ssl, SSL_SESSION *session)
unsigned char *p;
sess = OPENSSL_malloc(sizeof(simple_ssl_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;
}
BIO_printf(bio_err, "Out of memory adding session to external cache\n");
return 0;
}
@@
-3335,12
+3335,12
@@
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);
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");
BIO_printf(bio_err, "Out of memory adding session to external cache\n");
- if(sess->id)
+ if
(sess->id)
OPENSSL_free(sess->id);
OPENSSL_free(sess->id);
- if(sess->der)
+ if
(sess->der)
OPENSSL_free(sess->der);
OPENSSL_free(sess);
return 0;
OPENSSL_free(sess->der);
OPENSSL_free(sess);
return 0;
diff --git
a/apps/s_time.c
b/apps/s_time.c
index a40997a22e532dd81ab45eee3fe6a4e08a811455..38788f7130c7ccec1234b03739e1c4bf2c120054 100644
(file)
--- a/
apps/s_time.c
+++ b/
apps/s_time.c
@@
-302,7
+302,7
@@
static int parseArgs(int argc, char **argv)
if (--argc < 1)
goto bad;
maxTime = atoi(*(++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;
}
BIO_printf(bio_err, "time must be > 0\n");
badop = 1;
}
diff --git
a/apps/speed.c
b/apps/speed.c
index 7b1acc18994d8da59870762522fba870a62db270..8c350ee83d06c10ee169f8d1b0dc6b3663aded9d 100644
(file)
--- a/
apps/speed.c
+++ b/
apps/speed.c
@@
-2775,7
+2775,7
@@
static void multiblock_speed(const EVP_CIPHER *evp_cipher)
inp = OPENSSL_malloc(mblengths[num - 1]);
out = OPENSSL_malloc(mblengths[num - 1] + 1024);
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;
}
BIO_printf(bio_err,"Out of memory\n");
goto end;
}
@@
-2865,9
+2865,9
@@
static void multiblock_speed(const EVP_CIPHER *evp_cipher)
}
end:
}
end:
- if(inp)
+ if
(inp)
OPENSSL_free(inp);
OPENSSL_free(inp);
- if(out)
+ if
(out)
OPENSSL_free(out);
}
#endif
OPENSSL_free(out);
}
#endif
diff --git
a/apps/srp.c
b/apps/srp.c
index c679448ee7c55b9451a1037cb027acbfaff0fb50..c0ff4171cabf8e8db3de81ce4bb498e46d652a21 100644
(file)
--- a/
apps/srp.c
+++ b/
apps/srp.c
@@
-435,7
+435,7
@@
int MAIN(int argc, char **argv)
# ifdef OPENSSL_SYS_VMS
len = strlen(s) + sizeof(CONFIG_FILE);
tofree = OPENSSL_malloc(len);
# 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;
}
BIO_printf(bio_err, "Out of memory\n");
goto err;
}
@@
-443,7
+443,7
@@
int MAIN(int argc, char **argv)
# else
len = strlen(s) + sizeof(CONFIG_FILE) + 1;
tofree = OPENSSL_malloc(len);
# 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;
}
BIO_printf(bio_err, "Out of memory\n");
goto err;
}
diff --git
a/crypto/asn1/asn_mime.c
b/crypto/asn1/asn_mime.c
index fa4dd820b758db1463f7b772ae0731af7bc9d946..96110c540f3dba9c335953f4128acf829a57a29c 100644
(file)
--- a/
crypto/asn1/asn_mime.c
+++ b/
crypto/asn1/asn_mime.c
@@
-289,7
+289,7
@@
int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
if ((flags & SMIME_DETACHED) && data) {
/* We want multipart/signed */
/* Generate a random boundary */
if ((flags & SMIME_DETACHED) && data) {
/* We want multipart/signed */
/* Generate a random boundary */
- if(RAND_pseudo_bytes((unsigned char *)bound, 32) < 0)
+ if
(RAND_pseudo_bytes((unsigned char *)bound, 32) < 0)
return 0;
for (i = 0; i < 32; i++) {
c = bound[i] & 0xf;
return 0;
for (i = 0; i < 32; i++) {
c = bound[i] & 0xf;
diff --git
a/crypto/asn1/bio_ndef.c
b/crypto/asn1/bio_ndef.c
index 4a73ca9eac514ad2454be3281681f26f46e97a67..31949b87940fa5af84a907ffac1516073645e439 100644
(file)
--- a/
crypto/asn1/bio_ndef.c
+++ b/
crypto/asn1/bio_ndef.c
@@
-162,7
+162,7
@@
static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg)
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen);
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen);
- if(!p)
+ if
(!p)
return 0;
ndef_aux->derbuf = p;
return 0;
ndef_aux->derbuf = p;
@@
-232,7
+232,7
@@
static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg)
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen);
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen);
- if(!p)
+ if
(!p)
return 0;
ndef_aux->derbuf = p;
return 0;
ndef_aux->derbuf = p;
diff --git
a/crypto/asn1/tasn_prn.c
b/crypto/asn1/tasn_prn.c
index 7c54f9d1d4a305057d953654dc7eda16d89a6ae7..5e7d53e9854a6dcc3a741a04c22028269b3cc74e 100644
(file)
--- a/
crypto/asn1/tasn_prn.c
+++ b/
crypto/asn1/tasn_prn.c
@@
-290,7
+290,7
@@
static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
const ASN1_TEMPLATE *seqtt;
seqtt = asn1_do_adb(fld, tt, 1);
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
const ASN1_TEMPLATE *seqtt;
seqtt = asn1_do_adb(fld, tt, 1);
- if(!seqtt)
+ if
(!seqtt)
return 0;
tmpfld = asn1_get_field_ptr(fld, seqtt);
if (!asn1_template_print_ctx(out, tmpfld,
return 0;
tmpfld = asn1_get_field_ptr(fld, seqtt);
if (!asn1_template_print_ctx(out, tmpfld,
diff --git
a/crypto/asn1/x_x509.c
b/crypto/asn1/x_x509.c
index 55319acf9ce18d123dd5eeead7422f0dc06cc6ca..5f266a26b4c28e527456c8a4098f56502baf8889 100644
(file)
--- a/
crypto/asn1/x_x509.c
+++ b/
crypto/asn1/x_x509.c
@@
-177,7
+177,7
@@
X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
/* Save start position */
q = *pp;
/* Save start position */
q = *pp;
- if(!a || *a == NULL) {
+ if
(!a || *a == NULL) {
freeret = 1;
}
ret = d2i_X509(a, pp, length);
freeret = 1;
}
ret = d2i_X509(a, pp, length);
@@
-192,7
+192,7
@@
X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
goto err;
return ret;
err:
goto err;
return ret;
err:
- if(freeret) {
+ if
(freeret) {
X509_free(ret);
if (a)
*a = NULL;
X509_free(ret);
if (a)
*a = NULL;
diff --git
a/crypto/bio/b_print.c
b/crypto/bio/b_print.c
index c2cf6e619ee4c28e6ac93a221cc7160a3d8b4b4f..452e5cfd95909e931490a108cf50df91df5c5d76 100644
(file)
--- a/
crypto/bio/b_print.c
+++ b/
crypto/bio/b_print.c
@@
-710,7
+710,7
@@
doapr_outch(char **sbuffer,
if (*maxlen == 0)
*maxlen = 1024;
*buffer = OPENSSL_malloc(*maxlen);
if (*maxlen == 0)
*maxlen = 1024;
*buffer = OPENSSL_malloc(*maxlen);
- if(!*buffer) {
+ if
(!*buffer) {
/* Panic! Can't really do anything sensible. Just return */
return;
}
/* Panic! Can't really do anything sensible. Just return */
return;
}
@@
-722,7
+722,7
@@
doapr_outch(char **sbuffer,
} else {
*maxlen += 1024;
*buffer = OPENSSL_realloc(*buffer, *maxlen);
} else {
*maxlen += 1024;
*buffer = OPENSSL_realloc(*buffer, *maxlen);
- if(!*buffer) {
+ if
(!*buffer) {
/* Panic! Can't really do anything sensible. Just return */
return;
}
/* Panic! Can't really do anything sensible. Just return */
return;
}
diff --git
a/crypto/bio/bf_nbio.c
b/crypto/bio/bf_nbio.c
index 44d1029f28398ec01d11cc7ee96f9f912f4cfa27..a04f32a008179821ba1b4311332bcebe37f47d2c 100644
(file)
--- a/
crypto/bio/bf_nbio.c
+++ b/
crypto/bio/bf_nbio.c
@@
-139,7
+139,7
@@
static int nbiof_read(BIO *b, char *out, int outl)
BIO_clear_retry_flags(b);
#if 1
BIO_clear_retry_flags(b);
#if 1
- if(RAND_pseudo_bytes(&n, 1) < 0)
+ if
(RAND_pseudo_bytes(&n, 1) < 0)
return -1;
num = (n & 0x07);
return -1;
num = (n & 0x07);
@@
-179,7
+179,7
@@
static int nbiof_write(BIO *b, const char *in, int inl)
num = nt->lwn;
nt->lwn = 0;
} else {
num = nt->lwn;
nt->lwn = 0;
} else {
- if(RAND_pseudo_bytes(&n, 1) < 0)
+ if
(RAND_pseudo_bytes(&n, 1) < 0)
return -1;
num = (n & 7);
}
return -1;
num = (n & 7);
}
diff --git
a/crypto/bio/bss_dgram.c
b/crypto/bio/bss_dgram.c
index de80b99ee42f8d369ef52078d35463f0f76ed873..ac03a6d04d167b795ca9436be574d0b7d392fc4a 100644
(file)
--- a/
crypto/bio/bss_dgram.c
+++ b/
crypto/bio/bss_dgram.c
@@
-1012,7
+1012,7
@@
BIO *BIO_new_dgram_sctp(int fd, int close_flag)
*/
sockopt_len = (socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
authchunks = OPENSSL_malloc(sockopt_len);
*/
sockopt_len = (socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
authchunks = OPENSSL_malloc(sockopt_len);
- if(!authchunks) {
+ if
(!authchunks) {
BIO_vfree(bio);
return (NULL);
}
BIO_vfree(bio);
return (NULL);
}
@@
-1423,7
+1423,7
@@
static int dgram_sctp_write(BIO *b, const char *in, int inl)
if (data->save_shutdown && !BIO_dgram_sctp_wait_for_dry(b)) {
char *tmp;
data->saved_message.bio = b;
if (data->save_shutdown && !BIO_dgram_sctp_wait_for_dry(b)) {
char *tmp;
data->saved_message.bio = b;
- if(!(tmp = OPENSSL_malloc(inl))) {
+ if
(!(tmp = OPENSSL_malloc(inl))) {
BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_FAILURE);
return -1;
}
BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_FAILURE);
return -1;
}
diff --git
a/crypto/bn/bn_rand.c
b/crypto/bn/bn_rand.c
index 48de9cb7cac2b0f06fc60df09a2c4a3ccec91e92..9e78d4d42a14908999dfe5354a71800b7338fdb2 100644
(file)
--- a/
crypto/bn/bn_rand.c
+++ b/
crypto/bn/bn_rand.c
@@
-157,7
+157,7
@@
static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
unsigned char c;
for (i = 0; i < bytes; i++) {
unsigned char c;
for (i = 0; i < bytes; i++) {
- if(RAND_pseudo_bytes(&c, 1) < 0)
+ if
(RAND_pseudo_bytes(&c, 1) < 0)
goto err;
if (c >= 128 && i > 0)
buf[i] = buf[i - 1];
goto err;
if (c >= 128 && i > 0)
buf[i] = buf[i - 1];
diff --git
a/crypto/cms/cms_pwri.c
b/crypto/cms/cms_pwri.c
index b9c560d43819ff43d5e9848147a704f488148dd3..a8322dcdf1a62c3afe3c11d81b115001eda99da7 100644
(file)
--- a/
crypto/cms/cms_pwri.c
+++ b/
crypto/cms/cms_pwri.c
@@
-231,7
+231,7
@@
static int kek_unwrap_key(unsigned char *out, size_t *outlen,
return 0;
}
tmp = OPENSSL_malloc(inlen);
return 0;
}
tmp = OPENSSL_malloc(inlen);
- if(!tmp)
+ if
(!tmp)
return 0;
/* setup IV by decrypting last two blocks */
EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl,
return 0;
/* setup IV by decrypting last two blocks */
EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl,
diff --git
a/crypto/des/des.c
b/crypto/des/des.c
index dcdb8dd65868d1c8eb98847335d2a7a6f85bde7e..586aed72378cc1ecc8d762b9fbe504c028ae8b97 100644
(file)
--- a/
crypto/des/des.c
+++ b/
crypto/des/des.c
@@
-456,7
+456,7
@@
void doencryption(void)
len = l - rem;
if (feof(DES_IN)) {
for (i = 7 - rem; i > 0; i--) {
len = l - rem;
if (feof(DES_IN)) {
for (i = 7 - rem; i > 0; i--) {
- if(RAND_pseudo_bytes(buf + l++, 1) < 0)
+ if
(RAND_pseudo_bytes(buf + l++, 1) < 0)
goto problems;
}
buf[l++] = rem;
goto problems;
}
buf[l++] = rem;
diff --git
a/crypto/des/enc_writ.c
b/crypto/des/enc_writ.c
index 0777b4f13910ea0b7d3be7f4480c6f2aeaf437fc..25041f2aab5e2465908a9c83c3c5c9118fe58ea5 100644
(file)
--- a/
crypto/des/enc_writ.c
+++ b/
crypto/des/enc_writ.c
@@
-132,7
+132,7
@@
int DES_enc_write(int fd, const void *_buf, int len,
if (len < 8) {
cp = shortbuf;
memcpy(shortbuf, buf, len);
if (len < 8) {
cp = shortbuf;
memcpy(shortbuf, buf, len);
- if(RAND_pseudo_bytes(shortbuf + len, 8 - len) < 0) {
+ if
(RAND_pseudo_bytes(shortbuf + len, 8 - len) < 0) {
return -1;
}
rnum = 8;
return -1;
}
rnum = 8;
diff --git
a/crypto/dh/dh_ameth.c
b/crypto/dh/dh_ameth.c
index c6bfc2d3f45bcfbdffe058e5786d6486350bcfc5..ac72468bd14bf0a1b559cf8ac6bd146443a01d84 100644
(file)
--- a/
crypto/dh/dh_ameth.c
+++ b/
crypto/dh/dh_ameth.c
@@
-160,7
+160,7
@@
static int dh_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
dh = pkey->pkey.dh;
str = ASN1_STRING_new();
dh = pkey->pkey.dh;
str = ASN1_STRING_new();
- if(!str) {
+ if
(!str) {
DHerr(DH_F_DH_PUB_ENCODE, ERR_R_MALLOC_FAILURE);
goto err;
}
DHerr(DH_F_DH_PUB_ENCODE, ERR_R_MALLOC_FAILURE);
goto err;
}
diff --git
a/crypto/dh/dh_pmeth.c
b/crypto/dh/dh_pmeth.c
index b3a31472ab2a33049208c001956479a69cd9650a..b58e3fa86fad0c27a3d53734cf33cc7c417b1b02 100644
(file)
--- a/
crypto/dh/dh_pmeth.c
+++ b/
crypto/dh/dh_pmeth.c
@@
-462,7
+462,7
@@
static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key,
ret = 0;
Zlen = DH_size(dh);
Z = OPENSSL_malloc(Zlen);
ret = 0;
Zlen = DH_size(dh);
Z = OPENSSL_malloc(Zlen);
- if(!Z) {
+ if
(!Z) {
goto err;
}
if (DH_compute_key_padded(Z, dhpub, dh) <= 0)
goto err;
}
if (DH_compute_key_padded(Z, dhpub, dh) <= 0)
diff --git
a/crypto/dsa/dsa_gen.c
b/crypto/dsa/dsa_gen.c
index 4a6560dd6860d4b725789dc15ef967d11d7b6473..5a328aaab5b408f6036c738c81738ee2e6c4c55c 100644
(file)
--- a/
crypto/dsa/dsa_gen.c
+++ b/
crypto/dsa/dsa_gen.c
@@
-204,7
+204,7
@@
int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits,
goto err;
if (!seed_len) {
goto err;
if (!seed_len) {
- if(RAND_pseudo_bytes(seed, qsize) < 0)
+ if
(RAND_pseudo_bytes(seed, qsize) < 0)
goto err;
seed_is_random = 1;
} else {
goto err;
seed_is_random = 1;
} else {
diff --git
a/crypto/dsa/dsa_ossl.c
b/crypto/dsa/dsa_ossl.c
index 665f40a77978d5fbd3098af5400f590512d6eb30..f0ec8faa84cc3c6d9a14d1bd14256f4dbcd6af42 100644
(file)
--- a/
crypto/dsa/dsa_ossl.c
+++ b/
crypto/dsa/dsa_ossl.c
@@
-106,23
+106,23
@@
static DSA_METHOD openssl_dsa_meth = {
#define DSA_MOD_EXP(err_instr,dsa,rr,a1,p1,a2,p2,m,ctx,in_mont) \
do { \
int _tmp_res53; \
#define DSA_MOD_EXP(err_instr,dsa,rr,a1,p1,a2,p2,m,ctx,in_mont) \
do { \
int _tmp_res53; \
- if((dsa)->meth->dsa_mod_exp) \
+ if
((dsa)->meth->dsa_mod_exp) \
_tmp_res53 = (dsa)->meth->dsa_mod_exp((dsa), (rr), (a1), (p1), \
(a2), (p2), (m), (ctx), (in_mont)); \
else \
_tmp_res53 = BN_mod_exp2_mont((rr), (a1), (p1), (a2), (p2), \
(m), (ctx), (in_mont)); \
_tmp_res53 = (dsa)->meth->dsa_mod_exp((dsa), (rr), (a1), (p1), \
(a2), (p2), (m), (ctx), (in_mont)); \
else \
_tmp_res53 = BN_mod_exp2_mont((rr), (a1), (p1), (a2), (p2), \
(m), (ctx), (in_mont)); \
- if(!_tmp_res53) err_instr; \
+ if
(!_tmp_res53) err_instr; \
} while(0)
#define DSA_BN_MOD_EXP(err_instr,dsa,r,a,p,m,ctx,m_ctx) \
do { \
int _tmp_res53; \
} while(0)
#define DSA_BN_MOD_EXP(err_instr,dsa,r,a,p,m,ctx,m_ctx) \
do { \
int _tmp_res53; \
- if((dsa)->meth->bn_mod_exp) \
+ if
((dsa)->meth->bn_mod_exp) \
_tmp_res53 = (dsa)->meth->bn_mod_exp((dsa), (r), (a), (p), \
(m), (ctx), (m_ctx)); \
else \
_tmp_res53 = BN_mod_exp_mont((r), (a), (p), (m), (ctx), (m_ctx)); \
_tmp_res53 = (dsa)->meth->bn_mod_exp((dsa), (r), (a), (p), \
(m), (ctx), (m_ctx)); \
else \
_tmp_res53 = BN_mod_exp_mont((r), (a), (p), (m), (ctx), (m_ctx)); \
- if(!_tmp_res53) err_instr; \
+ if
(!_tmp_res53) err_instr; \
} while(0)
const DSA_METHOD *DSA_OpenSSL(void)
} while(0)
const DSA_METHOD *DSA_OpenSSL(void)
diff --git
a/crypto/dso/dso_lib.c
b/crypto/dso/dso_lib.c
index d2a48bb6640c4a270aec66a8187c812583a4a3ae..09b8eafccacc3d5ee07ac17994b17d356434df9c 100644
(file)
--- a/
crypto/dso/dso_lib.c
+++ b/
crypto/dso/dso_lib.c
@@
-285,7
+285,7
@@
DSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname)
* honest. For one thing, I think I have to return a negative value for any
* error because possible DSO_ctrl() commands may return values such as
* "size"s that can legitimately be zero (making the standard
* honest. For one thing, I think I have to return a negative value for any
* error because possible DSO_ctrl() commands may return values such as
* "size"s that can legitimately be zero (making the standard
- * "if(DSO_cmd(...))" form that works almost everywhere else fail at odd
+ * "if
(DSO_cmd(...))" form that works almost everywhere else fail at odd
* times. I'd prefer "output" values to be passed by reference and the return
* value as success/failure like usual ... but we conform when we must... :-)
*/
* times. I'd prefer "output" values to be passed by reference and the return
* value as success/failure like usual ... but we conform when we must... :-)
*/
diff --git
a/crypto/dso/dso_vms.c
b/crypto/dso/dso_vms.c
index 0eff96ec22f9925ba183fbabc1e97a9dc54c2826..d0794b8fb044b8f9e9b108cfc3e624791ea1dff0 100644
(file)
--- a/
crypto/dso/dso_vms.c
+++ b/
crypto/dso/dso_vms.c
@@
-539,7
+539,7
@@
static char *vms_name_converter(DSO *dso, const char *filename)
{
int len = strlen(filename);
char *not_translated = OPENSSL_malloc(len + 1);
{
int len = strlen(filename);
char *not_translated = OPENSSL_malloc(len + 1);
- if(not_translated)
+ if
(not_translated)
strcpy(not_translated, filename);
return (not_translated);
}
strcpy(not_translated, filename);
return (not_translated);
}
diff --git
a/crypto/evp/bio_ok.c
b/crypto/evp/bio_ok.c
index 859712fb74e8a65a4c14030e02f2fa5011b2ee70..5c32e35e17b9cf0bf133b42b86fe4ac3bb306f22 100644
(file)
--- a/
crypto/evp/bio_ok.c
+++ b/
crypto/evp/bio_ok.c
@@
-491,7
+491,7
@@
static int sig_out(BIO *b)
* FIXME: there's absolutely no guarantee this makes any sense at all,
* particularly now EVP_MD_CTX has been restructured.
*/
* FIXME: there's absolutely no guarantee this makes any sense at all,
* particularly now EVP_MD_CTX has been restructured.
*/
- if(RAND_pseudo_bytes(md->md_data, md->digest->md_size) < 0)
+ if
(RAND_pseudo_bytes(md->md_data, md->digest->md_size) < 0)
goto berr;
memcpy(&(ctx->buf[ctx->buf_len]), md->md_data, md->digest->md_size);
longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size);
goto berr;
memcpy(&(ctx->buf[ctx->buf_len]), md->md_data, md->digest->md_size);
longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size);
diff --git
a/crypto/evp/e_des3.c
b/crypto/evp/e_des3.c
index 6aa4d099878c2aac0b059076dbd83d045d8e6e6a..96f272eb8046f661f5d1a14bc8fa3f545bdb19dc 100644
(file)
--- a/
crypto/evp/e_des3.c
+++ b/
crypto/evp/e_des3.c
@@
-447,7
+447,7
@@
static int des_ede3_wrap(EVP_CIPHER_CTX *ctx, unsigned char *out,
memcpy(out + inl + 8, sha1tmp, 8);
OPENSSL_cleanse(sha1tmp, SHA_DIGEST_LENGTH);
/* Generate random IV */
memcpy(out + inl + 8, sha1tmp, 8);
OPENSSL_cleanse(sha1tmp, SHA_DIGEST_LENGTH);
/* Generate random IV */
- if(RAND_bytes(ctx->iv, 8) <= 0)
+ if
(RAND_bytes(ctx->iv, 8) <= 0)
return -1;
memcpy(out, ctx->iv, 8);
/* Encrypt everything after IV in place */
return -1;
memcpy(out, ctx->iv, 8);
/* Encrypt everything after IV in place */
diff --git
a/crypto/evp/encode.c
b/crypto/evp/encode.c
index d1d8a07c14adc849bd3924cdc984709efdefb90b..53cc5863968152e1f10a0d7d0837ac7a84d4c863 100644
(file)
--- a/
crypto/evp/encode.c
+++ b/
crypto/evp/encode.c
@@
-248,7
+248,7
@@
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
/* We parse the input data */
for (i = 0; i < inl; i++) {
/* We parse the input data */
for (i = 0; i < inl; i++) {
- /* If the current line is > 80 characters, scream alot */
+ /* If the current line is > 80 characters, scream a
lot */
if (ln >= 80) {
rv = -1;
goto end;
if (ln >= 80) {
rv = -1;
goto end;
diff --git
a/crypto/hmac/hmac.c
b/crypto/hmac/hmac.c
index 0eea5626e6b24d413f385e2a76b135c188a7257f..5ca389406bac9e272889f2d15574cf02cfe14df3 100644
(file)
--- a/
crypto/hmac/hmac.c
+++ b/
crypto/hmac/hmac.c
@@
-101,13
+101,13
@@
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
if (md != NULL) {
reset = 1;
ctx->md = md;
if (md != NULL) {
reset = 1;
ctx->md = md;
- } else if(ctx->md) {
+ } else if
(ctx->md) {
md = ctx->md;
} else {
return 0;
}
md = ctx->md;
} else {
return 0;
}
- if(!ctx->key_init && key == NULL)
+ if
(!ctx->key_init && key == NULL)
return 0;
if (key != NULL) {
return 0;
if (key != NULL) {
@@
-123,7
+123,7
@@
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
&ctx->key_length))
goto err;
} else {
&ctx->key_length))
goto err;
} else {
- if(len < 0 || len > (int)sizeof(ctx->key))
+ if
(len < 0 || len > (int)sizeof(ctx->key))
return 0;
memcpy(ctx->key, key, len);
ctx->key_length = len;
return 0;
memcpy(ctx->key, key, len);
ctx->key_length = len;
@@
-169,7
+169,7
@@
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
if (FIPS_mode() && !ctx->i_ctx.engine)
return FIPS_hmac_update(ctx, data, len);
#endif
if (FIPS_mode() && !ctx->i_ctx.engine)
return FIPS_hmac_update(ctx, data, len);
#endif
- if(!ctx->key_init)
+ if
(!ctx->key_init)
return 0;
return EVP_DigestUpdate(&ctx->md_ctx, data, len);
return 0;
return EVP_DigestUpdate(&ctx->md_ctx, data, len);
@@
-184,7
+184,7
@@
int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len)
return FIPS_hmac_final(ctx, md, len);
#endif
return FIPS_hmac_final(ctx, md, len);
#endif
- if(!ctx->key_init)
+ if
(!ctx->key_init)
goto err;
if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i))
goto err;
if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i))
@@
-218,7
+218,7
@@
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx)
if (!EVP_MD_CTX_copy(&dctx->md_ctx, &sctx->md_ctx))
goto err;
dctx->key_init = sctx->key_init;
if (!EVP_MD_CTX_copy(&dctx->md_ctx, &sctx->md_ctx))
goto err;
dctx->key_init = sctx->key_init;
- if(sctx->key_init) {
+ if
(sctx->key_init) {
memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK);
dctx->key_length = sctx->key_length;
}
memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK);
dctx->key_length = sctx->key_length;
}
diff --git
a/crypto/hmac/hmactest.c
b/crypto/hmac/hmactest.c
index 5c8ec4c6152ec1a1d284ddbfff5eed82c39b0700..86b6c2529fe29c557ceaa7297eb284afa042fd96 100644
(file)
--- a/
crypto/hmac/hmactest.c
+++ b/
crypto/hmac/hmactest.c
@@
-173,22
+173,22
@@
int main(int argc, char *argv[])
/* test4 */
HMAC_CTX_init(&ctx);
/* test4 */
HMAC_CTX_init(&ctx);
- if(HMAC_Init_ex(&ctx, NULL, 0, NULL, NULL)) {
+ if
(HMAC_Init_ex(&ctx, NULL, 0, NULL, NULL)) {
printf("Should fail to initialise HMAC with empty MD and key (test 4)\n");
err++;
goto test5;
}
printf("Should fail to initialise HMAC with empty MD and key (test 4)\n");
err++;
goto test5;
}
- if(HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
+ if
(HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
printf("Should fail HMAC_Update with ctx not set up (test 4)\n");
err++;
goto test5;
}
printf("Should fail HMAC_Update with ctx not set up (test 4)\n");
err++;
goto test5;
}
- if(HMAC_Init_ex(&ctx, NULL, 0, EVP_sha1(), NULL)) {
+ if
(HMAC_Init_ex(&ctx, NULL, 0, EVP_sha1(), NULL)) {
printf("Should fail to initialise HMAC with empty key (test 4)\n");
err++;
goto test5;
}
printf("Should fail to initialise HMAC with empty key (test 4)\n");
err++;
goto test5;
}
- if(HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
+ if
(HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
printf("Should fail HMAC_Update with ctx not set up (test 4)\n");
err++;
goto test5;
printf("Should fail HMAC_Update with ctx not set up (test 4)\n");
err++;
goto test5;
@@
-196,32
+196,32
@@
int main(int argc, char *argv[])
printf("test 4 ok\n");
test5:
HMAC_CTX_init(&ctx);
printf("test 4 ok\n");
test5:
HMAC_CTX_init(&ctx);
- if(HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, NULL, NULL)) {
+ if
(HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, NULL, NULL)) {
printf("Should fail to initialise HMAC with empty MD (test 5)\n");
err++;
goto test6;
}
printf("Should fail to initialise HMAC with empty MD (test 5)\n");
err++;
goto test6;
}
- if(HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
+ if
(HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
printf("Should fail HMAC_Update with ctx not set up (test 5)\n");
err++;
goto test6;
}
printf("Should fail HMAC_Update with ctx not set up (test 5)\n");
err++;
goto test6;
}
- if(HMAC_Init_ex(&ctx, test[4].key, -1, EVP_sha1(), NULL)) {
+ if
(HMAC_Init_ex(&ctx, test[4].key, -1, EVP_sha1(), NULL)) {
printf("Should fail to initialise HMAC with invalid key len(test 5)\n");
err++;
goto test6;
}
printf("Should fail to initialise HMAC with invalid key len(test 5)\n");
err++;
goto test6;
}
- if(!HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, EVP_sha1(), NULL)) {
+ if
(!HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, EVP_sha1(), NULL)) {
printf("Failed to initialise HMAC (test 5)\n");
err++;
goto test6;
}
printf("Failed to initialise HMAC (test 5)\n");
err++;
goto test6;
}
- if(!HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
+ if
(!HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
printf("Error updating HMAC with data (test 5)\n");
err++;
goto test6;
}
printf("Error updating HMAC with data (test 5)\n");
err++;
goto test6;
}
- if(!HMAC_Final(&ctx, buf, &len)) {
+ if
(!HMAC_Final(&ctx, buf, &len)) {
printf("Error finalising data (test 5)\n");
err++;
goto test6;
printf("Error finalising data (test 5)\n");
err++;
goto test6;
@@
-233,17
+233,17
@@
test5:
err++;
goto test6;
}
err++;
goto test6;
}
- if(!HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) {
+ if
(!HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) {
printf("Failed to reinitialise HMAC (test 5)\n");
err++;
goto test6;
}
printf("Failed to reinitialise HMAC (test 5)\n");
err++;
goto test6;
}
- if(!HMAC_Update(&ctx, test[5].data, test[5].data_len)) {
+ if
(!HMAC_Update(&ctx, test[5].data, test[5].data_len)) {
printf("Error updating HMAC with data (sha256) (test 5)\n");
err++;
goto test6;
}
printf("Error updating HMAC with data (sha256) (test 5)\n");
err++;
goto test6;
}
- if(!HMAC_Final(&ctx, buf, &len)) {
+ if
(!HMAC_Final(&ctx, buf, &len)) {
printf("Error finalising data (sha256) (test 5)\n");
err++;
goto test6;
printf("Error finalising data (sha256) (test 5)\n");
err++;
goto test6;
@@
-255,17
+255,17
@@
test5:
err++;
goto test6;
}
err++;
goto test6;
}
- if(!HMAC_Init_ex(&ctx, test[6].key, test[6].key_len, NULL, NULL)) {
+ if
(!HMAC_Init_ex(&ctx, test[6].key, test[6].key_len, NULL, NULL)) {
printf("Failed to reinitialise HMAC with key (test 5)\n");
err++;
goto test6;
}
printf("Failed to reinitialise HMAC with key (test 5)\n");
err++;
goto test6;
}
- if(!HMAC_Update(&ctx, test[6].data, test[6].data_len)) {
+ if
(!HMAC_Update(&ctx, test[6].data, test[6].data_len)) {
printf("Error updating HMAC with data (new key) (test 5)\n");
err++;
goto test6;
}
printf("Error updating HMAC with data (new key) (test 5)\n");
err++;
goto test6;
}
- if(!HMAC_Final(&ctx, buf, &len)) {
+ if
(!HMAC_Final(&ctx, buf, &len)) {
printf("Error finalising data (new key) (test 5)\n");
err++;
goto test6;
printf("Error finalising data (new key) (test 5)\n");
err++;
goto test6;
@@
-280,22
+280,22
@@
test5:
}
test6:
HMAC_CTX_init(&ctx);
}
test6:
HMAC_CTX_init(&ctx);
- if(!HMAC_Init_ex(&ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) {
+ if
(!HMAC_Init_ex(&ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) {
printf("Failed to initialise HMAC (test 6)\n");
err++;
goto end;
}
printf("Failed to initialise HMAC (test 6)\n");
err++;
goto end;
}
- if(!HMAC_Update(&ctx, test[7].data, test[7].data_len)) {
+ if
(!HMAC_Update(&ctx, test[7].data, test[7].data_len)) {
printf("Error updating HMAC with data (test 6)\n");
err++;
goto end;
}
printf("Error updating HMAC with data (test 6)\n");
err++;
goto end;
}
- if(!HMAC_CTX_copy(&ctx2, &ctx)) {
+ if
(!HMAC_CTX_copy(&ctx2, &ctx)) {
printf("Failed to copy HMAC_CTX (test 6)\n");
err++;
goto end;
}
printf("Failed to copy HMAC_CTX (test 6)\n");
err++;
goto end;
}
- if(!HMAC_Final(&ctx2, buf, &len)) {
+ if
(!HMAC_Final(&ctx2, buf, &len)) {
printf("Error finalising data (test 6)\n");
err++;
goto end;
printf("Error finalising data (test 6)\n");
err++;
goto end;
diff --git
a/crypto/objects/o_names.c
b/crypto/objects/o_names.c
index c6774f4578db41555c9b6b182e4f3c4bf3fe19ea..24859926ace6d9b79f8bf198c18610215e561812 100644
(file)
--- a/
crypto/objects/o_names.c
+++ b/
crypto/objects/o_names.c
@@
-313,7
+313,7
@@
void OBJ_NAME_do_all_sorted(int type,
d.names =
OPENSSL_malloc(lh_OBJ_NAME_num_items(names_lh) * sizeof *d.names);
/* Really should return an error if !d.names...but its a void function! */
d.names =
OPENSSL_malloc(lh_OBJ_NAME_num_items(names_lh) * sizeof *d.names);
/* Really should return an error if !d.names...but its a void function! */
- if(d.names) {
+ if
(d.names) {
d.n = 0;
OBJ_NAME_do_all(type, do_all_sorted_fn, &d);
d.n = 0;
OBJ_NAME_do_all(type, do_all_sorted_fn, &d);
diff --git
a/crypto/ocsp/ocsp_ext.c
b/crypto/ocsp/ocsp_ext.c
index fdfddf9fc135f7473e239c5836cce4767bd8f679..c19648c7329b3bc45246146d83f2462b6a288914 100644
(file)
--- a/
crypto/ocsp/ocsp_ext.c
+++ b/
crypto/ocsp/ocsp_ext.c
@@
-361,7
+361,7
@@
static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts,
ASN1_put_object(&tmpval, 0, len, V_ASN1_OCTET_STRING, V_ASN1_UNIVERSAL);
if (val)
memcpy(tmpval, val, len);
ASN1_put_object(&tmpval, 0, len, V_ASN1_OCTET_STRING, V_ASN1_UNIVERSAL);
if (val)
memcpy(tmpval, val, len);
- else if(RAND_pseudo_bytes(tmpval, len) < 0)
+ else if
(RAND_pseudo_bytes(tmpval, len) < 0)
goto err;
if (!X509V3_add1_i2d(exts, NID_id_pkix_OCSP_Nonce,
&os, 0, X509V3_ADD_REPLACE))
goto err;
if (!X509V3_add1_i2d(exts, NID_id_pkix_OCSP_Nonce,
&os, 0, X509V3_ADD_REPLACE))
diff --git
a/crypto/rand/rand_os2.c
b/crypto/rand/rand_os2.c
index 02148d5bf9412c20534d6d9caff52049086d9eae..706ab1e8172b16b827f839a91781e8b9ac3d8702 100644
(file)
--- a/
crypto/rand/rand_os2.c
+++ b/
crypto/rand/rand_os2.c
@@
-149,7
+149,7
@@
int RAND_poll(void)
if (DosQuerySysState) {
char *buffer = OPENSSL_malloc(256 * 1024);
if (DosQuerySysState) {
char *buffer = OPENSSL_malloc(256 * 1024);
- if(!buffer)
+ if
(!buffer)
return 0;
if (DosQuerySysState(0x1F, 0, 0, 0, buffer, 256 * 1024) == 0) {
return 0;
if (DosQuerySysState(0x1F, 0, 0, 0, buffer, 256 * 1024) == 0) {
diff --git
a/crypto/srp/srp_vfy.c
b/crypto/srp/srp_vfy.c
index 902df1013bf3caeeba141a1e5704f6e742a51bd3..50f75d7e4c9f16ba30385684114dc04859ebb867 100644
(file)
--- a/
crypto/srp/srp_vfy.c
+++ b/
crypto/srp/srp_vfy.c
@@
-497,7
+497,7
@@
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username)
if (!SRP_user_pwd_set_ids(user, username, NULL))
goto err;
if (!SRP_user_pwd_set_ids(user, username, NULL))
goto err;
- if(RAND_pseudo_bytes(digv, SHA_DIGEST_LENGTH) < 0)
+ if
(RAND_pseudo_bytes(digv, SHA_DIGEST_LENGTH) < 0)
goto err;
EVP_MD_CTX_init(&ctxt);
EVP_DigestInit_ex(&ctxt, EVP_sha1(), NULL);
goto err;
EVP_MD_CTX_init(&ctxt);
EVP_DigestInit_ex(&ctxt, EVP_sha1(), NULL);
@@
-550,7
+550,7
@@
char *SRP_create_verifier(const char *user, const char *pass, char **salt,
}
if (*salt == NULL) {
}
if (*salt == NULL) {
- if(RAND_pseudo_bytes(tmp2, SRP_RANDOM_SALT_LEN) < 0)
+ if
(RAND_pseudo_bytes(tmp2, SRP_RANDOM_SALT_LEN) < 0)
goto err;
s = BN_bin2bn(tmp2, SRP_RANDOM_SALT_LEN, NULL);
goto err;
s = BN_bin2bn(tmp2, SRP_RANDOM_SALT_LEN, NULL);
@@
-611,7
+611,7
@@
int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,
srp_bn_print(g);
if (*salt == NULL) {
srp_bn_print(g);
if (*salt == NULL) {
- if(RAND_pseudo_bytes(tmp2, SRP_RANDOM_SALT_LEN) < 0)
+ if
(RAND_pseudo_bytes(tmp2, SRP_RANDOM_SALT_LEN) < 0)
goto err;
*salt = BN_bin2bn(tmp2, SRP_RANDOM_SALT_LEN, NULL);
goto err;
*salt = BN_bin2bn(tmp2, SRP_RANDOM_SALT_LEN, NULL);
diff --git
a/crypto/threads/th-lock.c
b/crypto/threads/th-lock.c
index 28884c2d44fa92ae7868364c7c570e69d512b5c7..cc8cf2581d6440afe6f58d504780b8103c8fccd4 100644
(file)
--- a/
crypto/threads/th-lock.c
+++ b/
crypto/threads/th-lock.c
@@
-117,7
+117,7
@@
void CRYPTO_thread_setup(void)
int i;
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE));
int i;
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE));
- if(!lock_cs) {
+ if
(!lock_cs) {
/* Nothing we can do about this...void function! */
return;
}
/* Nothing we can do about this...void function! */
return;
}
@@
-172,7
+172,7
@@
void CRYPTO_thread_setup(void)
# else
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(rwlock_t));
# endif
# else
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(rwlock_t));
# endif
- if(!lock_cs) {
+ if
(!lock_cs) {
/* Nothing we can do about this...void function! */
return;
}
/* Nothing we can do about this...void function! */
return;
}
@@
-260,7
+260,7
@@
void CRYPTO_thread_setup(void)
char filename[20];
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *));
char filename[20];
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *));
- if(!lock_cs) {
+ if
(!lock_cs) {
/* Nothing we can do about this...void function! */
return;
}
/* Nothing we can do about this...void function! */
return;
}
@@
-328,11
+328,11
@@
void CRYPTO_thread_setup(void)
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
lock_count = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long));
lock_cs = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
lock_count = OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long));
- if(!lock_cs || !lock_count) {
+ if
(!lock_cs || !lock_count) {
/* Nothing we can do about this...void function! */
/* Nothing we can do about this...void function! */
- if(lock_cs)
+ if
(lock_cs)
OPENSSL_free(lock_cs);
OPENSSL_free(lock_cs);
- if(lock_count)
+ if
(lock_count)
OPENSSL_free(lock_count);
return;
}
OPENSSL_free(lock_count);
return;
}
diff --git
a/crypto/x509v3/v3_cpols.c
b/crypto/x509v3/v3_cpols.c
index dca6ab2ec934f6e1f27b9483bf0760c4cb8dfe53..0febc1b3edc1cfec97677f8f1910c287510be322 100644
(file)
--- a/
crypto/x509v3/v3_cpols.c
+++ b/
crypto/x509v3/v3_cpols.c
@@
-230,11
+230,11
@@
static POLICYINFO *policy_section(X509V3_CTX *ctx,
goto merr;
if (!sk_POLICYQUALINFO_push(pol->qualifiers, qual))
goto merr;
goto merr;
if (!sk_POLICYQUALINFO_push(pol->qualifiers, qual))
goto merr;
- if(!(qual->pqualid = OBJ_nid2obj(NID_id_qt_cps))) {
+ if
(!(qual->pqualid = OBJ_nid2obj(NID_id_qt_cps))) {
X509V3err(X509V3_F_POLICY_SECTION, ERR_R_INTERNAL_ERROR);
goto err;
}
X509V3err(X509V3_F_POLICY_SECTION, ERR_R_INTERNAL_ERROR);
goto err;
}
- if(!(qual->d.cpsuri = M_ASN1_IA5STRING_new()))
+ if
(!(qual->d.cpsuri = M_ASN1_IA5STRING_new()))
goto merr;
if (!ASN1_STRING_set(qual->d.cpsuri, cnf->value,
strlen(cnf->value)))
goto merr;
if (!ASN1_STRING_set(qual->d.cpsuri, cnf->value,
strlen(cnf->value)))
@@
-294,7
+294,7
@@
static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
POLICYQUALINFO *qual;
if (!(qual = POLICYQUALINFO_new()))
goto merr;
POLICYQUALINFO *qual;
if (!(qual = POLICYQUALINFO_new()))
goto merr;
- if(!(qual->pqualid = OBJ_nid2obj(NID_id_qt_unotice))) {
+ if
(!(qual->pqualid = OBJ_nid2obj(NID_id_qt_unotice))) {
X509V3err(X509V3_F_NOTICE_SECTION, ERR_R_INTERNAL_ERROR);
goto err;
}
X509V3err(X509V3_F_NOTICE_SECTION, ERR_R_INTERNAL_ERROR);
goto err;
}
@@
-304,7
+304,7
@@
static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
for (i = 0; i < sk_CONF_VALUE_num(unot); i++) {
cnf = sk_CONF_VALUE_value(unot, i);
if (!strcmp(cnf->name, "explicitText")) {
for (i = 0; i < sk_CONF_VALUE_num(unot); i++) {
cnf = sk_CONF_VALUE_value(unot, i);
if (!strcmp(cnf->name, "explicitText")) {
- if(!(not->exptext = M_ASN1_VISIBLESTRING_new()))
+ if
(!(not->exptext = M_ASN1_VISIBLESTRING_new()))
goto merr;
if (!ASN1_STRING_set(not->exptext, cnf->value,
strlen(cnf->value)))
goto merr;
if (!ASN1_STRING_set(not->exptext, cnf->value,
strlen(cnf->value)))
diff --git
a/demos/easy_tls/easy-tls.c
b/demos/easy_tls/easy-tls.c
index df6ae6cf3764b9885b5ec1af5cf090d056c19cec..5682e91a4793022d9b9e77f24890b4479656e312 100644
(file)
--- a/
demos/easy_tls/easy-tls.c
+++ b/
demos/easy_tls/easy-tls.c
@@
-761,7
+761,7
@@
SSL_CTX *tls_create_ctx(struct tls_create_ctx_args a, void *apparg)
if (tls_dhe1024 == NULL) {
int i;
if (tls_dhe1024 == NULL) {
int i;
- if(RAND_bytes((unsigned char *)&i, sizeof i) <= 0)
+ if
(RAND_bytes((unsigned char *)&i, sizeof i) <= 0)
goto err_return;
/*
* make sure that i is non-negative -- pick one of the provided
goto err_return;
/*
* make sure that i is non-negative -- pick one of the provided
diff --git
a/ssl/d1_both.c
b/ssl/d1_both.c
index d4150cb58d152999c457a4285b6d24c503694848..ae8239a2eff09d24be488336bae1cf5eb71a7163 100644
(file)
--- a/
ssl/d1_both.c
+++ b/
ssl/d1_both.c
@@
-1420,7
+1420,7
@@
int dtls1_process_heartbeat(SSL *s)
memcpy(bp, pl, payload);
bp += payload;
/* Random padding */
memcpy(bp, pl, payload);
bp += payload;
/* Random padding */
- if(RAND_pseudo_bytes(bp, padding) < 0) {
+ if
(RAND_pseudo_bytes(bp, padding) < 0) {
OPENSSL_free(buffer);
return -1;
}
OPENSSL_free(buffer);
return -1;
}
@@
-1505,11
+1505,11
@@
int dtls1_heartbeat(SSL *s)
/* Sequence number */
s2n(s->tlsext_hb_seq, p);
/* 16 random bytes */
/* Sequence number */
s2n(s->tlsext_hb_seq, p);
/* 16 random bytes */
- if(RAND_pseudo_bytes(p, 16) < 0)
+ if
(RAND_pseudo_bytes(p, 16) < 0)
goto err;
p += 16;
/* Random padding */
goto err;
p += 16;
/* Random padding */
- if(RAND_pseudo_bytes(p, padding) < 0)
+ if
(RAND_pseudo_bytes(p, padding) < 0)
goto err;
ret = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buf, 3 + payload + padding);
goto err;
ret = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buf, 3 + payload + padding);
diff --git
a/ssl/s3_clnt.c
b/ssl/s3_clnt.c
index c7f3f1d3cc286484e7b3b87f097455544302e50d..40e49cf002e31813d91cb7bc88b26e40668cdc7a 100644
(file)
--- a/
ssl/s3_clnt.c
+++ b/
ssl/s3_clnt.c
@@
-2847,7
+2847,7
@@
int ssl3_send_client_key_exchange(SSL *s)
EVP_PKEY_encrypt_init(pkey_ctx);
/* Generate session key */
EVP_PKEY_encrypt_init(pkey_ctx);
/* Generate session key */
- if(RAND_bytes(premaster_secret, 32) <= 0) {
+ if
(RAND_bytes(premaster_secret, 32) <= 0) {
EVP_PKEY_CTX_free(pkey_ctx);
goto err;
}
EVP_PKEY_CTX_free(pkey_ctx);
goto err;
}
diff --git
a/ssl/s3_pkt.c
b/ssl/s3_pkt.c
index 221ae039e99eaeb5442103268ac9e6137dba40e4..8440f1eb97529cc21a57f016f0c38f6cc195bb95 100644
(file)
--- a/
ssl/s3_pkt.c
+++ b/
ssl/s3_pkt.c
@@
-708,7
+708,7
@@
int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
packlen *= 4;
wb->buf = OPENSSL_malloc(packlen);
packlen *= 4;
wb->buf = OPENSSL_malloc(packlen);
- if(!wb->buf) {
+ if
(!wb->buf) {
SSLerr(SSL_F_SSL3_WRITE_BYTES, ERR_R_MALLOC_FAILURE);
return -1;
}
SSLerr(SSL_F_SSL3_WRITE_BYTES, ERR_R_MALLOC_FAILURE);
return -1;
}
diff --git
a/ssl/t1_enc.c
b/ssl/t1_enc.c
index 6869909cab44d6deca6581558e50a3310fa2b529..0563191af2453bc481d551e965d9ee59d2d6d8c7 100644
(file)
--- a/
ssl/t1_enc.c
+++ b/
ssl/t1_enc.c
@@
-260,7
+260,7
@@
static int tls1_PRF(long digest_mask,
if ((m << TLS1_PRF_DGST_SHIFT) & digest_mask)
count++;
}
if ((m << TLS1_PRF_DGST_SHIFT) & digest_mask)
count++;
}
- if(!count) {
+ if
(!count) {
/* Should never happen */
SSLerr(SSL_F_TLS1_PRF, ERR_R_INTERNAL_ERROR);
goto err;
/* Should never happen */
SSLerr(SSL_F_TLS1_PRF, ERR_R_INTERNAL_ERROR);
goto err;
diff --git
a/ssl/t1_lib.c
b/ssl/t1_lib.c
index 5568df660c74696899fb9f09151d1e4d25ce0d4f..26ebdb3189a975e63f61d133798255f67b771a89 100644
(file)
--- a/
ssl/t1_lib.c
+++ b/
ssl/t1_lib.c
@@
-3849,7
+3849,7
@@
int tls1_process_heartbeat(SSL *s)
memcpy(bp, pl, payload);
bp += payload;
/* Random padding */
memcpy(bp, pl, payload);
bp += payload;
/* Random padding */
- if(RAND_pseudo_bytes(bp, padding) < 0) {
+ if
(RAND_pseudo_bytes(bp, padding) < 0) {
OPENSSL_free(buffer);
return -1;
}
OPENSSL_free(buffer);
return -1;
}
@@
-3935,13
+3935,13
@@
int tls1_heartbeat(SSL *s)
/* Sequence number */
s2n(s->tlsext_hb_seq, p);
/* 16 random bytes */
/* Sequence number */
s2n(s->tlsext_hb_seq, p);
/* 16 random bytes */
- if(RAND_pseudo_bytes(p, 16) < 0) {
+ if
(RAND_pseudo_bytes(p, 16) < 0) {
SSLerr(SSL_F_TLS1_HEARTBEAT, ERR_R_INTERNAL_ERROR);
goto err;
}
p += 16;
/* Random padding */
SSLerr(SSL_F_TLS1_HEARTBEAT, ERR_R_INTERNAL_ERROR);
goto err;
}
p += 16;
/* Random padding */
- if(RAND_pseudo_bytes(p, padding) < 0) {
+ if
(RAND_pseudo_bytes(p, padding) < 0) {
SSLerr(SSL_F_TLS1_HEARTBEAT, ERR_R_INTERNAL_ERROR);
goto err;
}
SSLerr(SSL_F_TLS1_HEARTBEAT, ERR_R_INTERNAL_ERROR);
goto err;
}
diff --git
a/ssl/tls_srp.c
b/ssl/tls_srp.c
index 6bdf7f32f86fd4d26dc0bcc388013fdaf2ab0dd0..bb719ba4cf9fd25422b5b293c4bb6c1a12ad17f4 100644
(file)
--- a/
ssl/tls_srp.c
+++ b/
ssl/tls_srp.c
@@
-454,7
+454,7
@@
int SRP_Calc_A_param(SSL *s)
{
unsigned char rnd[SSL_MAX_MASTER_KEY_LENGTH];
{
unsigned char rnd[SSL_MAX_MASTER_KEY_LENGTH];
- if(RAND_bytes(rnd, sizeof(rnd)) <= 0)
+ if
(RAND_bytes(rnd, sizeof(rnd)) <= 0)
return -1;
s->srp_ctx.a = BN_bin2bn(rnd, sizeof(rnd), s->srp_ctx.a);
OPENSSL_cleanse(rnd, sizeof(rnd));
return -1;
s->srp_ctx.a = BN_bin2bn(rnd, sizeof(rnd), s->srp_ctx.a);
OPENSSL_cleanse(rnd, sizeof(rnd));