diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_null.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_null.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/lib/libcrypto/evp/e_null.c b/src/lib/libcrypto/evp/e_null.c index e4e7ca7606..0a62c10aa9 100644 --- a/src/lib/libcrypto/evp/e_null.c +++ b/src/lib/libcrypto/evp/e_null.c | |||
@@ -58,19 +58,13 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "evp.h" | 61 | #include <openssl/evp.h> |
62 | #include "objects.h" | 62 | #include <openssl/objects.h> |
63 | 63 | ||
64 | #ifndef NOPROTO | ||
65 | static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 64 | static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, |
66 | unsigned char *iv,int enc); | 65 | unsigned char *iv,int enc); |
67 | static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 66 | static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
68 | unsigned char *in, unsigned int inl); | 67 | unsigned char *in, unsigned int inl); |
69 | #else | ||
70 | static void null_init_key(); | ||
71 | static void null_cipher(); | ||
72 | #endif | ||
73 | |||
74 | static EVP_CIPHER n_cipher= | 68 | static EVP_CIPHER n_cipher= |
75 | { | 69 | { |
76 | NID_undef, | 70 | NID_undef, |
@@ -83,25 +77,19 @@ static EVP_CIPHER n_cipher= | |||
83 | NULL, | 77 | NULL, |
84 | }; | 78 | }; |
85 | 79 | ||
86 | EVP_CIPHER *EVP_enc_null() | 80 | EVP_CIPHER *EVP_enc_null(void) |
87 | { | 81 | { |
88 | return(&n_cipher); | 82 | return(&n_cipher); |
89 | } | 83 | } |
90 | 84 | ||
91 | static void null_init_key(ctx,key,iv,enc) | 85 | static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, |
92 | EVP_CIPHER_CTX *ctx; | 86 | unsigned char *iv, int enc) |
93 | unsigned char *key; | ||
94 | unsigned char *iv; | ||
95 | int enc; | ||
96 | { | 87 | { |
97 | memset(&(ctx->c),0,sizeof(ctx->c)); | 88 | memset(&(ctx->c),0,sizeof(ctx->c)); |
98 | } | 89 | } |
99 | 90 | ||
100 | static void null_cipher(ctx,out,in,inl) | 91 | static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
101 | EVP_CIPHER_CTX *ctx; | 92 | unsigned char *in, unsigned int inl) |
102 | unsigned char *out; | ||
103 | unsigned char *in; | ||
104 | unsigned int inl; | ||
105 | { | 93 | { |
106 | if (in != out) | 94 | if (in != out) |
107 | memcpy((char *)out,(char *)in,(int)inl); | 95 | memcpy((char *)out,(char *)in,(int)inl); |