library/src/network/BP-NetworkSSL.cc
// reads size bytes from socks ssl connection into buff
// btw, ssl is lame in the sense that you cannot read more then
// 4096 bytes at a time for sslv2 and 16kb for v3/tlsv1.
reads size bytes from socks ssl connection into buff
btw, ssl is lame in the sense that you cannot read more then
4096 bytes at a time for sslv2 and 16kb for v3/tlsv1.
reads size bytes from socks ssl connection into buff btw ssl is lame in the sense that you cannot read more then 4096 bytes at a time for sslv2 and 16kb for v3 / tlsv1 .
int BP_SSLRead(P_BP_NETWORK_HANDLE netHandle, BYTE *buff, int size)
{
	int length = 0;
	int totalRead = 0;
	if(netHandle == NULL)
		return 0;
	if(buff == NULL)
		return 0;
	do
	{
		length = SSL_read(netHandle->sslOpts->ssl, buff, size);
		buff = &buff[length];
		size -= length;
		totalRead += length;
	} while(length > 0 && size > 0);
	return totalRead;
}
int BP_SSLRead ( P_BP_NETWORK_HANDLE netHandle , BYTE * buff , int size ) { int length = 0 ; int totalRead = 0 ; if ( netHandle == NULL ) return 0 ; if ( buff == NULL ) return 0 ; do { length = SSL_read ( netHandle -> sslOpts -> ssl , buff , size ) ; buff = & buff [ length ] ; size -= length ; totalRead += length ; } while ( length > 0 && size > 0 ) ; return totalRead ; }
reads size bytes from socks ssl connection into buff
btw, ssl is lame in the sense that you cannot read more then
4096 bytes at a time for sslv2 and 16kb for v3/tlsv1.
reads size bytes from socks ssl connection into buff btw ssl is lame in the sense that you cannot read more then 4096 bytes at a time for sslv2 and 16kb for v3 / tlsv1 .
// read in all bytes from a SSL object, need to loop due to short // comings of openssl library :( // attempt to read from network handle // set buffer position // set length // set total read // return the total amount read