Bugfixes provided by "Stephen Hinton" <shinton@netopia.com>.
authorLutz Jänicke <jaenicke@openssl.org>
Thu, 16 Aug 2001 15:28:00 +0000 (15:28 +0000)
committerLutz Jänicke <jaenicke@openssl.org>
Thu, 16 Aug 2001 15:28:00 +0000 (15:28 +0000)
CHANGES
crypto/bio/bio.h
crypto/bio/bss_bio.c

diff --git a/CHANGES b/CHANGES
index a7c43b9..a9e7d15 100644 (file)
--- a/CHANGES
+++ b/CHANGES
          *) 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" <shinton@netopia.com>).
+     [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
index 5945e26..24b5db2 100644 (file)
@@ -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);
 
index 4e46c6c..f666c47 100644 (file)
@@ -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:
                {