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>
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;
}
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;
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;
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;