diff options
author | beck <> | 2000-12-15 02:58:47 +0000 |
---|---|---|
committer | beck <> | 2000-12-15 02:58:47 +0000 |
commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/asn1/t_pkey.c | |
parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip |
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libcrypto/asn1/t_pkey.c')
-rw-r--r-- | src/lib/libcrypto/asn1/t_pkey.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/t_pkey.c b/src/lib/libcrypto/asn1/t_pkey.c index e570ed1c47..ae18da96e3 100644 --- a/src/lib/libcrypto/asn1/t_pkey.c +++ b/src/lib/libcrypto/asn1/t_pkey.c | |||
@@ -99,7 +99,7 @@ int RSA_print(BIO *bp, RSA *x, int off) | |||
99 | int i,ret=0; | 99 | int i,ret=0; |
100 | 100 | ||
101 | i=RSA_size(x); | 101 | i=RSA_size(x); |
102 | m=(unsigned char *)Malloc((unsigned int)i+10); | 102 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
103 | if (m == NULL) | 103 | if (m == NULL) |
104 | { | 104 | { |
105 | RSAerr(RSA_F_RSA_PRINT,ERR_R_MALLOC_FAILURE); | 105 | RSAerr(RSA_F_RSA_PRINT,ERR_R_MALLOC_FAILURE); |
@@ -133,7 +133,7 @@ int RSA_print(BIO *bp, RSA *x, int off) | |||
133 | if (!print(bp,"coefficient:",x->iqmp,m,off)) goto err; | 133 | if (!print(bp,"coefficient:",x->iqmp,m,off)) goto err; |
134 | ret=1; | 134 | ret=1; |
135 | err: | 135 | err: |
136 | if (m != NULL) Free(m); | 136 | if (m != NULL) OPENSSL_free(m); |
137 | return(ret); | 137 | return(ret); |
138 | } | 138 | } |
139 | #endif /* NO_RSA */ | 139 | #endif /* NO_RSA */ |
@@ -176,7 +176,7 @@ int DSA_print(BIO *bp, DSA *x, int off) | |||
176 | i=BN_num_bytes(bn)*2; | 176 | i=BN_num_bytes(bn)*2; |
177 | else | 177 | else |
178 | i=256; | 178 | i=256; |
179 | m=(unsigned char *)Malloc((unsigned int)i+10); | 179 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
180 | if (m == NULL) | 180 | if (m == NULL) |
181 | { | 181 | { |
182 | DSAerr(DSA_F_DSA_PRINT,ERR_R_MALLOC_FAILURE); | 182 | DSAerr(DSA_F_DSA_PRINT,ERR_R_MALLOC_FAILURE); |
@@ -204,7 +204,7 @@ int DSA_print(BIO *bp, DSA *x, int off) | |||
204 | if ((x->g != NULL) && !print(bp,"G: ",x->g,m,off)) goto err; | 204 | if ((x->g != NULL) && !print(bp,"G: ",x->g,m,off)) goto err; |
205 | ret=1; | 205 | ret=1; |
206 | err: | 206 | err: |
207 | if (m != NULL) Free(m); | 207 | if (m != NULL) OPENSSL_free(m); |
208 | return(ret); | 208 | return(ret); |
209 | } | 209 | } |
210 | #endif /* !NO_DSA */ | 210 | #endif /* !NO_DSA */ |
@@ -284,7 +284,7 @@ int DHparams_print(BIO *bp, DH *x) | |||
284 | int reason=ERR_R_BUF_LIB,i,ret=0; | 284 | int reason=ERR_R_BUF_LIB,i,ret=0; |
285 | 285 | ||
286 | i=BN_num_bytes(x->p); | 286 | i=BN_num_bytes(x->p); |
287 | m=(unsigned char *)Malloc((unsigned int)i+10); | 287 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
288 | if (m == NULL) | 288 | if (m == NULL) |
289 | { | 289 | { |
290 | reason=ERR_R_MALLOC_FAILURE; | 290 | reason=ERR_R_MALLOC_FAILURE; |
@@ -307,7 +307,7 @@ int DHparams_print(BIO *bp, DH *x) | |||
307 | err: | 307 | err: |
308 | DHerr(DH_F_DHPARAMS_PRINT,reason); | 308 | DHerr(DH_F_DHPARAMS_PRINT,reason); |
309 | } | 309 | } |
310 | if (m != NULL) Free(m); | 310 | if (m != NULL) OPENSSL_free(m); |
311 | return(ret); | 311 | return(ret); |
312 | } | 312 | } |
313 | #endif | 313 | #endif |
@@ -337,7 +337,7 @@ int DSAparams_print(BIO *bp, DSA *x) | |||
337 | int reason=ERR_R_BUF_LIB,i,ret=0; | 337 | int reason=ERR_R_BUF_LIB,i,ret=0; |
338 | 338 | ||
339 | i=BN_num_bytes(x->p); | 339 | i=BN_num_bytes(x->p); |
340 | m=(unsigned char *)Malloc((unsigned int)i+10); | 340 | m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); |
341 | if (m == NULL) | 341 | if (m == NULL) |
342 | { | 342 | { |
343 | reason=ERR_R_MALLOC_FAILURE; | 343 | reason=ERR_R_MALLOC_FAILURE; |
@@ -352,7 +352,7 @@ int DSAparams_print(BIO *bp, DSA *x) | |||
352 | if (!print(bp,"g:",x->g,m,4)) goto err; | 352 | if (!print(bp,"g:",x->g,m,4)) goto err; |
353 | ret=1; | 353 | ret=1; |
354 | err: | 354 | err: |
355 | if (m != NULL) Free(m); | 355 | if (m != NULL) OPENSSL_free(m); |
356 | DSAerr(DSA_F_DSAPARAMS_PRINT,reason); | 356 | DSAerr(DSA_F_DSAPARAMS_PRINT,reason); |
357 | return(ret); | 357 | return(ret); |
358 | } | 358 | } |