diff --git a/CHANGES b/CHANGES index a7c43b96f41480f950a7e5dcee43627d40c549be..a9e7d15215bb2593aea314c396188cac747fcfb7 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,10 @@ *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7 +) applies to 0.9.7 only + *) Fix buggy behaviour of BIO_get_num_renegotiates() and BIO_ctrl() + for BIO_C_GET_WRITE_BUF_SIZE ("Stephen Hinton" ). + [Lutz Jaenicke] + *) Rework the configuration and shared library support for Tru64 Unix. The configuration part makes use of modern compiler features and still retains old compiler behavior for those that run older versions diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h index 5945e26aafd53a748e6785d032f127ae7b5bf3fc..24b5db2c465280ce7649725aa4c016c0677eadaf 100644 --- a/crypto/bio/bio.h +++ b/crypto/bio/bio.h @@ -434,7 +434,7 @@ int BIO_read_filename(BIO *b,const char *name); #define BIO_set_ssl_renegotiate_bytes(b,num) \ BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL); #define BIO_get_num_renegotiates(b) \ - BIO_ctrl(b,BIO_C_SET_SSL_NUM_RENEGOTIATES,0,NULL); + BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL); #define BIO_set_ssl_renegotiate_timeout(b,seconds) \ BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL); diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index 4e46c6c119de971bd21a0071448d33977938255a..f666c47f4e17258dbcd871c15f4f563e76813c8c 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -474,7 +474,8 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr) break; case BIO_C_GET_WRITE_BUF_SIZE: - num = (long) b->size; + ret = (long) b->size; + break; case BIO_C_MAKE_BIO_PAIR: {