summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ts/ts_verify_ctx.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/ts/ts_verify_ctx.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/ts/ts_verify_ctx.c')
-rw-r--r--src/lib/libcrypto/ts/ts_verify_ctx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ts/ts_verify_ctx.c b/src/lib/libcrypto/ts/ts_verify_ctx.c
index 609b7735d4..629107aeec 100644
--- a/src/lib/libcrypto/ts/ts_verify_ctx.c
+++ b/src/lib/libcrypto/ts/ts_verify_ctx.c
@@ -63,7 +63,7 @@
63TS_VERIFY_CTX *TS_VERIFY_CTX_new(void) 63TS_VERIFY_CTX *TS_VERIFY_CTX_new(void)
64 { 64 {
65 TS_VERIFY_CTX *ctx = 65 TS_VERIFY_CTX *ctx =
66 (TS_VERIFY_CTX *) OPENSSL_malloc(sizeof(TS_VERIFY_CTX)); 66 (TS_VERIFY_CTX *) malloc(sizeof(TS_VERIFY_CTX));
67 if (ctx) 67 if (ctx)
68 memset(ctx, 0, sizeof(TS_VERIFY_CTX)); 68 memset(ctx, 0, sizeof(TS_VERIFY_CTX));
69 else 69 else
@@ -82,7 +82,7 @@ void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx)
82 if (!ctx) return; 82 if (!ctx) return;
83 83
84 TS_VERIFY_CTX_cleanup(ctx); 84 TS_VERIFY_CTX_cleanup(ctx);
85 OPENSSL_free(ctx); 85 free(ctx);
86 } 86 }
87 87
88void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx) 88void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx)
@@ -95,7 +95,7 @@ void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx)
95 ASN1_OBJECT_free(ctx->policy); 95 ASN1_OBJECT_free(ctx->policy);
96 96
97 X509_ALGOR_free(ctx->md_alg); 97 X509_ALGOR_free(ctx->md_alg);
98 OPENSSL_free(ctx->imprint); 98 free(ctx->imprint);
99 99
100 BIO_free_all(ctx->data); 100 BIO_free_all(ctx->data);
101 101
@@ -138,7 +138,7 @@ TS_VERIFY_CTX *TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx)
138 if (!(ret->md_alg = X509_ALGOR_dup(md_alg))) goto err; 138 if (!(ret->md_alg = X509_ALGOR_dup(md_alg))) goto err;
139 msg = TS_MSG_IMPRINT_get_msg(imprint); 139 msg = TS_MSG_IMPRINT_get_msg(imprint);
140 ret->imprint_len = ASN1_STRING_length(msg); 140 ret->imprint_len = ASN1_STRING_length(msg);
141 if (!(ret->imprint = OPENSSL_malloc(ret->imprint_len))) goto err; 141 if (!(ret->imprint = malloc(ret->imprint_len))) goto err;
142 memcpy(ret->imprint, ASN1_STRING_data(msg), ret->imprint_len); 142 memcpy(ret->imprint, ASN1_STRING_data(msg), ret->imprint_len);
143 143
144 /* Setting nonce. */ 144 /* Setting nonce. */