summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/e_null.c')
-rw-r--r--src/lib/libcrypto/evp/e_null.c26
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
65static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 64static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc); 65 unsigned char *iv,int enc);
67static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 66static 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
70static void null_init_key();
71static void null_cipher();
72#endif
73
74static EVP_CIPHER n_cipher= 68static 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
86EVP_CIPHER *EVP_enc_null() 80EVP_CIPHER *EVP_enc_null(void)
87 { 81 {
88 return(&n_cipher); 82 return(&n_cipher);
89 } 83 }
90 84
91static void null_init_key(ctx,key,iv,enc) 85static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
92EVP_CIPHER_CTX *ctx; 86 unsigned char *iv, int enc)
93unsigned char *key;
94unsigned char *iv;
95int enc;
96 { 87 {
97 memset(&(ctx->c),0,sizeof(ctx->c)); 88 memset(&(ctx->c),0,sizeof(ctx->c));
98 } 89 }
99 90
100static void null_cipher(ctx,out,in,inl) 91static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
101EVP_CIPHER_CTX *ctx; 92 unsigned char *in, unsigned int inl)
102unsigned char *out;
103unsigned char *in;
104unsigned 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);