summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/apps.c4
-rw-r--r--apps/ca.c10
-rw-r--r--apps/cms.c2
-rw-r--r--apps/s_cb.c2
-rw-r--r--apps/s_client.c2
-rw-r--r--apps/s_server.c12
-rw-r--r--apps/s_time.c2
-rw-r--r--apps/speed.c6
-rw-r--r--apps/srp.c4
-rw-r--r--crypto/asn1/asn_mime.c2
-rw-r--r--crypto/asn1/bio_ndef.c4
-rw-r--r--crypto/asn1/tasn_prn.c2
-rw-r--r--crypto/asn1/x_x509.c4
-rw-r--r--crypto/bio/b_print.c4
-rw-r--r--crypto/bio/bf_nbio.c4
-rw-r--r--crypto/bio/bss_dgram.c4
-rw-r--r--crypto/bn/bn_rand.c2
-rw-r--r--crypto/cms/cms_pwri.c2
-rw-r--r--crypto/des/des.c2
-rw-r--r--crypto/des/enc_writ.c2
-rw-r--r--crypto/dh/dh_ameth.c2
-rw-r--r--crypto/dh/dh_pmeth.c2
-rw-r--r--crypto/dsa/dsa_gen.c2
-rw-r--r--crypto/dsa/dsa_ossl.c8
-rw-r--r--crypto/dso/dso_lib.c2
-rw-r--r--crypto/dso/dso_vms.c2
-rw-r--r--crypto/evp/bio_ok.c2
-rw-r--r--crypto/evp/e_des3.c2
-rw-r--r--crypto/evp/encode.c2
-rw-r--r--crypto/hmac/hmac.c12
-rw-r--r--crypto/hmac/hmactest.c40
-rw-r--r--crypto/objects/o_names.c2
-rw-r--r--crypto/ocsp/ocsp_ext.c2
-rw-r--r--crypto/rand/rand_os2.c2
-rw-r--r--crypto/srp/srp_vfy.c6
-rw-r--r--crypto/threads/th-lock.c12
-rw-r--r--crypto/x509v3/v3_cpols.c8
-rw-r--r--demos/easy_tls/easy-tls.c2
-rw-r--r--ssl/d1_both.c6
-rw-r--r--ssl/s3_clnt.c2
-rw-r--r--ssl/s3_pkt.c2
-rw-r--r--ssl/t1_enc.c2
-rw-r--r--ssl/t1_lib.c6
-rw-r--r--ssl/tls_srp.c2
44 files changed, 103 insertions, 103 deletions
diff --git a/apps/apps.c b/apps/apps.c
index b0acbc7c14..6d22a08020 100644
--- 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);
- if(!prompt) {
+ if (!prompt) {
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);
- 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 d64ec4f14c..3b7336c046 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;
}
@@ -2821,7 +2821,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;
}
@@ -2843,7 +2843,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;
}
@@ -2887,7 +2887,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 2c922537c5..d287a2ba4b 100644
--- 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(!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 36e22848f4..ee57537083 100644
--- 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(!curves) {
+ if (!curves) {
BIO_puts(out, "Malloc error getting supported curves\n");
return 0;
}
diff --git a/apps/s_client.c b/apps/s_client.c
index 6c244acfad..d53bca14a0 100644
--- 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;
- if(!pass) {
+ if (!pass) {
BIO_printf(bio_err, "Malloc failure\n");
return NULL;
}
diff --git a/apps/s_server.c b/apps/s_server.c
index 083cc4c553..2597e8c708 100644
--- 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);
- if(!wbuf)
+ if (!wbuf)
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 {
- 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
@@ -3324,7 +3324,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;
}
@@ -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);
- 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;
diff --git a/apps/s_time.c b/apps/s_time.c
index a40997a22e..38788f7130 100644
--- 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(maxTime <= 0) {
+ if (maxTime <= 0) {
BIO_printf(bio_err, "time must be > 0\n");
badop = 1;
}
diff --git a/apps/speed.c b/apps/speed.c
index 7b1acc1899..8c350ee83d 100644
--- 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);
- if(!inp || !out) {
+ if (!inp || !out) {
BIO_printf(bio_err,"Out of memory\n");
goto end;
}
@@ -2865,9 +2865,9 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
}
end:
- if(inp)
+ if (inp)
OPENSSL_free(inp);
- if(out)
+ if (out)
OPENSSL_free(out);
}
#endif
diff --git a/apps/srp.c b/apps/srp.c
index c679448ee7..c0ff4171ca 100644
--- 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);
- if(!tofree) {
+ if (!tofree) {
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);
- if(!tofree) {
+ if (!tofree) {
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 fa4dd820b7..96110c540f 100644
--- 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(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;
diff --git a/crypto/asn1/bio_ndef.c b/crypto/asn1/bio_ndef.c
index 4a73ca9eac..31949b8794 100644
--- 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);
- if(!p)
+ if (!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);
- if(!p)
+ if (!p)
return 0;
ndef_aux->derbuf = p;
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c
index 7c54f9d1d4..5e7d53e985 100644
--- 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);
- if(!seqtt)
+ if (!seqtt)
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 55319acf9c..5f266a26b4 100644
--- 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;
- if(!a || *a == NULL) {
+ if (!a || *a == NULL) {
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:
- if(freeret) {
+ if (freeret) {
X509_free(ret);
if (a)
*a = NULL;
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c
index c2cf6e619e..452e5cfd95 100644
--- 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(!*buffer) {
+ if (!*buffer) {
/* 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);
- if(!*buffer) {
+ if (!*buffer) {
/* 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 44d1029f28..a04f32a008 100644
--- 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
- if(RAND_pseudo_bytes(&n, 1) < 0)
+ if (RAND_pseudo_bytes(&n, 1) < 0)
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 {
- if(RAND_pseudo_bytes(&n, 1) < 0)
+ if (RAND_pseudo_bytes(&n, 1) < 0)
return -1;
num = (n & 7);
}
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index de80b99ee4..ac03a6d04d 100644
--- 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);
- if(!authchunks) {
+ if (!authchunks) {
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(!(tmp = OPENSSL_malloc(inl))) {
+ if (!(tmp = OPENSSL_malloc(inl))) {
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 48de9cb7ca..9e78d4d42a 100644
--- 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++) {
- 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];
diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c
index b9c560d438..a8322dcdf1 100644
--- 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);
- if(!tmp)
+ if (!tmp)
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 dcdb8dd658..586aed7237 100644
--- 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--) {
- if(RAND_pseudo_bytes(buf + l++, 1) < 0)
+ if (RAND_pseudo_bytes(buf + l++, 1) < 0)
goto problems;
}
buf[l++] = rem;
diff --git a/crypto/des/enc_writ.c b/crypto/des/enc_writ.c
index 0777b4f139..25041f2aab 100644
--- 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(RAND_pseudo_bytes(shortbuf + len, 8 - len) < 0) {
+ if (RAND_pseudo_bytes(shortbuf + len, 8 - len) < 0) {
return -1;
}
rnum = 8;
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c
index c6bfc2d3f4..ac72468bd1 100644
--- 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();
- if(!str) {
+ if (!str) {
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 b3a31472ab..b58e3fa86f 100644
--- 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);
- if(!Z) {
+ if (!Z) {
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 4a6560dd68..5a328aaab5 100644
--- 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) {
- if(RAND_pseudo_bytes(seed, qsize) < 0)
+ if (RAND_pseudo_bytes(seed, qsize) < 0)
goto err;
seed_is_random = 1;
} else {
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c
index 665f40a779..f0ec8faa84 100644
--- 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; \
- 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)); \
- 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; \
- 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)); \
- if(!_tmp_res53) err_instr; \
+ if (!_tmp_res53) err_instr; \
} while(0)
const DSA_METHOD *DSA_OpenSSL(void)
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c
index d2a48bb664..09b8eafcca 100644
--- 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
- * "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... :-)
*/
diff --git a/crypto/dso/dso_vms.c b/crypto/dso/dso_vms.c
index 0eff96ec22..d0794b8fb0 100644
--- 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);
- if(not_translated)
+ if (not_translated)
strcpy(not_translated, filename);
return (not_translated);
}
diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c
index 859712fb74..5c32e35e17 100644
--- 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.
*/
- 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);
diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c
index 6aa4d09987..96f272eb80 100644
--- 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 */
- 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 */
diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c
index d1d8a07c14..53cc586396 100644
--- 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++) {
- /* 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;
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 0eea5626e6..5ca389406b 100644
--- 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;
- } else if(ctx->md) {
+ } else if (ctx->md) {
md = ctx->md;
} else {
return 0;
}
- if(!ctx->key_init && key == NULL)
+ if (!ctx->key_init && 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 {
- 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;
@@ -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(!ctx->key_init)
+ if (!ctx->key_init)
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
- if(!ctx->key_init)
+ if (!ctx->key_init)
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(sctx->key_init) {
+ if (sctx->key_init) {
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 5c8ec4c615..86b6c2529f 100644
--- a/crypto/hmac/hmactest.c
+++ b/crypto/hmac/hmactest.c
@@ -173,22 +173,22 @@ int main(int argc, char *argv[])
/* test4 */
HMAC_CTX_init(