Code style: space after 'if'

Reviewed-by: Matt Caswell <gitlab@openssl.org>
This commit is contained in:
Viktor Dukhovni
2015-04-16 01:50:03 -04:00
parent bf5b8ff17d
commit 3b38646d13
44 changed files with 103 additions and 103 deletions

View File

@@ -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;
}