summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_saos.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/rsa/rsa_saos.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/rsa/rsa_saos.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_saos.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c
index f98e0a80a6..ee5473a184 100644
--- a/src/lib/libcrypto/rsa/rsa_saos.c
+++ b/src/lib/libcrypto/rsa/rsa_saos.c
@@ -82,7 +82,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type,
82 RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY); 82 RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY);
83 return(0); 83 return(0);
84 } 84 }
85 s=(unsigned char *)OPENSSL_malloc((unsigned int)j+1); 85 s=(unsigned char *)malloc((unsigned int)j+1);
86 if (s == NULL) 86 if (s == NULL)
87 { 87 {
88 RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE); 88 RSAerr(RSA_F_RSA_SIGN_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE);
@@ -97,7 +97,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type,
97 *siglen=i; 97 *siglen=i;
98 98
99 OPENSSL_cleanse(s,(unsigned int)j+1); 99 OPENSSL_cleanse(s,(unsigned int)j+1);
100 OPENSSL_free(s); 100 free(s);
101 return(ret); 101 return(ret);
102 } 102 }
103 103
@@ -117,7 +117,7 @@ int RSA_verify_ASN1_OCTET_STRING(int dtype,
117 return(0); 117 return(0);
118 } 118 }
119 119
120 s=(unsigned char *)OPENSSL_malloc((unsigned int)siglen); 120 s=(unsigned char *)malloc((unsigned int)siglen);
121 if (s == NULL) 121 if (s == NULL)
122 { 122 {
123 RSAerr(RSA_F_RSA_VERIFY_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE); 123 RSAerr(RSA_F_RSA_VERIFY_ASN1_OCTET_STRING,ERR_R_MALLOC_FAILURE);
@@ -143,7 +143,7 @@ err:
143 if (s != NULL) 143 if (s != NULL)
144 { 144 {
145 OPENSSL_cleanse(s,(unsigned int)siglen); 145 OPENSSL_cleanse(s,(unsigned int)siglen);
146 OPENSSL_free(s); 146 free(s);
147 } 147 }
148 return(ret); 148 return(ret);
149 } 149 }