diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/evp/p_open.c | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/evp/p_open.c')
-rw-r--r-- | src/lib/libcrypto/evp/p_open.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c index 2760c00fec..6976f2a867 100644 --- a/src/lib/libcrypto/evp/p_open.c +++ b/src/lib/libcrypto/evp/p_open.c | |||
@@ -56,14 +56,14 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef NO_RSA | 59 | #ifndef OPENSSL_NO_RSA |
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
65 | 65 | ||
66 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek, | 66 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char *ek, |
67 | int ekl, unsigned char *iv, EVP_PKEY *priv) | 67 | int ekl, unsigned char *iv, EVP_PKEY *priv) |
68 | { | 68 | { |
69 | unsigned char *key=NULL; | 69 | unsigned char *key=NULL; |
@@ -71,7 +71,7 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek, | |||
71 | 71 | ||
72 | if(type) { | 72 | if(type) { |
73 | EVP_CIPHER_CTX_init(ctx); | 73 | EVP_CIPHER_CTX_init(ctx); |
74 | if(!EVP_DecryptInit(ctx,type,NULL,NULL)) return 0; | 74 | if(!EVP_DecryptInit_ex(ctx,type,NULL, NULL,NULL)) return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | if(!priv) return 1; | 77 | if(!priv) return 1; |
@@ -97,7 +97,7 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek, | |||
97 | /* ERROR */ | 97 | /* ERROR */ |
98 | goto err; | 98 | goto err; |
99 | } | 99 | } |
100 | if(!EVP_DecryptInit(ctx,NULL,key,iv)) goto err; | 100 | if(!EVP_DecryptInit_ex(ctx,NULL,NULL,key,iv)) goto err; |
101 | 101 | ||
102 | ret=1; | 102 | ret=1; |
103 | err: | 103 | err: |
@@ -110,11 +110,11 @@ int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
110 | { | 110 | { |
111 | int i; | 111 | int i; |
112 | 112 | ||
113 | i=EVP_DecryptFinal(ctx,out,outl); | 113 | i=EVP_DecryptFinal_ex(ctx,out,outl); |
114 | EVP_DecryptInit(ctx,NULL,NULL,NULL); | 114 | EVP_DecryptInit_ex(ctx,NULL,NULL,NULL,NULL); |
115 | return(i); | 115 | return(i); |
116 | } | 116 | } |
117 | #else /* !NO_RSA */ | 117 | #else /* !OPENSSL_NO_RSA */ |
118 | 118 | ||
119 | # ifdef PEDANTIC | 119 | # ifdef PEDANTIC |
120 | static void *dummy=&dummy; | 120 | static void *dummy=&dummy; |