summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/crypto/asn1/a_sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/crypto/asn1/a_sign.c')
-rw-r--r--src/lib/libssl/src/crypto/asn1/a_sign.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libssl/src/crypto/asn1/a_sign.c b/src/lib/libssl/src/crypto/asn1/a_sign.c
index cfb4bca4f1..4c651706d2 100644
--- a/src/lib/libssl/src/crypto/asn1/a_sign.c
+++ b/src/lib/libssl/src/crypto/asn1/a_sign.c
@@ -108,9 +108,9 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
108 } 108 }
109 } 109 }
110 inl=i2d(data,NULL); 110 inl=i2d(data,NULL);
111 buf_in=(unsigned char *)Malloc((unsigned int)inl); 111 buf_in=(unsigned char *)OPENSSL_malloc((unsigned int)inl);
112 outll=outl=EVP_PKEY_size(pkey); 112 outll=outl=EVP_PKEY_size(pkey);
113 buf_out=(unsigned char *)Malloc((unsigned int)outl); 113 buf_out=(unsigned char *)OPENSSL_malloc((unsigned int)outl);
114 if ((buf_in == NULL) || (buf_out == NULL)) 114 if ((buf_in == NULL) || (buf_out == NULL))
115 { 115 {
116 outl=0; 116 outl=0;
@@ -129,7 +129,7 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
129 ASN1err(ASN1_F_ASN1_SIGN,ERR_R_EVP_LIB); 129 ASN1err(ASN1_F_ASN1_SIGN,ERR_R_EVP_LIB);
130 goto err; 130 goto err;
131 } 131 }
132 if (signature->data != NULL) Free(signature->data); 132 if (signature->data != NULL) OPENSSL_free(signature->data);
133 signature->data=buf_out; 133 signature->data=buf_out;
134 buf_out=NULL; 134 buf_out=NULL;
135 signature->length=outl; 135 signature->length=outl;
@@ -141,8 +141,8 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
141err: 141err:
142 memset(&ctx,0,sizeof(ctx)); 142 memset(&ctx,0,sizeof(ctx));
143 if (buf_in != NULL) 143 if (buf_in != NULL)
144 { memset((char *)buf_in,0,(unsigned int)inl); Free(buf_in); } 144 { memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
145 if (buf_out != NULL) 145 if (buf_out != NULL)
146 { memset((char *)buf_out,0,outll); Free(buf_out); } 146 { memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
147 return(outl); 147 return(outl);
148 } 148 }