summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/p_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/p_open.c')
-rw-r--r--src/lib/libcrypto/evp/p_open.c14
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
66int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek, 66int 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;
103err: 103err:
@@ -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
120static void *dummy=&dummy; 120static void *dummy=&dummy;