#include <openssl/objects.h>
#include <openssl/asn1_mac.h>
-int i2d_RSAPrivateKey(RSA *a, unsigned char **pp)
+int i2d_RSAPrivateKey(const RSA *a, unsigned char **pp)
{
BIGNUM *num[9];
unsigned char data[1];
i2d_ASN1_INTEGER(&bs,&p);
- bs.data=(unsigned char *)Malloc(max+4);
+ bs.data=(unsigned char *)OPENSSL_malloc(max+4);
if (bs.data == NULL)
{
ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE);
bs.length=BN_bn2bin(num[i],bs.data);
i2d_ASN1_INTEGER(&bs,&p);
}
- Free(bs.data);
+ OPENSSL_free(bs.data);
*pp=p;
return(t);
}