Commit 28b9f78f authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 2.8.7dev8

parent f14e6980
-- $LynxId: AUTHORS,v 1.4 2007/07/22 21:58:00 tom Exp $ -- $LynxId: AUTHORS,v 1.5 2008/01/10 01:14:43 tom Exp $
-- vile:txtmode -- vile:txtmode
Most of the people who have contributed more than one patch to Lynx (as well as Most of the people who have contributed more than one patch to Lynx (as well as
a few who have only one) are noted in the changelogs by their initials (to keep a few who have only one) are noted in the changelogs by their initials (to keep
...@@ -33,7 +33,7 @@ LE Laura Eaves ...@@ -33,7 +33,7 @@ LE Laura Eaves
LP Leonid Pauzner LP Leonid Pauzner
LV Larry W Virden LV Larry W Virden
NSH nsh@horae.dti.ne.jp NSH nsh@horae.dti.ne.jp
PBM onemda@gmail.com PBM Paul B Mahol
PC Peter Canning PC Peter Canning
PDS Paul D Smith PDS Paul D Smith
PG Paul Gilmartin PG Paul Gilmartin
......
...@@ -334,6 +334,9 @@ ...@@ -334,6 +334,9 @@
<File <File
RelativePath="..\..\..\src\LYSearch.c"> RelativePath="..\..\..\src\LYSearch.c">
</File> </File>
<File
RelativePath="..\..\..\src\LYSession.c">
</File>
<File <File
RelativePath="..\..\..\src\LYShowInfo.c"> RelativePath="..\..\..\src\LYShowInfo.c">
</File> </File>
...@@ -627,6 +630,9 @@ ...@@ -627,6 +630,9 @@
<File <File
RelativePath="..\..\..\src\LYSearch.h"> RelativePath="..\..\..\src\LYSearch.h">
</File> </File>
<File
RelativePath="..\..\..\src\LYSession.h">
</File>
<File <File
RelativePath="..\..\..\src\LYShowInfo.h"> RelativePath="..\..\..\src\LYShowInfo.h">
</File> </File>
......
...@@ -467,6 +467,10 @@ ...@@ -467,6 +467,10 @@
RelativePath="..\..\..\src\LYSearch.c" RelativePath="..\..\..\src\LYSearch.c"
> >
</File> </File>
<File
RelativePath="..\..\..\src\LYSession.c"
>
</File>
<File <File
RelativePath="..\..\..\src\LYShowInfo.c" RelativePath="..\..\..\src\LYShowInfo.c"
> >
...@@ -845,6 +849,10 @@ ...@@ -845,6 +849,10 @@
RelativePath="..\..\..\src\LYSearch.h" RelativePath="..\..\..\src\LYSearch.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\LYSession.h"
>
</File>
<File <File
RelativePath="..\..\..\src\LYShowInfo.h" RelativePath="..\..\..\src\LYShowInfo.h"
> >
......
...@@ -3,6 +3,39 @@ ...@@ -3,6 +3,39 @@
Changes since Lynx 2.8 release Changes since Lynx 2.8 release
=============================================================================== ===============================================================================
2008-02-17 (2.8.7dev.8)
* add "nano" to list of editors accepting +number option (patch by Tim Chase)
* add configure --with-nss-compat option, for building with NSS library's
OpenSSL-compatible interface (patch by Zdenek Prikryl)
* minor fix for version message to ensure WWW version shows when not building
with OpenSSL -GV
* make "--more--" message configuable -PBM
* improve multibyte editing (patch by Sergej Kvachonok)
* add XWINDOWS / NON_XWINDOWS environment-variable field to DOWNLOAD, etc., in
lynx.cfg to specify whether a downloader (printer, etc) is enabled when
the X display variable is set -PBM
* add configure script options --enable-session-cache and --enable-progressbar
for PBM's experimental session and progressbar features -TD
* add session save/restore feature -PBM
+ bind ^X to toggle view of page showing session information
+ add binding for ^U to previous-document (outside of line-editing).
+ documented command-line options and configuration data for this feature.
+ document -child_relaxed option in Lynx users's guide.
* use vasprintf() if available, fixes Fedora #462449 -TD
* several small changes to configure script to work with MirBSD build
environment -TG
* show progress message in X509 callback -TG
* modify definition of lynxrc and cookies files in LYMain.c and LYrcFile.c to
make it simpler for build script to override -TD
* reviewed patches at
http://www.mirbsd.org/cvs.cgi/ports/www/lynx/patches/
improved buffer allocation limits in makeuctb.c -TD
* add support for the X.509 extension subjectAltName using GNUTLS -Joey Schulze
* add SSL_CERT_FILE to lynx.cfg -Joey Schulze
* fix spelling error in HTAccess.h comment (report by Paul de Weerd) -TD
* add null-pointer checks to cover a special case of exit on error while
reading from the standard input (report by Pascal Terjan) -TD
2007-08-02 (2.8.7dev.7) 2007-08-02 (2.8.7dev.7)
* restore top-level descrip.mms due to error in patch -TD * restore top-level descrip.mms due to error in patch -TD
......
...@@ -345,6 +345,10 @@ II. Compile instructions -- UNIX ...@@ -345,6 +345,10 @@ II. Compile instructions -- UNIX
completion), as well as the amount of time stalled without any data completion), as well as the amount of time stalled without any data
transferred. transferred.
--disable-session-cache (define USE_CACHE_JAR)
Use this option to compile-in support for saving/restoring session
information in files. Configurable from lynx.cfg
--disable-source-cache (define USE_SOURCE_CACHE) --disable-source-cache (define USE_SOURCE_CACHE)
Use this option to compile-in support for caching HTML pages locally, Use this option to compile-in support for caching HTML pages locally,
in files or in memory. Configurable from lynx.cfg in files or in memory. Configurable from lynx.cfg
...@@ -568,6 +572,16 @@ II. Compile instructions -- UNIX ...@@ -568,6 +572,16 @@ II. Compile instructions -- UNIX
default value is derived at configure time, and depends on whether GNU default value is derived at configure time, and depends on whether GNU
or native gettext is used. or native gettext is used.
--with-nss-compat[=XXX] (define USE_NSS_COMPAT_INCL)
Use this option to configure with the NSS library's OpenSSL-compatible
interface.
See docs/README.ssl for additional information.
The optional value XXX specifies the directory in which the library
can be found, and may be either the path of the "lib" directory,
or one level above. In either case, the corresponding header files
are assumed to be in the parallel "include" directory.
--with-screen=XXX --with-screen=XXX
Use this option to select the screen type. The option value, XXX Use this option to select the screen type. The option value, XXX
must be one of curses (the default), ncurses, ncursesw, pdcurses or must be one of curses (the default), ncurses, ncursesw, pdcurses or
...@@ -1315,4 +1329,4 @@ VIII. Acknowledgment ...@@ -1315,4 +1329,4 @@ VIII. Acknowledgment
-- 1999/04/24 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp> -- 1999/04/24 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp>
-- vile:txtmode -- vile:txtmode
-- $LynxId: INSTALLATION,v 1.100 2007/07/29 17:23:43 tom Exp $ -- $LynxId: INSTALLATION,v 1.102 2008/02/17 19:58:25 tom Exp $
/*
* $LynxId: LYHelp.hin,v 1.4 2008/01/10 23:26:53 tom Exp $
* vile:cmode
*/
/* definitions for help files */ /* definitions for help files */
#ifndef LYHELP_H #ifndef LYHELP_H
...@@ -6,6 +10,7 @@ ...@@ -6,6 +10,7 @@
#define ALT_EDIT_HELP "keystrokes/@ALT_EDIT_HELP@" #define ALT_EDIT_HELP "keystrokes/@ALT_EDIT_HELP@"
#define BASHLIKE_EDIT_HELP "keystrokes/@BASHLIKE_EDIT_HELP@" #define BASHLIKE_EDIT_HELP "keystrokes/@BASHLIKE_EDIT_HELP@"
#define COOKIE_JAR_HELP "@LYNX_USERS_GUIDE@#Cookies" #define COOKIE_JAR_HELP "@LYNX_USERS_GUIDE@#Cookies"
#define CACHE_JAR_HELP "@LYNX_USERS_GUIDE@#Cache"
#define CURRENT_KEYMAP_HELP "keystrokes/@KEYSTROKE_HELP@" #define CURRENT_KEYMAP_HELP "keystrokes/@KEYSTROKE_HELP@"
#define DIRED_MENU_HELP "keystrokes/@DIRED_HELP@" #define DIRED_MENU_HELP "keystrokes/@DIRED_HELP@"
#define EDIT_HELP "keystrokes/@EDIT_HELP@" #define EDIT_HELP "keystrokes/@EDIT_HELP@"
......
/* /*
* $LynxId: LYMessages_en.h,v 1.68 2008/01/08 00:50:53 tom Exp $
*
* Lynx - Hypertext navigation system * Lynx - Hypertext navigation system
* *
* (c) Copyright 1992, 1993, 1994 University of Kansas * (c) Copyright 1992, 1993, 1994 University of Kansas
...@@ -298,6 +300,8 @@ ...@@ -298,6 +300,8 @@
#define BOOKMARKS_NOT_OPEN \ #define BOOKMARKS_NOT_OPEN \
gettext("Unable to open bookmark file, use 'a' to save a link first") gettext("Unable to open bookmark file, use 'a' to save a link first")
#define BOOKMARKS_NOLINKS gettext("There are no links in this bookmark file!") #define BOOKMARKS_NOLINKS gettext("There are no links in this bookmark file!")
#define CACHE_D_OR_CANCEL \
gettext("D)elete cached document or C)ancel? (d,c): ")
#define BOOK_D_L_OR_CANCEL \ #define BOOK_D_L_OR_CANCEL \
gettext("Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): ") gettext("Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): ")
#define BOOK_D_OR_CANCEL gettext("Save D)ocument to bookmark file or C)ancel? (d,c): ") #define BOOK_D_OR_CANCEL gettext("Save D)ocument to bookmark file or C)ancel? (d,c): ")
...@@ -653,8 +657,6 @@ ...@@ -653,8 +657,6 @@
#endif /* VMS */ #endif /* VMS */
#define MAXLINKS_REACHED \ #define MAXLINKS_REACHED \
gettext("Maximum links per page exceeded! Use half-page or two-line scrolling.") gettext("Maximum links per page exceeded! Use half-page or two-line scrolling.")
#define MAXHIST_REACHED \
gettext("History List maximum reached! Document not pushed.")
#define VISITED_LINKS_EMPTY gettext("No previously visited links available!") #define VISITED_LINKS_EMPTY gettext("No previously visited links available!")
#define MEMORY_EXHAUSTED_ABORT gettext("Memory exhausted! Program aborted!") #define MEMORY_EXHAUSTED_ABORT gettext("Memory exhausted! Program aborted!")
#define MEMORY_EXHAUSTED_ABORTING gettext("Memory exhausted! Aborting...") #define MEMORY_EXHAUSTED_ABORTING gettext("Memory exhausted! Aborting...")
...@@ -700,6 +702,7 @@ ...@@ -700,6 +702,7 @@
#define ALLOWING_COOKIE gettext("Allowing this cookie.") #define ALLOWING_COOKIE gettext("Allowing this cookie.")
#define REJECTING_COOKIE gettext("Rejecting this cookie.") #define REJECTING_COOKIE gettext("Rejecting this cookie.")
#define COOKIE_JAR_IS_EMPTY gettext("The Cookie Jar is empty.") #define COOKIE_JAR_IS_EMPTY gettext("The Cookie Jar is empty.")
#define CACHE_JAR_IS_EMPTY gettext("The Cache Jar is empty.")
#define ACTIVATE_TO_GOBBLE \ #define ACTIVATE_TO_GOBBLE \
gettext("Activate links to gobble up cookies or entire domains,") gettext("Activate links to gobble up cookies or entire domains,")
#define OR_CHANGE_ALLOW gettext("or to change a domain's 'allow' setting.") #define OR_CHANGE_ALLOW gettext("or to change a domain's 'allow' setting.")
...@@ -814,6 +817,7 @@ ...@@ -814,6 +817,7 @@
#define DIRED_MENU_TITLE gettext("File Management Options") #define DIRED_MENU_TITLE gettext("File Management Options")
#define DOWNLOAD_OPTIONS_TITLE gettext("Download Options") #define DOWNLOAD_OPTIONS_TITLE gettext("Download Options")
#define HISTORY_PAGE_TITLE gettext("History Page") #define HISTORY_PAGE_TITLE gettext("History Page")
#define CACHE_JAR_TITLE gettext("Cache Jar")
#define LIST_PAGE_TITLE gettext("List Page") #define LIST_PAGE_TITLE gettext("List Page")
#define LYNXCFG_TITLE gettext("Lynx.cfg Information") #define LYNXCFG_TITLE gettext("Lynx.cfg Information")
#define MOSAIC_BOOKMARK_TITLE gettext("Converted Mosaic Hotlist") #define MOSAIC_BOOKMARK_TITLE gettext("Converted Mosaic Hotlist")
......
/* HTAccess: Access manager for libwww /*
ACCESS MANAGER * $LynxId: HTAccess.h,v 1.20 2008/01/03 00:24:16 tom Exp $
* HTAccess: Access manager for libwww
This module keeps a list of valid protocol (naming scheme) specifiers with associated * ACCESS MANAGER
access code. It allows documents to be loaded given various combinations of *
parameters. New access protocols may be registered at any time. * This module keeps a list of valid protocol (naming scheme) specifiers with
* associated access code. It allows documents to be loaded given various
Part of the libwww library . * combinations of parameters. New access protocols may be registered at any
* time.
*
* Part of the libwww library .
*
*/ */
#ifndef HTACCESS_H #ifndef HTACCESS_H
#define HTACCESS_H #define HTACCESS_H
...@@ -154,7 +157,7 @@ Load a document from absolute name to a stream ...@@ -154,7 +157,7 @@ Load a document from absolute name to a stream
Load if necessary, and select an anchor Load if necessary, and select an anchor
ON ENTRY, ON ENTRY,
destination The child or parenet anchor to be loaded. destination The child or parent anchor to be loaded.
ON EXIT, ON EXIT,
returns YES Success returns YES Success
...@@ -168,7 +171,7 @@ Load if necessary, and select an anchor ...@@ -168,7 +171,7 @@ Load if necessary, and select an anchor
Make a stream for Saving object back Make a stream for Saving object back
ON ENTRY, ON ENTRY,
anchor is valid anchor which has previously beeing loaded anchor is valid anchor which has previously been loaded
ON EXIT, ON EXIT,
returns 0 if error else a stream to save the object to. returns 0 if error else a stream to save the object to.
......
/* /*
* $LynxId: HTParse.c,v 1.47 2007/07/22 22:24:37 tom Exp $ * $LynxId: HTParse.c,v 1.48 2008/01/10 00:57:31 tom Exp $
* *
* Parse HyperText Document Address HTParse.c * Parse HyperText Document Address HTParse.c
* ================================ * ================================
...@@ -294,11 +294,14 @@ char *HTParse(const char *aName, ...@@ -294,11 +294,14 @@ char *HTParse(const char *aName,
if (given.access && given.host && !given.relative && !given.absolute) { if (given.access && given.host && !given.relative && !given.absolute) {
if (!strcmp(given.access, "http") || if (!strcmp(given.access, "http") ||
!strcmp(given.access, "https") || !strcmp(given.access, "https") ||
!strcmp(given.access, "ftp")) !strcmp(given.access, "ftp")) {
static char empty_string[] = "";
/* /*
* Assume root. * Assume root.
*/ */
given.absolute = ""; given.absolute = empty_string;
}
} }
acc_method = given.access ? given.access : related.access; acc_method = given.access ? given.access : related.access;
if (wanted & PARSE_ACCESS) { if (wanted & PARSE_ACCESS) {
...@@ -574,6 +577,7 @@ char *HTParse(const char *aName, ...@@ -574,6 +577,7 @@ char *HTParse(const char *aName,
case LYNXKEYMAP_URL_TYPE: case LYNXKEYMAP_URL_TYPE:
case LYNXIMGMAP_URL_TYPE: case LYNXIMGMAP_URL_TYPE:
case LYNXCOOKIE_URL_TYPE: case LYNXCOOKIE_URL_TYPE:
case LYNXCACHE_URL_TYPE:
case LYNXDIRED_URL_TYPE: case LYNXDIRED_URL_TYPE:
case LYNXOPTIONS_URL_TYPE: case LYNXOPTIONS_URL_TYPE:
case LYNXCFG_URL_TYPE: case LYNXCFG_URL_TYPE:
......
/* /*
* $LynxId: HTString.c,v 1.49 2007/05/16 21:44:23 tom Exp $ * $LynxId: HTString.c,v 1.51 2008/02/17 19:30:56 Gisle.Vanem Exp $
* *
* Case-independent string comparison HTString.c * Case-independent string comparison HTString.c
* *
...@@ -25,12 +25,7 @@ int WWW_TraceMask = 0; /* Global trace flag for ALL W3 code */ ...@@ -25,12 +25,7 @@ int WWW_TraceMask = 0; /* Global trace flag for ALL W3 code */
#define VC "2.14" #define VC "2.14"
#endif /* !VC */ #endif /* !VC */
#ifdef _WINDOWS
const char *HTLibraryVersion = "2.14FM"; /* String for help screen etc */
#else
const char *HTLibraryVersion = VC; /* String for help screen etc */ const char *HTLibraryVersion = VC; /* String for help screen etc */
#endif
/* /*
* strcasecomp8 is a variant of strcasecomp (below) * strcasecomp8 is a variant of strcasecomp (below)
...@@ -619,6 +614,46 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr, ...@@ -619,6 +614,46 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr,
const char *fmt, const char *fmt,
va_list * ap) va_list * ap)
{ {
#ifdef HAVE_VASPRINTF
/*
* Use vasprintf() if we have it, since it is simplest.
*/
char *result = 0;
char *temp = 0;
/* discard old destination if no length was given */
if (pstr && !dst_len) {
if (*pstr)
FREE(*pstr);
}
if (vasprintf(&temp, fmt, *ap) >= 0) {
if (dst_len != 0) {
int src_len = strlen(temp);
int new_len = dst_len + src_len + 1;
result = HTAlloc(pstr ? *pstr : 0, new_len);
if (result != 0) {
strcpy(result + dst_len, temp);
mark_malloced(temp, new_len);
}
free(temp);
} else {
result = temp;
mark_malloced(temp, strlen(temp));
}
}
if (pstr != 0)
*pstr = result;
return result;
#else /* !HAVE_VASPRINTF */
/*
* If vasprintf() is not available, this works - but does not implement
* the POSIX '$' formatting character which may be used in some of the
* ".po" files.
*/
#ifdef SAVE_TIME_NOT_SPACE #ifdef SAVE_TIME_NOT_SPACE
static size_t tmp_len = 0; static size_t tmp_len = 0;
static size_t fmt_len = 0; static size_t fmt_len = 0;
...@@ -634,20 +669,9 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr, ...@@ -634,20 +669,9 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr,
char *dst_ptr = *pstr; char *dst_ptr = *pstr;
const char *format = fmt; const char *format = fmt;
if (fmt == 0 || *fmt == '\0') if (isEmpty(fmt))
return 0; return 0;
#ifdef USE_VASPRINTF
if (pstr && !dst_len) {
if (*pstr)
FREE(*pstr);
if (vasprintf(pstr, fmt, *ap) >= 0) {
mark_malloced(*pstr, strlen(*pstr) + 1);
return (*pstr);
}
}
#endif /* USE_VASPRINTF */
need = strlen(fmt) + 1; need = strlen(fmt) + 1;
#ifdef SAVE_TIME_NOT_SPACE #ifdef SAVE_TIME_NOT_SPACE
if (!fmt_ptr || fmt_len < need * NUM_WIDTH) { if (!fmt_ptr || fmt_len < need * NUM_WIDTH) {
...@@ -848,6 +872,7 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr, ...@@ -848,6 +872,7 @@ PUBLIC_IF_FIND_LEAKS char *StrAllocVsprintf(char **pstr,
if (pstr) if (pstr)
*pstr = dst_ptr; *pstr = dst_ptr;
return (dst_ptr); return (dst_ptr);
#endif /* HAVE_VASPRINTF */
} }
#undef SAVE_TIME_NOT_SPACE #undef SAVE_TIME_NOT_SPACE
...@@ -895,16 +920,7 @@ char *HTSprintf0(char **pstr, const char *fmt,...) ...@@ -895,16 +920,7 @@ char *HTSprintf0(char **pstr, const char *fmt,...)
LYva_start(ap, fmt); LYva_start(ap, fmt);
{ {
#ifdef USE_VASPRINTF result = StrAllocVsprintf(pstr, 0, fmt, &ap);
if (pstr) {
if (*pstr)
FREE(*pstr);
if (vasprintf(pstr, fmt, ap) >= 0) /* else call outofmem?? */
mark_malloced(*pstr, strlen(*pstr) + 1);
result = *pstr;
} else
#endif /* USE_VASPRINTF */
result = StrAllocVsprintf(pstr, 0, fmt, &ap);
} }
va_end(ap); va_end(ap);
......
/* /*
* $LynxId: HTTP.c,v 1.87 2007/07/03 00:20:33 tom Exp $ * $LynxId: HTTP.c,v 1.91 2008/02/17 19:36:08 Zdenek.Prikryl Exp $
* *
* HyperText Tranfer Protocol - Client implementation HTTP.c * HyperText Tranfer Protocol - Client implementation HTTP.c
* ========================== * ==========================
...@@ -79,6 +79,16 @@ static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx GCC_UNUSED) ...@@ -79,6 +79,16 @@ static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx GCC_UNUSED)
char *msg = NULL; char *msg = NULL;
int result = 1; int result = 1;
#ifdef USE_X509_SUPPORT
HTSprintf0(&msg,
gettext("SSL callback:%s, preverify_ok=%d, ssl_okay=%d"),
X509_verify_cert_error_string(X509_STORE_CTX_get_error(x509_ctx)),
preverify_ok, ssl_okay);
_HTProgress(msg);
FREE(msg);
#endif
#ifndef USE_NSS_COMPAT_INCL
if (!(preverify_ok || ssl_okay || ssl_noprompt)) { if (!(preverify_ok || ssl_okay || ssl_noprompt)) {
#ifdef USE_X509_SUPPORT #ifdef USE_X509_SUPPORT
HTSprintf0(&msg, SSL_FORCED_PROMPT, HTSprintf0(&msg, SSL_FORCED_PROMPT,
...@@ -91,6 +101,7 @@ static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx GCC_UNUSED) ...@@ -91,6 +101,7 @@ static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx GCC_UNUSED)
FREE(msg); FREE(msg);
} }
#endif
return result; return result;
} }
...@@ -119,6 +130,13 @@ SSL *HTGetSSLHandle(void) ...@@ -119,6 +130,13 @@ SSL *HTGetSSLHandle(void)
CTRACE((tfp, CTRACE((tfp,
"HTGetSSLHandle: certfile is set to %s by SSL_CERT_FILE\n", "HTGetSSLHandle: certfile is set to %s by SSL_CERT_FILE\n",
certfile)); certfile));
} else {
if (non_empty(SSL_cert_file)) {
certfile = SSL_cert_file;
CTRACE((tfp,
"HTGetSSLHandle: certfile is set to %s by config SSL_CERT_FILE\n",
certfile));
}
} }
#endif #endif
atexit(free_ssl_ctx); atexit(free_ssl_ctx);
...@@ -432,7 +450,7 @@ static BOOL acceptEncoding(int code) ...@@ -432,7 +450,7 @@ static BOOL acceptEncoding(int code)
} }
#ifdef USE_SSL #ifdef USE_SSL
static void show_cert_issuer(X509 * peer_cert) static void show_cert_issuer(X509 * peer_cert GCC_UNUSED)
{ {
#if defined(USE_OPENSSL_INCL) #if defined(USE_OPENSSL_INCL)
char ssl_dn[1024]; char ssl_dn[1024];
...@@ -637,8 +655,10 @@ static int HTLoadHTTP(const char *arg, ...@@ -637,8 +655,10 @@ static int HTLoadHTTP(const char *arg,
SSL_handle = handle = HTGetSSLHandle(); SSL_handle = handle = HTGetSSLHandle();
SSL_set_fd(handle, s); SSL_set_fd(handle, s);
#if SSLEAY_VERSION_NUMBER >= 0x0900 #if SSLEAY_VERSION_NUMBER >= 0x0900
#ifndef USE_NSS_COMPAT_INCL
if (!try_tls) if (!try_tls)
handle->options |= SSL_OP_NO_TLSv1; handle->options |= SSL_OP_NO_TLSv1;
#endif
#endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */ #endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
HTSSLInitPRNG(); HTSSLInitPRNG();
status = SSL_connect(handle); status = SSL_connect(handle);
...@@ -807,6 +827,42 @@ static int HTLoadHTTP(const char *arg, ...@@ -807,6 +827,42 @@ static int HTLoadHTTP(const char *arg,
} }
/* check the X.509v3 Subject Alternative Name */ /* check the X.509v3 Subject Alternative Name */
#ifdef USE_GNUTLS_INCL
if (status_sslcertcheck < 2) {
int i;
size_t size;
gnutls_x509_crt cert;
static char buf[2048];
/* import the certificate to the x509_crt format */
if (gnutls_x509_crt_init(&cert) == 0) {
if (gnutls_x509_crt_import(cert, peer_cert,
GNUTLS_X509_FMT_DER) < 0) {
gnutls_x509_crt_deinit(cert);
goto done;
}
ret = 0;
for (i = 0; !(ret < 0); i++) {
size = sizeof(buf);
ret = gnutls_x509_crt_get_subject_alt_name(cert, i, buf,
&size, NULL);
if (strcasecomp_asterisk(ssl_host, buf) == 0) {
status_sslcertcheck = 2;
HTSprintf0(&msg,
gettext("Verified connection to %s (subj=%s)"),
ssl_host, buf);
_HTProgress(msg);
FREE(msg);
break;
}
}
}
}
#endif
#ifdef USE_OPENSSL_INCL #ifdef USE_OPENSSL_INCL
if (status_sslcertcheck < 2) { if (status_sslcertcheck < 2) {
STACK_OF(GENERAL_NAME) * gens; STACK_OF(GENERAL_NAME) * gens;
......
/* /*
* $LynxId: HTUtils.h,v 1.77 2007/07/01 15:30:33 tom Exp $ * $LynxId: HTUtils.h,v 1.78 2008/02/17 19:36:08 Zdenek.Prikryl Exp $
* *
* Utility macros for the W3 code library * Utility macros for the W3 code library
* MACROS FOR GENERAL USE * MACROS FOR GENERAL USE
...@@ -602,6 +602,7 @@ extern int WWW_TraceMask; ...@@ -602,6 +602,7 @@ extern int WWW_TraceMask;
#define SHORTENED_RBIND /* FIXME: do this in configure-script */ #define SHORTENED_RBIND /* FIXME: do this in configure-script */
#ifdef USE_SSL #ifdef USE_SSL
#define free_func free__func #define free_func free__func
#ifdef USE_OPENSSL_INCL #ifdef USE_OPENSSL_INCL
...@@ -621,6 +622,10 @@ extern int WWW_TraceMask; ...@@ -621,6 +622,10 @@ extern int WWW_TraceMask;
#ifndef SSL_VERIFY_PEER #ifndef SSL_VERIFY_PEER
#define SSL_VERIFY_PEER 0x01 #define SSL_VERIFY_PEER 0x01
#endif #endif
#else
#ifdef USE_NSS_COMPAT_INCL
#include <nss_compat_ossl/nss_compat_ossl.h>
#else /* assume SSLeay */ #else /* assume SSLeay */
#include <ssl.h> #include <ssl.h>
...@@ -628,10 +633,10 @@ extern int WWW_TraceMask; ...@@ -628,10 +633,10 @@ extern int WWW_TraceMask;
#include <rand.h> #include <rand.h>
#include <err.h> #include <err.h>
#endif #endif
#endif
#endif /* USE_OPENSSL_INCL */ #endif /* USE_OPENSSL_INCL */
#undef free_func #undef free_func
#endif /* USE_SSL */ #endif /* USE_SSL */
#ifdef HAVE_LIBDMALLOC #ifdef HAVE_LIBDMALLOC
......
dnl $LynxId: aclocal.m4,v 1.121 2007/07/30 23:23:37 tom Exp $ dnl $LynxId: aclocal.m4,v 1.123 2008/02/17 19:40:15 tom Exp $
dnl Macros for auto-configure script. dnl Macros for auto-configure script.
dnl by T.E.Dickey <dickey@invisible-island.net> dnl by T.E.Dickey <dickey@invisible-island.net>
dnl and Jim Spath <jspath@mail.bcpl.lib.md.us> dnl and Jim Spath <jspath@mail.bcpl.lib.md.us>
dnl and Philippe De Muyter <phdm@macqel.be> dnl and Philippe De Muyter <phdm@macqel.be>
dnl dnl
dnl Created: 1997/1/28 dnl Created: 1997/1/28
dnl Updated: 2007/07/27 dnl Updated: 2008/02/17
dnl dnl
dnl The autoconf used in Lynx development is GNU autoconf 2.13 or 2.52, patched dnl The autoconf used in Lynx development is GNU autoconf 2.13 or 2.52, patched
dnl by Thomas Dickey. See your local GNU archives, and this URL: dnl by Thomas Dickey. See your local GNU archives, and this URL:
...@@ -698,7 +698,7 @@ AC_SUBST(EXTRA_CPPFLAGS) ...@@ -698,7 +698,7 @@ AC_SUBST(EXTRA_CPPFLAGS)
])dnl ])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl CF_ADD_INCDIR version: 8 updated: 2007/07/30 19:22:58 dnl CF_ADD_INCDIR version: 9 updated: 2008/02/09 13:15:34
dnl ------------- dnl -------------
dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
dnl redundant. We don't normally need to add -I/usr/local/include for gcc, dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
...@@ -740,7 +740,7 @@ if test -n "$1" ; then ...@@ -740,7 +740,7 @@ if test -n "$1" ; then
fi fi
if test "$cf_have_incdir" = no ; then if test "$cf_have_incdir" = no ; then
AC_VERBOSE(adding $cf_add_incdir to include-path) CF_VERBOSE(adding $cf_add_incdir to include-path)
ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)" ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"
cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`