ssltest.c (68651) | ssltest.c (100928) |
---|---|
1/* ssl/ssltest.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 834 unchanged lines hidden (view full) --- 843 char *dataptr; 844 845 if (INT_MAX < num) 846 num = INT_MAX; 847 848 if (num > 1) 849 --num; /* test restartability even more thoroughly */ 850 | 1/* ssl/ssltest.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 834 unchanged lines hidden (view full) --- 843 char *dataptr; 844 845 if (INT_MAX < num) 846 num = INT_MAX; 847 848 if (num > 1) 849 --num; /* test restartability even more thoroughly */ 850 |
851 r = BIO_nwrite(io1, &dataptr, (int)num); | 851 r = BIO_nwrite0(io1, &dataptr); |
852 assert(r > 0); | 852 assert(r > 0); |
853 assert(r <= (int)num); 854 num = r; | 853 if (r < (int)num) 854 num = r; |
855 r = BIO_read(io2, dataptr, (int)num); 856 if (r != (int)num) /* can't happen */ 857 { 858 fprintf(stderr, "ERROR: BIO_read could not read " 859 "BIO_ctrl_pending() bytes"); 860 goto err; 861 } 862 progress = 1; | 855 r = BIO_read(io2, dataptr, (int)num); 856 if (r != (int)num) /* can't happen */ 857 { 858 fprintf(stderr, "ERROR: BIO_read could not read " 859 "BIO_ctrl_pending() bytes"); 860 goto err; 861 } 862 progress = 1; |
863 r = BIO_nwrite(io1, &dataptr, (int)num); 864 if (r != (int)num) /* can't happen */ 865 { 866 fprintf(stderr, "ERROR: BIO_nwrite() did not accept " 867 "BIO_nwrite0() bytes"); 868 goto err; 869 } |
|
863 864 if (debug) 865 printf((io2 == client_io) ? 866 "C->S relaying: %d bytes\n" : 867 "S->C relaying: %d bytes\n", 868 (int)num); 869 } 870 } /* no loop, BIO_ctrl_get_read_request now returns 0 anyway */ --- 500 unchanged lines hidden --- | 870 871 if (debug) 872 printf((io2 == client_io) ? 873 "C->S relaying: %d bytes\n" : 874 "S->C relaying: %d bytes\n", 875 (int)num); 876 } 877 } /* no loop, BIO_ctrl_get_read_request now returns 0 anyway */ --- 500 unchanged lines hidden --- |