diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_ecb_bf.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_ecb_bf.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/lib/libcrypto/evp/e_ecb_bf.c b/src/lib/libcrypto/evp/e_ecb_bf.c index 142a9d3123..334736d253 100644 --- a/src/lib/libcrypto/evp/e_ecb_bf.c +++ b/src/lib/libcrypto/evp/e_ecb_bf.c | |||
@@ -56,23 +56,16 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef NO_BLOWFISH | 59 | #ifndef NO_BF |
60 | |||
61 | #include <stdio.h> | 60 | #include <stdio.h> |
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
63 | #include "evp.h" | 62 | #include <openssl/evp.h> |
64 | #include "objects.h" | 63 | #include <openssl/objects.h> |
65 | 64 | ||
66 | #ifndef NOPROTO | ||
67 | static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 65 | static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, |
68 | unsigned char *iv,int enc); | 66 | unsigned char *iv,int enc); |
69 | static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 67 | static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
70 | unsigned char *in, unsigned int inl); | 68 | unsigned char *in, unsigned int inl); |
71 | #else | ||
72 | static void bf_ecb_init_key(); | ||
73 | static void bf_ecb_cipher(); | ||
74 | #endif | ||
75 | |||
76 | static EVP_CIPHER bfish_ecb_cipher= | 69 | static EVP_CIPHER bfish_ecb_cipher= |
77 | { | 70 | { |
78 | NID_bf_ecb, | 71 | NID_bf_ecb, |
@@ -86,26 +79,20 @@ static EVP_CIPHER bfish_ecb_cipher= | |||
86 | NULL, | 79 | NULL, |
87 | }; | 80 | }; |
88 | 81 | ||
89 | EVP_CIPHER *EVP_bf_ecb() | 82 | EVP_CIPHER *EVP_bf_ecb(void) |
90 | { | 83 | { |
91 | return(&bfish_ecb_cipher); | 84 | return(&bfish_ecb_cipher); |
92 | } | 85 | } |
93 | 86 | ||
94 | static void bf_ecb_init_key(ctx,key,iv,enc) | 87 | static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, |
95 | EVP_CIPHER_CTX *ctx; | 88 | unsigned char *iv, int enc) |
96 | unsigned char *key; | ||
97 | unsigned char *iv; | ||
98 | int enc; | ||
99 | { | 89 | { |
100 | if (key != NULL) | 90 | if (key != NULL) |
101 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | 91 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); |
102 | } | 92 | } |
103 | 93 | ||
104 | static void bf_ecb_cipher(ctx,out,in,inl) | 94 | static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
105 | EVP_CIPHER_CTX *ctx; | 95 | unsigned char *in, unsigned int inl) |
106 | unsigned char *out; | ||
107 | unsigned char *in; | ||
108 | unsigned int inl; | ||
109 | { | 96 | { |
110 | unsigned int i; | 97 | unsigned int i; |
111 | 98 | ||