[pkg-opensc-commit] [libp11] 49/67: Use BN_clear_free instead of BN_free
Eric Dorland
eric at moszumanska.debian.org
Sat Jan 30 05:34:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libp11.
commit afc869327d7fde9f631e47de5824c79ad1620b7f
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date: Sun Jan 10 14:29:25 2016 +0100
Use BN_clear_free instead of BN_free
---
src/p11_rsa.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/p11_rsa.c b/src/p11_rsa.c
index 1fbf4c4..4283e23 100644
--- a/src/p11_rsa.c
+++ b/src/p11_rsa.c
@@ -62,12 +62,12 @@ static RSA *pkcs11_get_rsa(PKCS11_KEY * key)
if (key_getattr_bn(&keys[i], CKA_MODULUS, &pubmod))
continue; /* Failed to retrieve the modulus */
if (BN_cmp(rsa->n, pubmod) == 0) { /* The key was found */
- BN_free(pubmod);
+ BN_clear_free(pubmod);
if (key_getattr_bn(&keys[i], CKA_PUBLIC_EXPONENT, &rsa->e))
continue; /* Failed to retrieve the public exponent */
return rsa;
} else {
- BN_free(pubmod);
+ BN_clear_free(pubmod);
}
}
}
@@ -143,7 +143,7 @@ int PKCS11_get_key_size(const PKCS11_KEY * key)
if (key_getattr_bn(key, CKA_MODULUS, &n))
return 0;
numbytes = BN_num_bytes(n);
- BN_free(n);
+ BN_clear_free(n);
return numbytes;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list