diff -Nacr lynx2-8-3.med/WWW/Library/Implementation/HTTP.c lynx2-8-3/WWW/Library/Implementation/HTTP.c
*** lynx2-8-3.med/WWW/Library/Implementation/HTTP.c	Mon Jul 17 09:20:56 2000
--- lynx2-8-3/WWW/Library/Implementation/HTTP.c	Mon Jul 17 16:08:36 2000
***************
*** 394,399 ****
--- 394,400 ----
    char *connect_host = NULL;  /* The host being proxied */
    SSL * handle = NULL;                /* The SSL handle */
    char SSLprogress[256];      /* progress bar message */
+   BIO	*bio = NULL;		/*  20000714 VRS  */
  #if SSLEAY_VERSION_NUMBER >= 0x0900
    BOOL try_tls = TRUE;
  #endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
***************
*** 519,524 ****
--- 520,537 ----
            handle->options|=SSL_OP_NO_TLSv1;
  #endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
        HTSSLInitPRNG();
+ #ifndef NO_KRB5
+       {
+       char  *port = NULL;
+       char  *host = HTParse(url, "", PARSE_HOST);
+ 
+       if (host  &&  handle->kssl_ctx)  {
+           if ((port = strchr(host, ':')) != NULL)  *port = '\0';
+           kssl_ctx_setstring(handle->kssl_ctx, KSSL_SERVER, host);
+           }
+       if (host)  free(host);
+       }
+ #endif    /* NO_KRB5 */
        status = SSL_connect(handle);
  
        if (status <= 0) {
***************
*** 1095,1100 ****
--- 1108,1121 ----
  		HTTP_NETCLOSE(s, handle);
  		status = HT_NO_DATA;
  		goto clean_up;
+ #ifdef USE_SSL
+ 	    } else if (status < 0  &&  !already_retrying && !do_post  &&
+ 			handle->rwstate == SSL_READING  && 
+ 			(bio = SSL_get_rbio(handle))  &&
+ 			BIO_should_read(bio) && BIO_should_retry(bio))  {
+ 			already_retrying = TRUE;
+ 			continue;
+ #endif	/* USE_SSL */
  	    } else if  (status < 0 &&
  			(SOCKET_ERRNO == ENOTCONN ||
  #ifdef _WINDOWS	/* 1997/11/09 (Sun) 16:59:58 */
***************
*** 1216,1221 ****
--- 1237,1243 ----
      fields = sscanf(line_buffer, "%20s %d",
  		    server_version,
  		    &server_status);
+ 	length = length + status;
  
      CTRACE((tfp, "HTTP: Scanned %d fields from line_buffer\n", fields));
  
***************
*** 1250,1255 ****
--- 1272,1278 ----
  	HTAtom * encoding;
  
  	CTRACE((tfp, "--- Talking HTTP0.\n"));
+ 	length = length + status;
  
  	format_in = HTFileFormat(url, &encoding, NULL);
  	/*
diff -Nacr lynx2-8-3.med/makefile.in lynx2-8-3/makefile.in
*** lynx2-8-3.med/makefile.in	Mon Jul 17 09:20:56 2000
--- lynx2-8-3/makefile.in	Mon Jul 17 16:06:40 2000
***************
*** 86,92 ****
  # ability to make SSL connections.
  SSL_DIR= /usr/local/ssl
  SSL_LIBS= -L$(SSL_DIR)/lib -lssl -lcrypto
! SSL_DEFINES= -DUSE_SSL -I$(SSL_DIR)/include/openssl -I$(SSL_DIR)/include
  
  # !!!!!!!!!!! SUN resolv LIBRARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  # To include resolv in the LIBS="" list for SUN 3, 4 or Solaris OS,
--- 86,93 ----
  # ability to make SSL connections.
  SSL_DIR= /usr/local/ssl
  SSL_LIBS= -L$(SSL_DIR)/lib -lssl -lcrypto
! SSL_INCLUDES= -I$(SSL_DIR)/include -I$(SSL_DIR)/include/openssl
! SSL_DEFINES= $(SSL_INCLUDES) -DUSE_SSL -DNO_IDEA
  
  # !!!!!!!!!!! SUN resolv LIBRARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  # To include resolv in the LIBS="" list for SUN 3, 4 or Solaris OS,
***************
*** 117,134 ****
  # in ftp://ftp.clark.net/pub/dickey/ncurses/
  # or ftp://ftp.gnu.org/pub/gnu/
  
  # Also be sure to check out the compilation symbols in userdefs.h
  # before building Lynx!
  
  # If you apply patches which require linking to site-specific libraries, set
  # SITE_LIBS to those libraries.
! SITE_LIBS= $(SSL_LIBS) # Your libraries here
  
  # Set SITE_LYDEFS to one or more of the defines for the WWW Library:
! SITE_LYDEFS = $(SSL_DEFINES) # Your defines here
  
  # Set SITE_DEFS to one or more of the defines for lynx below:
! SITE_DEFS = $(SSL_DEFINES) # Your defines here
  
  # defines for which there are no configure options:
  # -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
--- 118,142 ----
  # in ftp://ftp.clark.net/pub/dickey/ncurses/
  # or ftp://ftp.gnu.org/pub/gnu/
  
+ # !!!!!!!!!!!!! Kerberos Support (For Kerberized SSL). !!!!!!!!!!!!!
+ # This is for use with the kssl patches to openssl, apache, and mod_ssl.
+ # These patches are not widely available yet.
+ KRB5_DIR= /usr/local/krb5
+ KRB5_DEFINES= -I$(KRB5_DIR)/include
+ KRB5_LIBS=-L $(KRB5_DIR)/lib -lgssapi_krb5 -lkrb5 -lcom_err $(KRB5_DIR)/lib/libcrypto.a  -lresolv
+ 
  # Also be sure to check out the compilation symbols in userdefs.h
  # before building Lynx!
  
  # If you apply patches which require linking to site-specific libraries, set
  # SITE_LIBS to those libraries.
! SITE_LIBS= $(SSL_LIBS) $(KRB5_LIBS) # Your libraries here
  
  # Set SITE_LYDEFS to one or more of the defines for the WWW Library:
! SITE_LYDEFS = $(SSL_DEFINES) $(KRB5_DEFINES) # Your defines here
  
  # Set SITE_DEFS to one or more of the defines for lynx below:
! SITE_DEFS = $(SSL_DEFINES) $(KRB5_DEFINES) # Your defines here
  
  # defines for which there are no configure options:
  # -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
