diff options
| author | beck <> | 2000-12-15 02:58:47 +0000 |
|---|---|---|
| committer | beck <> | 2000-12-15 02:58:47 +0000 |
| commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
| tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/evp/e_null.c | |
| parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
| download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip | |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libcrypto/evp/e_null.c')
| -rw-r--r-- | src/lib/libcrypto/evp/e_null.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/libcrypto/evp/e_null.c b/src/lib/libcrypto/evp/e_null.c index 0a62c10aa9..e0702cf818 100644 --- a/src/lib/libcrypto/evp/e_null.c +++ b/src/lib/libcrypto/evp/e_null.c | |||
| @@ -61,20 +61,22 @@ | |||
| 61 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 62 | #include <openssl/objects.h> | 62 | #include <openssl/objects.h> |
| 63 | 63 | ||
| 64 | static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 64 | static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 65 | unsigned char *iv,int enc); | 65 | const unsigned char *iv,int enc); |
| 66 | static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 66 | static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 67 | unsigned char *in, unsigned int inl); | 67 | const unsigned char *in, unsigned int inl); |
| 68 | static EVP_CIPHER n_cipher= | 68 | static EVP_CIPHER n_cipher= |
| 69 | { | 69 | { |
| 70 | NID_undef, | 70 | NID_undef, |
| 71 | 1,0,0, | 71 | 1,0,0, |
| 72 | 0, | ||
| 72 | null_init_key, | 73 | null_init_key, |
| 73 | null_cipher, | 74 | null_cipher, |
| 74 | NULL, | 75 | NULL, |
| 75 | 0, | 76 | 0, |
| 76 | NULL, | 77 | NULL, |
| 77 | NULL, | 78 | NULL, |
| 79 | NULL | ||
| 78 | }; | 80 | }; |
| 79 | 81 | ||
| 80 | EVP_CIPHER *EVP_enc_null(void) | 82 | EVP_CIPHER *EVP_enc_null(void) |
| @@ -82,16 +84,18 @@ EVP_CIPHER *EVP_enc_null(void) | |||
| 82 | return(&n_cipher); | 84 | return(&n_cipher); |
| 83 | } | 85 | } |
| 84 | 86 | ||
| 85 | static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 87 | static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 86 | unsigned char *iv, int enc) | 88 | const unsigned char *iv, int enc) |
| 87 | { | 89 | { |
| 88 | memset(&(ctx->c),0,sizeof(ctx->c)); | 90 | memset(&(ctx->c),0,sizeof(ctx->c)); |
| 91 | return 1; | ||
| 89 | } | 92 | } |
| 90 | 93 | ||
| 91 | static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 94 | static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 92 | unsigned char *in, unsigned int inl) | 95 | const unsigned char *in, unsigned int inl) |
| 93 | { | 96 | { |
| 94 | if (in != out) | 97 | if (in != out) |
| 95 | memcpy((char *)out,(char *)in,(int)inl); | 98 | memcpy((char *)out,(char *)in,(int)inl); |
| 99 | return 1; | ||
| 96 | } | 100 | } |
| 97 | 101 | ||
