summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_sign.c
diff options
context:
space:
mode:
authorbeck <>2014-04-17 13:37:50 +0000
committerbeck <>2014-04-17 13:37:50 +0000
commitbddb7c686e3d1aeb156722adc64b6c35ae720f87 (patch)
tree7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/asn1/a_sign.c
parentecec66222d758996a4ff2671ca5026d9ede5ef76 (diff)
downloadopenbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.gz
openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.bz2
openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.zip
Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
Diffstat (limited to 'src/lib/libcrypto/asn1/a_sign.c')
-rw-r--r--src/lib/libcrypto/asn1/a_sign.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/a_sign.c b/src/lib/libcrypto/asn1/a_sign.c
index 01b6292b65..0433b49a64 100644
--- a/src/lib/libcrypto/asn1/a_sign.c
+++ b/src/lib/libcrypto/asn1/a_sign.c
@@ -211,7 +211,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
211 211
212 inl=ASN1_item_i2d(asn,&buf_in, it); 212 inl=ASN1_item_i2d(asn,&buf_in, it);
213 outll=outl=EVP_PKEY_size(pkey); 213 outll=outl=EVP_PKEY_size(pkey);
214 buf_out=OPENSSL_malloc((unsigned int)outl); 214 buf_out=malloc((unsigned int)outl);
215 if ((buf_in == NULL) || (buf_out == NULL)) 215 if ((buf_in == NULL) || (buf_out == NULL))
216 { 216 {
217 outl=0; 217 outl=0;
@@ -226,7 +226,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
226 ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_EVP_LIB); 226 ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_EVP_LIB);
227 goto err; 227 goto err;
228 } 228 }
229 if (signature->data != NULL) OPENSSL_free(signature->data); 229 if (signature->data != NULL) free(signature->data);
230 signature->data=buf_out; 230 signature->data=buf_out;
231 buf_out=NULL; 231 buf_out=NULL;
232 signature->length=outl; 232 signature->length=outl;
@@ -238,8 +238,8 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
238err: 238err:
239 EVP_MD_CTX_cleanup(ctx); 239 EVP_MD_CTX_cleanup(ctx);
240 if (buf_in != NULL) 240 if (buf_in != NULL)
241 { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); } 241 { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); free(buf_in); }
242 if (buf_out != NULL) 242 if (buf_out != NULL)
243 { OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); } 243 { OPENSSL_cleanse((char *)buf_out,outll); free(buf_out); }
244 return(outl); 244 return(outl);
245 } 245 }