[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev problem with SSL and WWW-Authentication site
From: |
Hataguchi Takeshi |
Subject: |
lynx-dev problem with SSL and WWW-Authentication site |
Date: |
Tue, 19 Mar 2002 23:37:09 +0900 (JST) |
Lynx seems to have a problem with some sites which are protected by
SSL and require WWW-Authentication. For example, trying this URL,
Lynx wouldn't ask ID and password, but only display the message "Show
the 401 message body? (y/n)".
https://enter.nifty.com/iw/
On the other hand, Lynx works well with this URL, that is, Lynx will
ask ID and password and I can login successfully.
https://www.rim.or.jp/support/members/prgm/log_usr_dsk/logtime.cgi
I wrote a patch though I don't know whether Lynx is bad or not with
the former site. Anyway, this patch will make Lynx do well with both
sites.
I used Lynx/2.8.5dev.7 libwww-FM/2.14FM SSL-MM/1.4.1 OpenSSL/0.9.5a.
--
Takeshi Hataguchi
E-mail: address@hidden
diff -ru orig/lynx2-8-5/WWW/Library/Implementation/HTAAUtil.c
lynx2-8-5/WWW/Library/Implementation/HTAAUtil.c
--- orig/lynx2-8-5/WWW/Library/Implementation/HTAAUtil.c Tue Jan 2
10:39:50 2001
+++ lynx2-8-5/WWW/Library/Implementation/HTAAUtil.c Mon Mar 18 22:59:08 2002
@@ -50,10 +50,6 @@
#include <HTTCP.h>
#include <HTTP.h>
-#ifdef USE_SSL
-PRIVATE SSL * Handle = NULL; /* The SSL Handle */
-#endif /* USE_SSL */
-
#include <LYStrings.h>
#include <LYLeaks.h>
@@ -560,8 +556,8 @@
if (start_pointer >= end_pointer) {/*Read the next block and continue*/
#ifdef USE_SSL
- if (Handle)
- count = SSL_read(Handle, buffer, BUFFER_SIZE);
+ if (SSL_handle)
+ count = SSL_read(SSL_handle, buffer, BUFFER_SIZE);
else
count = NETREAD(in_soc, buffer, BUFFER_SIZE);
#else
diff -ru orig/lynx2-8-5/WWW/Library/Implementation/HTTP.c
lynx2-8-5/WWW/Library/Implementation/HTTP.c
--- orig/lynx2-8-5/WWW/Library/Implementation/HTTP.c Wed Jan 2 10:30:08 2002
+++ lynx2-8-5/WWW/Library/Implementation/HTTP.c Mon Mar 18 22:59:08 2002
@@ -73,6 +73,7 @@
#ifdef USE_SSL
PUBLIC SSL_CTX * ssl_ctx = NULL; /* SSL ctx */
+PUBLIC SSL * SSL_handle = NULL;
PRIVATE void free_ssl_ctx NOARGS
{
@@ -143,7 +144,7 @@
#define HTTP_NETWRITE(sock, buff, size, handle) \
(handle ? SSL_write(handle, buff, size) : NETWRITE(sock, buff, size))
#define HTTP_NETCLOSE(sock, handle) \
- { (void)NETCLOSE(sock); if (handle) SSL_free(handle); handle = NULL; }
+ { (void)NETCLOSE(sock); if (handle) SSL_free(handle); SSL_handle =
handle = NULL; }
#else
#define HTTP_NETREAD(a, b, c, d) NETREAD(a, b, c)
@@ -389,6 +390,7 @@
#if SSLEAY_VERSION_NUMBER >= 0x0900
BOOL try_tls = TRUE;
#endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
+ SSL_handle = NULL;
#else
void * handle = NULL;
#endif /* USE_SSL */
@@ -505,7 +507,7 @@
** then do the SSL stuff here
*/
if (did_connect || !strncmp(url, "https", 5)) {
- handle = HTGetSSLHandle();
+ SSL_handle = handle = HTGetSSLHandle();
SSL_set_fd(handle, s);
#if SSLEAY_VERSION_NUMBER >= 0x0900
if (!try_tls)
@@ -2047,7 +2049,7 @@
FREE(connect_host);
if (handle) {
SSL_free(handle);
- handle = NULL;
+ SSL_handle = handle = NULL;
}
#endif /* USE_SSL */
return status;
diff -ru orig/lynx2-8-5/WWW/Library/Implementation/HTTP.h
lynx2-8-5/WWW/Library/Implementation/HTTP.h
--- orig/lynx2-8-5/WWW/Library/Implementation/HTTP.h Fri Apr 14 11:39:30 2000
+++ lynx2-8-5/WWW/Library/Implementation/HTTP.h Mon Mar 18 22:59:08 2002
@@ -24,6 +24,10 @@
extern BOOL permanent_redirection;
extern BOOL redirect_post_content;
+#ifdef USE_SSL
+extern SSL * SSL_handle;
+#endif
+
#endif /* HTTP_H */
/*
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev problem with SSL and WWW-Authentication site,
Hataguchi Takeshi <=