This is the first patch I've submitted for OpenSSL. Feedback about what I did wrong (and what I did right) is appreciated. These two patches fix a couple bugs in OpenSSL 0.9.6b. The first fixes a typo that prevents use of the BIO_get_num_renegotiates() macro. The second corrects, for BIO pairs ONLY, BIO_get_write_buf_size() and BIO_ctrl(bio, BIO_C_GET_WRITE_BUF_SIZE, ...) The code to get the write buffer size would fall through to the code to bind two BIOs together. Oops. diff -ur openssl-0.9.6b/crypto/bio/bio.h openssl-work/crypto/bio/bio.h --- openssl-0.9.6b/crypto/bio/bio.h Wed Sep 20 08:55:19 2000 +++ openssl-work/crypto/bio/bio.h Wed Aug 15 12:05:05 2001 @@ -431,7 +431,7 @@ #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 -ur openssl-0.9.6b/crypto/bio/bss_bio.c openssl-work/crypto/bio/bss_bio.c --- openssl-0.9.6b/crypto/bio/bss_bio.c Thu Jun 1 17:17:33 2000 +++ openssl-work/crypto/bio/bss_bio.c Wed Aug 15 12:01:12 2001 @@ -474,7 +474,8 @@ break; case BIO_C_GET_WRITE_BUF_SIZE: - num = (long) b->size; + ret = (long) b->size; + break; case BIO_C_MAKE_BIO_PAIR: { ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]