diff options
author | 2014-04-17 13:37:48 +0000 | |
---|---|---|
committer | 2014-04-17 13:37:48 +0000 | |
commit | 6f3a6cb14ff86acbae89a0395ba3cdc01e85fa54 (patch) | |
tree | e7ca531f41f3403bf7f04411c40317e859a02460 /lib/libssl/src/crypto/srp/srp_lib.c | |
parent | Revert unintended whitespace changes. (diff) | |
download | wireguard-openbsd-6f3a6cb14ff86acbae89a0395ba3cdc01e85fa54.tar.xz wireguard-openbsd-6f3a6cb14ff86acbae89a0395ba3cdc01e85fa54.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 'lib/libssl/src/crypto/srp/srp_lib.c')
-rw-r--r-- | lib/libssl/src/crypto/srp/srp_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libssl/src/crypto/srp/srp_lib.c b/lib/libssl/src/crypto/srp/srp_lib.c index 7c1dcc5111c..8cc94f51db8 100644 --- a/lib/libssl/src/crypto/srp/srp_lib.c +++ b/lib/libssl/src/crypto/srp/srp_lib.c @@ -89,7 +89,7 @@ static BIGNUM *srp_Calc_k(BIGNUM *N, BIGNUM *g) int longg ; int longN = BN_num_bytes(N); - if ((tmp = OPENSSL_malloc(longN)) == NULL) + if ((tmp = malloc(longN)) == NULL) return NULL; BN_bn2bin(N,tmp) ; @@ -102,7 +102,7 @@ static BIGNUM *srp_Calc_k(BIGNUM *N, BIGNUM *g) /* use the zeros behind to pad on left */ EVP_DigestUpdate(&ctxt, tmp + longg, longN-longg); EVP_DigestUpdate(&ctxt, tmp, longg); - OPENSSL_free(tmp); + free(tmp); EVP_DigestFinal_ex(&ctxt, digest, NULL); EVP_MD_CTX_cleanup(&ctxt); @@ -123,7 +123,7 @@ BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N) longN= BN_num_bytes(N); - if ((cAB = OPENSSL_malloc(2*longN)) == NULL) + if ((cAB = malloc(2*longN)) == NULL) return NULL; memset(cAB, 0, longN); @@ -132,7 +132,7 @@ BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N) EVP_DigestInit_ex(&ctxt, EVP_sha1(), NULL); EVP_DigestUpdate(&ctxt, cAB + BN_bn2bin(A,cAB+longN), longN); EVP_DigestUpdate(&ctxt, cAB + BN_bn2bin(B,cAB+longN), longN); - OPENSSL_free(cAB); + free(cAB); EVP_DigestFinal_ex(&ctxt, cu, NULL); EVP_MD_CTX_cleanup(&ctxt); @@ -215,7 +215,7 @@ BIGNUM *SRP_Calc_x(BIGNUM *s, const char *user, const char *pass) (pass == NULL)) return NULL; - if ((cs = OPENSSL_malloc(BN_num_bytes(s))) == NULL) + if ((cs = malloc(BN_num_bytes(s))) == NULL) return NULL; EVP_MD_CTX_init(&ctxt); @@ -228,7 +228,7 @@ BIGNUM *SRP_Calc_x(BIGNUM *s, const char *user, const char *pass) EVP_DigestInit_ex(&ctxt, EVP_sha1(), NULL); BN_bn2bin(s,cs); EVP_DigestUpdate(&ctxt, cs, BN_num_bytes(s)); - OPENSSL_free(cs); + free(cs); EVP_DigestUpdate(&ctxt, dig, sizeof(dig)); EVP_DigestFinal_ex(&ctxt, dig, NULL); EVP_MD_CTX_cleanup(&ctxt); |