diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/evp/evp_locl.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/lib/libcrypto/evp/evp_locl.h b/src/lib/libcrypto/evp/evp_locl.h index 073b0adcff..eabcc96f30 100644 --- a/src/lib/libcrypto/evp/evp_locl.h +++ b/src/lib/libcrypto/evp/evp_locl.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* evp_locl.h */ | 1 | /* evp_locl.h */ |
2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
@@ -92,7 +92,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns | |||
92 | #define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \ | 92 | #define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \ |
93 | static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ | 93 | static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ |
94 | {\ | 94 | {\ |
95 | cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\ | 95 | cprefix##_cfb##cbits##_encrypt(in, out, (long)((cbits==1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\ |
96 | return 1;\ | 96 | return 1;\ |
97 | } | 97 | } |
98 | 98 | ||
@@ -226,11 +226,27 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; } | |||
226 | 226 | ||
227 | #define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data) | 227 | #define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data) |
228 | 228 | ||
229 | #define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len) \ | 229 | #define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len,fl) \ |
230 | BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \ | 230 | BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \ |
231 | BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \ | 231 | BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \ |
232 | NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \ | 232 | NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \ |
233 | 0, cipher##_init_key, NULL, \ | 233 | (fl)|EVP_CIPH_FLAG_DEFAULT_ASN1, \ |
234 | EVP_CIPHER_set_asn1_iv, \ | 234 | cipher##_init_key, NULL, NULL, NULL, NULL) |
235 | EVP_CIPHER_get_asn1_iv, \ | 235 | |
236 | NULL) | 236 | #ifdef OPENSSL_FIPS |
237 | #define RC2_set_key private_RC2_set_key | ||
238 | #define RC4_set_key private_RC4_set_key | ||
239 | #define CAST_set_key private_CAST_set_key | ||
240 | #define RC5_32_set_key private_RC5_32_set_key | ||
241 | #define BF_set_key private_BF_set_key | ||
242 | #define Camellia_set_key private_Camellia_set_key | ||
243 | #define idea_set_encrypt_key private_idea_set_encrypt_key | ||
244 | |||
245 | #define MD5_Init private_MD5_Init | ||
246 | #define MD4_Init private_MD4_Init | ||
247 | #define MD2_Init private_MD2_Init | ||
248 | #define MDC2_Init private_MDC2_Init | ||
249 | #define SHA_Init private_SHA_Init | ||
250 | |||
251 | #endif | ||
252 | |||