818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
|
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
|
-
-
-
-
-
-
-
-
+
+
+
+
+
+
|
int n;
size_t rc = 0;
SslServerConn *pServer = (SslServerConn*)pServerArg;
if( nBuf>0x7fffffff ){ fossil_fatal("SSL read too big"); }
else if( BIO_eof(pServer->bio) ) return 0;
while( nBuf!=rc ){
n = SSL_read(pServer->ssl, zBuf + rc, (int)(nBuf - rc));
#ifdef _WIN32
/* Windows (XP and 10 tested with openssl 1.1.1m and 3.0.1) does
** not require reading in a loop, returning all data in a single
** call. If we read in a loop on Windows, SSL reads fail. Details:
** https://fossil-scm.org/forum/forumpost/2f818850abb72719 */
rc += n;
break;
#else
if( n==0 ){
break;
}else if(n>0){
rc += n;
}else{
fossil_fatal("SSL read error.");
}
#ifdef _WIN32
/* Windows (XP and 10 tested with openssl 1.1.1m and 3.0.1) does
** not require reading in a loop, returning all data in a single
** call. If we read in a loop on Windows, SSL reads fail. Details:
** https://fossil-scm.org/forum/forumpost/2f818850abb72719 */
break;
#endif
}
return rc;
}
/*
** Read a single line of text from the client.
|