summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/ssl/ssltest.c
diff options
context:
space:
mode:
authormiod <>2014-07-12 16:42:47 +0000
committermiod <>2014-07-12 16:42:47 +0000
commit2608a374bc0d5bdbb8fff6d0477adf58542ee1e8 (patch)
tree6193dc1be5b0fc33c9dbe3ad5c273c2ba965e89e /src/regress/lib/libssl/ssl/ssltest.c
parentf32d63e4f2007104dce73700052ad2ad2f26ee27 (diff)
downloadopenbsd-2608a374bc0d5bdbb8fff6d0477adf58542ee1e8.tar.gz
openbsd-2608a374bc0d5bdbb8fff6d0477adf58542ee1e8.tar.bz2
openbsd-2608a374bc0d5bdbb8fff6d0477adf58542ee1e8.zip
A few fixes/improvements:
- first, BN_free == BN_clear_free in our libcrypto, so we do not need to treat CBIGNUM (crypto BN) separately from BIGNUM (regular BN). - then, in bn_i2c(), since BN_bn2bin returns BN_num_bytes(input), take advantage of this to avoid calling BN_num_bytes() a second time. BN_num_bytes() is cheap, but this not a reason to perform redundant work. - finally, in bn_c2i, if bn_new() fails, return early. Otherwise BN_bin2bn will try to create a BN too, and although this will probably fail since we were already out of memory, if we are on a threaded process and suddenly the allocation succeeds, we will leak it since it will never be stored in *pval. ok jsing@
Diffstat (limited to 'src/regress/lib/libssl/ssl/ssltest.c')
0 files changed, 0 insertions, 0 deletions