From: jsing Date: Thu, 15 May 2014 15:55:55 +0000 (+0000) Subject: More KNF. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=596157169defcf90c1ab37c9ccddb0cb6f150a3d;p=openbsd More KNF. --- diff --git a/lib/libcrypto/evp/e_des.c b/lib/libcrypto/evp/e_des.c index ac46ba6a966..8dbc59c4c1a 100644 --- a/lib/libcrypto/evp/e_des.c +++ b/lib/libcrypto/evp/e_des.c @@ -175,7 +175,7 @@ des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, out += EVP_MAXCHUNK; } if (inl) - DES_cfb_encrypt(in, out, 8,(long)inl, ctx->cipher_data, + DES_cfb_encrypt(in, out, 8, (long)inl, ctx->cipher_data, (DES_cblock *)ctx->iv, ctx->encrypt); return 1; } @@ -186,12 +186,12 @@ BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64, EVP_CIPHER_get_asn1_iv, des_ctrl) -BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8,8, 1, +BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8, 8, 1, EVP_CIPH_RAND_KEY, des_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, des_ctrl) -BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8,8, 8, +BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8, 8, 8, EVP_CIPH_RAND_KEY, des_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, des_ctrl) diff --git a/lib/libcrypto/evp/e_des3.c b/lib/libcrypto/evp/e_des3.c index a6093c2ddb7..92148cb33fd 100644 --- a/lib/libcrypto/evp/e_des3.c +++ b/lib/libcrypto/evp/e_des3.c @@ -251,7 +251,7 @@ des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, if (DES_set_key_checked(&deskey[0], &data(ctx)->ks1) || DES_set_key_checked(&deskey[1], &data(ctx)->ks2) || DES_set_key_checked(&deskey[2], &data(ctx)->ks3)) - return 0; + return 0; #else DES_set_key_unchecked(&deskey[0], &data(ctx)->ks1); DES_set_key_unchecked(&deskey[1], &data(ctx)->ks2); diff --git a/lib/libcrypto/evp/encode.c b/lib/libcrypto/evp/encode.c index 2268b8d2f27..4307802f56a 100644 --- a/lib/libcrypto/evp/encode.c +++ b/lib/libcrypto/evp/encode.c @@ -224,7 +224,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl) { - int seof = -1, eof = 0, rv = -1, ret = 0, i,v, tmp, n, ln, exp_nl; + int seof = -1, eof = 0, rv = -1, ret = 0, i, v, tmp, n, ln, exp_nl; unsigned char *d; n = ctx->num; @@ -360,7 +360,7 @@ end: int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) { - int i, ret = 0, a,b, c, d; + int i, ret = 0, a, b, c, d; unsigned long l; /* trim white space from the start of the line. */ diff --git a/lib/libcrypto/evp/p_sign.c b/lib/libcrypto/evp/p_sign.c index b064ec5fb5f..9daaf1cecfc 100644 --- a/lib/libcrypto/evp/p_sign.c +++ b/lib/libcrypto/evp/p_sign.c @@ -132,6 +132,6 @@ err: EVPerr(EVP_F_EVP_SIGNFINAL, EVP_R_NO_SIGN_FUNCTION_CONFIGURED); return (0); } - return(ctx->digest->sign(ctx->digest->type, m,m_len, sigret, siglen, + return(ctx->digest->sign(ctx->digest->type, m, m_len, sigret, siglen, pkey->pkey.ptr)); } diff --git a/lib/libssl/src/crypto/evp/e_des.c b/lib/libssl/src/crypto/evp/e_des.c index ac46ba6a966..8dbc59c4c1a 100644 --- a/lib/libssl/src/crypto/evp/e_des.c +++ b/lib/libssl/src/crypto/evp/e_des.c @@ -175,7 +175,7 @@ des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, out += EVP_MAXCHUNK; } if (inl) - DES_cfb_encrypt(in, out, 8,(long)inl, ctx->cipher_data, + DES_cfb_encrypt(in, out, 8, (long)inl, ctx->cipher_data, (DES_cblock *)ctx->iv, ctx->encrypt); return 1; } @@ -186,12 +186,12 @@ BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64, EVP_CIPHER_get_asn1_iv, des_ctrl) -BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8,8, 1, +BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8, 8, 1, EVP_CIPH_RAND_KEY, des_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, des_ctrl) -BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8,8, 8, +BLOCK_CIPHER_def_cfb(des, DES_key_schedule, NID_des, 8, 8, 8, EVP_CIPH_RAND_KEY, des_init_key, NULL, EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, des_ctrl) diff --git a/lib/libssl/src/crypto/evp/e_des3.c b/lib/libssl/src/crypto/evp/e_des3.c index a6093c2ddb7..92148cb33fd 100644 --- a/lib/libssl/src/crypto/evp/e_des3.c +++ b/lib/libssl/src/crypto/evp/e_des3.c @@ -251,7 +251,7 @@ des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, if (DES_set_key_checked(&deskey[0], &data(ctx)->ks1) || DES_set_key_checked(&deskey[1], &data(ctx)->ks2) || DES_set_key_checked(&deskey[2], &data(ctx)->ks3)) - return 0; + return 0; #else DES_set_key_unchecked(&deskey[0], &data(ctx)->ks1); DES_set_key_unchecked(&deskey[1], &data(ctx)->ks2); diff --git a/lib/libssl/src/crypto/evp/encode.c b/lib/libssl/src/crypto/evp/encode.c index 2268b8d2f27..4307802f56a 100644 --- a/lib/libssl/src/crypto/evp/encode.c +++ b/lib/libssl/src/crypto/evp/encode.c @@ -224,7 +224,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl) { - int seof = -1, eof = 0, rv = -1, ret = 0, i,v, tmp, n, ln, exp_nl; + int seof = -1, eof = 0, rv = -1, ret = 0, i, v, tmp, n, ln, exp_nl; unsigned char *d; n = ctx->num; @@ -360,7 +360,7 @@ end: int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) { - int i, ret = 0, a,b, c, d; + int i, ret = 0, a, b, c, d; unsigned long l; /* trim white space from the start of the line. */ diff --git a/lib/libssl/src/crypto/evp/p_sign.c b/lib/libssl/src/crypto/evp/p_sign.c index b064ec5fb5f..9daaf1cecfc 100644 --- a/lib/libssl/src/crypto/evp/p_sign.c +++ b/lib/libssl/src/crypto/evp/p_sign.c @@ -132,6 +132,6 @@ err: EVPerr(EVP_F_EVP_SIGNFINAL, EVP_R_NO_SIGN_FUNCTION_CONFIGURED); return (0); } - return(ctx->digest->sign(ctx->digest->type, m,m_len, sigret, siglen, + return(ctx->digest->sign(ctx->digest->type, m, m_len, sigret, siglen, pkey->pkey.ptr)); }