X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fe_null.c;h=0d31a6606147283f02f0c6555dc08f27c42ceb29;hp=c30e2736f257de80dcae9c242390756b7c6ef0e0;hb=7f0606016cbbec917b1fe094b84b062e87abe7da;hpb=b7896b3cb86d80206af14a14d69b0717786f2729 diff --git a/crypto/evp/e_null.c b/crypto/evp/e_null.c index c30e2736f2..0d31a66061 100644 --- a/crypto/evp/e_null.c +++ b/crypto/evp/e_null.c @@ -1,5 +1,5 @@ /* crypto/evp/e_null.c */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -58,46 +58,40 @@ #include #include "cryptlib.h" -#include "evp.h" -#include "objects.h" +#include +#include -#ifndef NOPROTO static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, unsigned char *iv,int enc); static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *in, unsigned int inl); -#else -static void null_init_key(); -static void null_cipher(); -#endif - static EVP_CIPHER n_cipher= { NID_undef, 1,0,0, + 0, null_init_key, null_cipher, + NULL, + 0, + NULL, + NULL, + NULL }; -EVP_CIPHER *EVP_enc_null() +EVP_CIPHER *EVP_enc_null(void) { return(&n_cipher); } -static void null_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { memset(&(ctx->c),0,sizeof(ctx->c)); } -static void null_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { if (in != out) memcpy((char *)out,(char *)in,(int)inl);