diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_ofb_bf.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_ofb_bf.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/lib/libcrypto/evp/e_ofb_bf.c b/src/lib/libcrypto/evp/e_ofb_bf.c index 492f9b9082..c82154b549 100644 --- a/src/lib/libcrypto/evp/e_ofb_bf.c +++ b/src/lib/libcrypto/evp/e_ofb_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_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 65 | static void bf_ofb_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_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 67 | static void bf_ofb_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_ofb_init_key(); | ||
73 | static void bf_ofb_cipher(); | ||
74 | #endif | ||
75 | |||
76 | static EVP_CIPHER bfish_ofb_cipher= | 69 | static EVP_CIPHER bfish_ofb_cipher= |
77 | { | 70 | { |
78 | NID_bf_ofb64, | 71 | NID_bf_ofb64, |
@@ -86,16 +79,13 @@ static EVP_CIPHER bfish_ofb_cipher= | |||
86 | EVP_CIPHER_get_asn1_iv, | 79 | EVP_CIPHER_get_asn1_iv, |
87 | }; | 80 | }; |
88 | 81 | ||
89 | EVP_CIPHER *EVP_bf_ofb() | 82 | EVP_CIPHER *EVP_bf_ofb(void) |
90 | { | 83 | { |
91 | return(&bfish_ofb_cipher); | 84 | return(&bfish_ofb_cipher); |
92 | } | 85 | } |
93 | 86 | ||
94 | static void bf_ofb_init_key(ctx,key,iv,enc) | 87 | static void bf_ofb_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 | ctx->num=0; | 90 | ctx->num=0; |
101 | 91 | ||
@@ -106,11 +96,8 @@ int enc; | |||
106 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | 96 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); |
107 | } | 97 | } |
108 | 98 | ||
109 | static void bf_ofb_cipher(ctx,out,in,inl) | 99 | static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
110 | EVP_CIPHER_CTX *ctx; | 100 | unsigned char *in, unsigned int inl) |
111 | unsigned char *out; | ||
112 | unsigned char *in; | ||
113 | unsigned int inl; | ||
114 | { | 101 | { |
115 | BF_ofb64_encrypt( | 102 | BF_ofb64_encrypt( |
116 | in,out, | 103 | in,out, |