summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-10-24 17:02:42 +0000
committerRichard Levitte <levitte@openssl.org>2002-10-24 17:02:42 +0000
commit732c9fe1796e741366101f386d8c323be54d8844 (patch)
treea1e1561c94ed0b42fed1349ef1259f3d1c01a1f6 /demos
parent4f99ab58f7690128a503aec379153417c6d13d52 (diff)
There's a name clash between OpenSSL and RSAref. Since this engine handles
RSAref data, pretend we don't care for OpenSSL's MD2 and MD5 structures or implementation. Remove all kinds of silly warning
Diffstat (limited to 'demos')
-rw-r--r--demos/engines/rsaref/rsaref.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/demos/engines/rsaref/rsaref.c b/demos/engines/rsaref/rsaref.c
index f092acbf3f..36edf4d4b1 100644
--- a/demos/engines/rsaref/rsaref.c
+++ b/demos/engines/rsaref/rsaref.c
@@ -3,11 +3,14 @@
be found a little here and there. */
#include <stdio.h>
+#include <string.h>
#include "./source/global.h"
#include "./source/rsaref.h"
#include "./source/rsa.h"
#include "./source/des.h"
#include <openssl/err.h>
+#define OPENSSL_NO_MD2
+#define OPENSSL_NO_MD5
#include <openssl/evp.h>
#include <openssl/bn.h>
#include <openssl/engine.h>
@@ -400,7 +403,7 @@ static int rsaref_private_decrypt(int len, const unsigned char *from, unsigned c
if (!RSAref_Private_eay2ref(rsa,&RSAkey))
goto err;
- if ((i=RSAPrivateDecrypt(to,&outlen,(unsigned char *)from,len,&RSAkey)) != 0)
+ if ((i=RSAPrivateDecrypt(to,&(unsigned int)outlen,(unsigned char *)from,len,&RSAkey)) != 0)
{
RSAREFerr(RSAREF_F_RSAREF_PRIVATE_DECRYPT,i);
outlen= -1;
@@ -423,7 +426,7 @@ static int rsaref_private_encrypt(int len, const unsigned char *from, unsigned c
}
if (!RSAref_Private_eay2ref(rsa,&RSAkey))
goto err;
- if ((i=RSAPrivateEncrypt(to,&outlen,(unsigned char *)from,len,&RSAkey)) != 0)
+ if ((i=RSAPrivateEncrypt(to,&(unsigned int)outlen,(unsigned char *)from,len,&RSAkey)) != 0)
{
RSAREFerr(RSAREF_F_RSAREF_PRIVATE_ENCRYPT,i);
outlen= -1;
@@ -441,7 +444,7 @@ static int rsaref_public_decrypt(int len, const unsigned char *from, unsigned ch
if (!RSAref_Public_eay2ref(rsa,&RSAkey))
goto err;
- if ((i=RSAPublicDecrypt(to,&outlen,(unsigned char *)from,len,&RSAkey)) != 0)
+ if ((i=RSAPublicDecrypt(to,&(unsigned int)outlen,(unsigned char *)from,len,&RSAkey)) != 0)
{
RSAREFerr(RSAREF_F_RSAREF_PUBLIC_DECRYPT,i);
outlen= -1;
@@ -478,7 +481,7 @@ static int rsaref_public_encrypt(int len, const unsigned char *from, unsigned ch
if (!RSAref_Public_eay2ref(rsa,&RSAkey))
goto err;
- if ((i=RSAPublicEncrypt(to,&outlen,(unsigned char *)from,len,&RSAkey,&rnd)) != 0)
+ if ((i=RSAPublicEncrypt(to,&(unsigned int)outlen,(unsigned char *)from,len,&RSAkey,&rnd)) != 0)
{
RSAREFerr(RSAREF_F_RSAREF_PUBLIC_ENCRYPT,i);
outlen= -1;