Commit a7ec6c82 authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 2.8.9dev7

parent a607aec1
......@@ -270,9 +270,10 @@ Using `gettext' in new packages
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course the GNU Public License applies to your sources from
then if you include `gettext' directly in your distribution on but
since you are writing free software anyway this is no restriction.
package. Of course the GNU General Public License applies to your
sources from then if you include `gettext' directly in your distribution
on but since you are writing free software anyway this is no
restriction.
Once the sources are change appropriately and the setup can handle to
use of `gettext' the only thing missing are the translations. The Free
......
-- $LynxId: CHANGES,v 1.797 2015/05/07 00:18:31 tom Exp $
-- $LynxId: CHANGES,v 1.834 2015/12/18 10:24:31 tom Exp $
===============================================================================
Changes since Lynx 2.8 release
===============================================================================
2015-12-18 (2.8.9dev.7)
* make the HTTP version configurable, defaulting to "1.0" (HTTP/1.0) as
HTTP_PROTOCOL, and make it changeable in the options menu -TD
* switch HTTP version to 1.1, adding an explicit "close" to work around
the pitfall of persistent connections. This is to work around a selective
reading of RFC 2068 by duckduckgo.com - see
http://lists.nongnu.org/archive/html/lynx-dev/2015-12/index.html
-Axel Beckert
* fix a potential null dereference in tidy_tls.c reported by Coverity -TD
* extend advanced mode by showing field names in forms in the status line
(suggested by TG) -TD
* fix some typos found by lintian -Axel Beckert
* correct buffer size in pretty_html() function of LYKeymap.c -TG
* add support for some HTML5 elements -Kihara Hideto
Using this change, you can jump to <section id="speakers">.
(The addition in src{0,1}_HTMLDTD.txt is copied from DIV.)
<section>, <article>, <main>, <aside>, <header>, <footer>, <nav>, <figure>
* improve configure check for extended curses functions, needed for compiling
with ncursesw on OSX, in particular when configuring with ncurses6 (report
by Tom Wyant) -TD
* set SSL_MODE_AUTO_RETRY in OpenSSL configuration, completing work needed for
Debian #707059 -TD
* correct description used for "K" vs "k" key binding in manpage -TD
* adopt some of the patches from Debian lynx package:
+ add Delete key usage to manpage (patch by Denis Briand, Debian #74358)
+ add $(LDFLAGS) when building makeuctb (patch by Atsuhito Kohda).
+ add NO_BUILDSTAMP symbol to appease
https://wiki.debian.org/ReproducibleBuilds/TimestampsFromCPPMacros
+ add -n option to gzip when making gzip'd helpfiles (patch by Andreas
Metzler).
+ add support for client certificates (patch by Simon Kainz, Debian #797901).
* use POSIX locale when sorting entries in cfg_defs.h (patch by Reiner Hermann,
Debian #792770).
* move homepage for Lynx from
http://lynx.isc.org
to
http://lynx.invisible-island.net
because ISC has ended support -TD
* change "GNU Public License" to "GNU General Public License" for consistency
(report by Axel Beckert) -TD
* free a use-after-free in scan_cookie_sublist (Redhat #1120925) -TG
* updates for configure macros from ncurses and xterm -TD
* fix for gnutls logic to support rehandshake on negotiation for optional
client certificate, e.g., for https://contributors.debian.org (patch by
Simon Kainz, Debian #797059).
* update ca.po, sv.po, et.po from
http://translationproject.org/latest/lynx
* use gnutls_set_default_priority() to simplify algorithm priorities in the
gnutls configuration as well as track occassional changes in that library
(patch by Andreas Metzler, Debian #789189, Debian #784430).
* correct logic in LYsetRcValue() from 2.8.8dev.13, which would free the wrong
pointer if the input had leading blanks (patch by Ruda Moura).
* fix CF_CHECK_SIZEOF autoconf macro to work when its working variables have
been preset to an empty value (report by Andrew Arensburger) -TD
* update config.guess (2015-10-21), config.sub (2015-08-20)
2015-05-06 (2.8.9dev.6)
* add a note about OCSP to url-support documentation (Debian #745835) -TD
* change defaults for SSL prompts when a problem is detected to "no" (Debian
......@@ -16,7 +72,7 @@ Changes since Lynx 2.8 release
* modify configure script to accept a release-number for the ncurses/ncursesw
values of the "--with-screen" option, e.g., "--with-screen=ncursesw6" -TD
* cosmetic fixes for autoconf macros to avoid vi-workaround -TD
* da.po, et.po, fr.po, nl.po, vi.po from
* update da.po, et.po, fr.po, nl.po, vi.po from
http://translationproject.org/latest/lynx
* regenerated lynx.pot, sent to translation project -TD
* update config.guess (2015-03-04), config.sub (2015-03-08)
......@@ -138,7 +194,7 @@ Changes since Lynx 2.8 release
2014-02-04 (2.8.8pre.4)
* modify the LOCALE_CHARSET feature to provide a default value for the
ASSUMED_CHARSET feature aka "display-charset" (Debian #737416) -TD
ASSUME_CHARSET feature aka "display-charset" (Debian #737416) -TD
* fix two bugs in print-to-file from 2.8.8dev.10 changes -TD
+ suggested filename suffix for text/html was ".html" rather than ".txt"
+ using ^U to clear the filename to print to did not cancel the prompt
......@@ -4218,7 +4274,7 @@ recently, FreeBSD 4.1, NetBSD 1.5 and OpenBSD 2.8 (curses/ncurses).
not needed or wanted) -Victor Schneider
* fix Debian bug #65151: "<> in javascript causes premature </script>"
(reported by H Nanosecond <aldomel@ix.netcom.com>) -KW
* replaced all occurences of 'black' with 'default' in /samples/mild-colors.lss
* replaced all occurrences of 'black' with 'default' in /samples/mild-colors.lss
to make it more reasonable on terminals with non-black background -VH
* modify color-style initialization to avoid passing -1's as attribute codes
which would happen if the lynx.lss file was not found, or if not all styles
......
......@@ -6,9 +6,9 @@ override the guidelines given in the COPYING file.
Most of the content of the Lynx release (and corresponding copyright) is
the work of developers on the lynx-dev mailing list, who have agreed to
distribute their work under the terms and conditions of the GNU Public
License (Version 2). Note that the License text after the terms and
conditions is advisory in nature, and contains neither terms nor
distribute their work under the terms and conditions of the GNU General
Public License (Version 2). Note that the License text after the terms
and conditions is advisory in nature, and contains neither terms nor
conditions. You may choose to follow that advice.
The copyright owners and developers for Lynx grant their express
......@@ -80,5 +80,5 @@ For reference, below is the original copyright notice for Lynx (2.4.2).
*/
------------------------------------------------------------------------------
-- vile:txtmode fc=72 noti
-- $LynxId: COPYHEADER,v 1.12 2015/01/02 12:26:47 tom Exp $
-- $LynxId: COPYHEADER,v 1.13 2015/10/02 11:12:57 tom Exp $
------------------------------------------------------------------------------
......@@ -934,7 +934,8 @@ Simplified:
----------
Sources:
Download the current sources (choose a zip-file) from http://lynx.isc.org
Download the current sources (choose a zip-file) from
http://lynx.invisible-island.net/
and unzip them into a directory where you will build Lynx.
Compiler:
......@@ -1466,4 +1467,4 @@ VIII. Acknowledgment
-- 1999/04/24 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp>
-- vile:txtmode
-- $LynxId: INSTALLATION,v 1.124 2015/04/23 09:22:32 tom Exp $
-- $LynxId: INSTALLATION,v 1.126 2015/09/19 17:40:20 tom Exp $
/*
* $LynxId: LYMessages_en.h,v 1.74 2013/10/19 13:02:24 tom Exp $
* $LynxId: LYMessages_en.h,v 1.79 2015/12/15 01:35:44 tom Exp $
*
* Lynx - Hypertext navigation system
*
* Copyright 1997-2013 Thomas E. Dickey
* Copyright 1997-2015 Thomas E. Dickey
* Copyright 1992, 1993, 1994 University of Kansas
* Released 1995 using GNU General Public License
*/
......@@ -53,10 +53,16 @@
/* Forms messages */
#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
/* Inactive input fields, messages used with -tna option - kw */
#define FORM_LINK_TEXT_ADV_MSG_INA \
gettext("(Textfield \"%s\") Inactive. Press <return> to activate.")
#define FORM_LINK_TEXT_MESSAGE_INA \
gettext("(Text entry field) Inactive. Press <return> to activate.")
#define FORM_LINK_TEXTAREA_ADV_MSG_INA \
gettext("(Textarea \"%s\") Inactive. Press <return> to activate.")
#define FORM_LINK_TEXTAREA_MESSAGE_INA \
gettext("(Textarea) Inactive. Press <return> to activate.")
#define FORM_LINK_TEXTAREA_ADV_MSG_INA_E \
gettext("(Textarea \"%s\") Inactive. Press <return> to activate (%s for editor).")
#define FORM_LINK_TEXTAREA_MESSAGE_INA_E \
gettext("(Textarea) Inactive. Press <return> to activate (%s for editor).")
#define FORM_LINK_TEXT_SUBMIT_MESSAGE_INA \
......@@ -74,10 +80,16 @@
gettext("UNMODIFIABLE file entry field. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_FILE_MESSAGE \
gettext("(File entry field) Enter filename. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_TEXT_ADV_MSG \
gettext("(Textfield \"%s\") Enter text. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_TEXT_MESSAGE \
gettext("(Text entry field) Enter text. Use UP or DOWN arrows or tab to move off.")
gettext("(Textfield \"%s\") Enter text. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_TEXTAREA_ADV_MSG \
gettext("(Textarea \"%s\") Enter text. Use UP/DOWN arrows or TAB to move off.")
#define FORM_LINK_TEXTAREA_MESSAGE \
gettext("(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off.")
#define FORM_LINK_TEXTAREA_ADV_MSG_E \
gettext("(Textarea \"%s\") Enter text. Use UP/DOWN arrows or TAB to move off (%s for editor).")
#define FORM_LINK_TEXTAREA_MESSAGE_E \
gettext("(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off (%s for editor).")
#define FORM_LINK_TEXT_UNM_MSG \
......@@ -98,10 +110,14 @@
gettext("(Password entry field) Enter text. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_PASSWORD_UNM_MSG \
gettext("UNMODIFIABLE form password. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_CHECKBOX_ADV_MSG \
gettext("(Checkbox \"%s\") Use right-arrow or <return> to toggle.")
#define FORM_LINK_CHECKBOX_MESSAGE \
gettext("(Checkbox Field) Use right-arrow or <return> to toggle.")
#define FORM_LINK_CHECKBOX_UNM_MSG \
gettext("UNMODIFIABLE form checkbox. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_RADIO_ADV_MSG \
gettext("(Radio Button \"%s\") Use right-arrow or <return> to toggle.")
#define FORM_LINK_RADIO_MESSAGE \
gettext("(Radio Button) Use right-arrow or <return> to toggle.")
#define FORM_LINK_RADIO_UNM_MSG \
......@@ -128,12 +144,20 @@
gettext("DISABLED form reset button. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_BUTTON_MESSAGE \
gettext("(Script button) Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_BUTTON_ADV_MSG \
gettext("(Script button \"%s\") Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_BUTTON_DIS_MSG \
gettext("DISABLED Script button. Use UP or DOWN arrows or tab to move off.")
#define FORM_LINK_OPTION_LIST_ADV_MSG \
gettext("(Option list \"%s\") Hit return to select option.")
#define FORM_LINK_OPTION_LIST_MESSAGE \
gettext("(Option list) Hit return and use arrow keys and return to select option.")
#define CHOICE_LIST_ADV_MSG \
gettext("(Choice entry \"%s\") Use arrow keys and return to select option.")
#define CHOICE_LIST_MESSAGE \
gettext("(Choice list) Hit return and use arrow keys and return to select option.")
#define MOUSE_CHOICE_MESSAGE \
gettext("Left mouse button or return to select, arrow keys to scroll.")
#define FORM_LINK_OPTION_LIST_UNM_MSG \
gettext("UNMODIFIABLE option list. Use return or arrow keys to review or leave.")
#define CHOICE_LIST_UNM_MSG \
......
lynx-dev (2.8.9dev.6) unstable; urgency=low
lynx-dev (2.8.9dev.7) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 14 Apr 2015 20:19:14 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 May 2015 11:06:15 -0400
lynx-dev (2.8.8dev.16) unstable; urgency=high
......
......@@ -2,7 +2,7 @@ Source: lynx-dev
Section: web
Priority: extra
Maintainer: Thomas E. Dickey <dickey@invisible-island.net>
Homepage: http://lynx.isc.org/
Homepage: http://invisible-island.net/lynx/
Build-Depends: debhelper (>= 7), dpatch, po-debconf, libncursesw5-dev, zlib1g-dev, gettext, libgnutls-dev, sharutils, telnet, openssh-client, libbsd-dev, libidn11-dev
Standards-Version: 3.8.2
......
Upstream source http://lynx.isc.org/current/
Upstream source http://lynx.invisible-island.net/current/
Current maintainer: Thomas Dickey <dickey@invisible-island.net>
......@@ -6,9 +6,9 @@ Current maintainer: Thomas Dickey <dickey@invisible-island.net>
Most of the content of the lynx release (and corresponding copyright) is
the work of developers on the lynx-dev mailing list, who have agreed to
distribute their work under the terms and conditions of the GNU Public
License (Version 2). Note that the License text after the terms and
conditions is advisory in nature, and contains neither terms nor
distribute their work under the terms and conditions of the GNU General
Public License (Version 2). Note that the License text after the terms
and conditions is advisory in nature, and contains neither terms nor
conditions. You may choose to follow that advice.
Any licensing questions should be directed to the mailing list:
......@@ -46,7 +46,7 @@ For reference, below is the original copyright notice for Lynx (2.4.2).
-------------------------------------------------------------------------------
Files: aclocal.m4
Licence: other-BSD
License: other-BSD
Copyright: 1997-2014,2015 by Thomas E. Dickey
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
......@@ -67,7 +67,7 @@ Copyright: 1997-2014,2015 by Thomas E. Dickey
Files: install-sh
Copyright: 1994 X Consortium
Licence: other-BSD
License: other-BSD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
......@@ -102,7 +102,7 @@ Licence: other-BSD
Files: debian/*
Copyright: 2010-2014,2015 Thomas E. Dickey
Licence: other-BSD
License: other-BSD
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
......
version=3
opts=passive ftp://lynx.isc.org/current/lynx-cur\.tgz \
opts=passive ftp://invisible-island.net/lynx/archives/lynx-cur\.tgz \
debian uupdate
; $LynxId: lynx.nsi,v 1.24 2015/04/15 00:19:14 tom Exp $
; $LynxId: lynx.nsi,v 1.26 2015/09/17 22:43:49 tom Exp $
; Script originally generated with the Venis Install Wizard, but customized.
; The Inno Setup script is preferred; but this can be built via cross-compiling.
......@@ -9,8 +9,8 @@
!define VERSION_EPOCH "2"
!define VERSION_MAJOR "8"
!define VERSION_MINOR "9"
!define VERSION_LEVEL "1006"
!define VERSION_PATCH "dev.6"
!define VERSION_LEVEL "1007"
!define VERSION_PATCH "dev.7"
!define SUBKEY "Lynx"
......@@ -27,7 +27,7 @@ CRCCheck on
SetCompressor /SOLID lzma
VIAddVersionKey ProductName "${SUBKEY}"
VIAddVersionKey CompanyName "http://lynx.isc.org"
VIAddVersionKey CompanyName "http://invisible-island.net/lynx"
VIAddVersionKey LegalCopyright " 1997-2014,2015, Thomas E. Dickey"
VIAddVersionKey FileDescription "Lynx Installer (MinGW)"
VIAddVersionKey FileVersion "${VERSION}"
......
# $LynxId: lynx.spec,v 1.32 2015/05/04 10:37:30 tom Exp $
# $LynxId: lynx.spec,v 1.34 2015/09/17 22:43:49 tom Exp $
Summary: A text-based Web browser
Name: lynx
Version: 2.8.9
Release: dev.6
Release: dev.7
License: GPLv2
Group: Applications/Internet
Source: lynx%{version}%{release}.tgz
# URL: http://lynx.isc.org/
# URL: http://invisible-island.net/lynx/
Provides: webclient
Provides: text-www-browser
# BuildRequires: openssl-devel, pkgconfig, ncurses-devel >= 5.3-5,
......
; version used for Inno Setup files.
; $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$
#define LYNX_VERSION "2.8.9dev.6"
#define LYNX_VERSION "2.8.9dev.7"
; most-recent full release and target
#define LYNX_RELEASE "2.8.9"
......@@ -10,5 +10,5 @@
#define MyAppProg "Lynx"
#define MyAppName "Lynx - web browser"
#define MyAppPublisher "Thomas E Dickey"
#define MyAppURL "http://lynx.isc.org"
#define MyAppURL "http://invisible-island.net/lynx"
#define MyAppVerName "Lynx " + LYNX_VERSION
......@@ -10,7 +10,7 @@ To use this package, you need a compiler & a bit of experience
at very simple programming. If you just want something which will work
`out-of-the-box', you can get pre-compiled versions of Lynx
by following the links from
<URL: http://lynx.isc.org/> ;
<URL: http://lynx.invisible-island.net/resources.html/> ;
For DOS or Windows, go to
<URL: http://www.fdisk.com/doslynx/lynxport.htm>.
......@@ -35,13 +35,13 @@ WHAT IS LYNX?
HOW TO GET LYNX
For the latest release of Lynx go to:
<URL: http://lynx.isc.org/release>;
<URL: ftp://lynx.isc.org/release>;
<URL: http://lynx.invisible-island.net/release>;
<URL: ftp://invisible-island.net/lynx/tarballs>;
The latest development version is at:
<URL: http://lynx.isc.org/current>.
<URL: http://lynx.invisible-island.net/current/>.
The Lynx homepage is <URL: http://lynx.isc.org/>.
The Lynx homepage is <URL: http://lynx.invisible-island.net/>.
The on-line help page (enter `h') has links to many useful things.
LICENSE
......@@ -150,5 +150,5 @@ LYNX-DEV MAILING LIST
------------------------------------------------------------------------------
-- vile:txtmode fc=72 noti
-- $LynxId: README,v 1.30 2014/02/13 13:25:42 tom Exp $
-- $LynxId: README,v 1.32 2015/09/19 17:36:28 tom Exp $
------------------------------------------------------------------------------
/*
* $LynxId: HTGopher.c,v 1.61 2013/11/28 11:12:32 tom Exp $
* $LynxId: HTGopher.c,v 1.62 2015/12/16 01:17:53 tom Exp $
*
* GOPHER ACCESS HTGopher.c
* =============
......@@ -1227,7 +1227,7 @@ static int generate_cso_report(HTStream *Target)
char line[BIG];
char *buf = 0;
char *p = line, *href = NULL;
int len, i, prev_ndx, ndx;
int i, prev_ndx, ndx;
char *rcode, *ndx_str, *fname, *fvalue, *l;
CSOfield_info *fld;
BOOL stop = FALSE;
......@@ -1263,16 +1263,14 @@ static int generate_cso_report(HTStream *Target)
}
rcode = (p[0] == '-') ? &p[1] : p;
ndx_str = fname = NULL;
len = (int) strlen(p);
for (i = 0; i < len; i++) {
for (i = 0; p[i] != '\0'; i++) {
if (p[i] == ':') {
p[i] = '\0';
if (!ndx_str) {
fname = ndx_str = &p[i + 1];
} else {
fname = &p[i + 1];
fname = &p[i + 1];
if (ndx_str) {
break;
}
ndx_str = fname;
}
}
if (ndx_str) {
......
/*
* $LynxId: HTMIME.c,v 1.89 2014/07/24 22:08:24 tom Exp $
* $LynxId: HTMIME.c,v 1.90 2015/12/16 01:13:50 tom Exp $
*
* MIME Message Parse HTMIME.c
* ==================
......@@ -2449,7 +2449,7 @@ void HTmmdecode(char **target,
HTmmdec_base64(&m2buf, mmbuf);
else
HTmmdec_quote(&m2buf, mmbuf);
for (t = m2buf; *t;)
for (t = m2buf; non_empty(t);)
*u++ = *t++;
HTmmcont = 1;
} else {
......
/*
* $LynxId: HTTP.c,v 1.142 2015/05/06 23:34:07 tom Exp $
* $LynxId: HTTP.c,v 1.150 2015/12/18 01:20:22 tom Exp $
*
* HyperText Tranfer Protocol - Client implementation HTTP.c
* ==========================
......@@ -17,8 +17,6 @@
#include <HTNews.h>
#endif
#define HTTP_VERSION "HTTP/1.0"
#define HTTP_PORT 80
#define HTTPS_PORT 443
#define SNEWS_PORT 563
......@@ -161,7 +159,9 @@ static int HTSSLCallback(int preverify_ok, X509_STORE_CTX * x509_ctx GCC_UNUSED)
SSL *HTGetSSLHandle(void)
{
#ifdef USE_GNUTLS_INCL
static char *certfile = NULL;
char *certfile = NULL;
char *client_keyfile = NULL;
char *client_certfile = NULL;
#endif
if (ssl_ctx == NULL) {
......@@ -182,6 +182,9 @@ SSL *HTGetSSLHandle(void)
#ifdef SSL_OP_NO_COMPRESSION
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_COMPRESSION);
#endif
#ifdef SSL_MODE_AUTO_RETRY
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_AUTO_RETRY);
#endif
#ifdef SSL_MODE_RELEASE_BUFFERS
SSL_CTX_set_mode(ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
#endif
......@@ -227,8 +230,26 @@ SSL *HTGetSSLHandle(void)
atexit(free_ssl_ctx);
}
#ifdef USE_GNUTLS_INCL
if (non_empty(SSL_client_key_file)) {
client_keyfile = SSL_client_key_file;
CTRACE((tfp,
"HTGetSSLHandle: client key file is set to %s by config SSL_CLIENT_KEY_FILE\n",
client_keyfile));
}
if (non_empty(SSL_client_cert_file)) {
client_certfile = SSL_client_cert_file;
CTRACE((tfp,
"HTGetSSLHandle: client cert file is set to %s by config SSL_CLIENT_CERT_FILE\n",
client_certfile));
}
ssl_ctx->certfile = certfile;
ssl_ctx->certfile_type = GNUTLS_X509_FMT_PEM;
ssl_ctx->client_keyfile = client_keyfile;
ssl_ctx->client_keyfile_type = GNUTLS_X509_FMT_PEM;
ssl_ctx->client_certfile = client_certfile;
ssl_ctx->client_certfile_type = GNUTLS_X509_FMT_PEM;
#endif
ssl_okay = 0;
return (SSL_new(ssl_ctx));
......@@ -654,7 +675,7 @@ static int HTLoadHTTP(const char *arg,
unsigned tls_status;
#endif
#if SSLEAY_VERSION_NUMBER >= 0x0900
#if (SSLEAY_VERSION_NUMBER >= 0x0900) && !defined(USE_GNUTLS_FUNCS)
BOOL try_tls = TRUE;
#endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
SSL_handle = NULL;
......@@ -780,28 +801,33 @@ static int HTLoadHTTP(const char *arg,
#ifndef USE_NSS_COMPAT_INCL
if (!try_tls) {
handle->options |= SSL_OP_NO_TLSv1;
CTRACE((tfp, "...adding SSL_OP_NO_TLSv1\n"));
}
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
} else {
else {
int ret = (int) SSL_set_tlsext_host_name(handle, ssl_host);
CTRACE((tfp, "...called SSL_set_tlsext_host_name(%s) ->%d\n",
ssl_host, ret));
#endif
}
#endif
#endif
#endif /* SSLEAY_VERSION_NUMBER >= 0x0900 */
HTSSLInitPRNG();
status = SSL_connect(handle);
if (status <= 0) {
#if SSLEAY_VERSION_NUMBER >= 0x0900
#if (SSLEAY_VERSION_NUMBER >= 0x0900)
#if !defined(USE_GNUTLS_FUNCS)
if (try_tls) {
_HTProgress(gettext("Retrying connection without TLS."));
try_tls = FALSE;
if (did_connect)
HTTP_NETCLOSE(s, handle);
goto try_again;
} else {
} else
#endif
{
CTRACE((tfp,
"HTTP: Unable to complete SSL handshake for '%s', SSL_connect=%d, SSL error stack dump follows\n",
url, status));
......@@ -849,9 +875,10 @@ static int HTLoadHTTP(const char *arg,
gettext("GnuTLS error when trying to verify certificate."));
} else {
type = gnutls_certificate_type_get(handle->gnutls_state);
ret = gnutls_certificate_verification_status_print(tls_status,
type, &out, 0);
SSL_single_prompt(&msg, out.data);
(void) gnutls_certificate_verification_status_print(tls_status,
type,
&out, 0);
SSL_single_prompt(&msg, (const char *) out.data);
gnutls_free(out.data);
}
#else
......@@ -887,7 +914,7 @@ static int HTLoadHTTP(const char *arg,
}
#endif
peer_cert = SSL_get_peer_certificate(handle);
peer_cert = (X509 *) SSL_get_peer_certificate(handle);
#if defined(USE_OPENSSL_INCL) || defined(USE_GNUTLS_FUNCS)
X509_NAME_oneline(X509_get_subject_name(peer_cert),
ssl_dn, (int) sizeof(ssl_dn));
......@@ -983,8 +1010,10 @@ static int HTLoadHTTP(const char *arg,
ret = 0;
for (i = 0; !(ret < 0); i++) {
size = sizeof(buf);
ret = gnutls_x509_crt_get_subject_alt_name(cert, i, buf,
&size, NULL);
ret = gnutls_x509_crt_get_subject_alt_name(cert,
(unsigned) i,
buf, &size,
NULL);
if (strcasecomp_asterisk(ssl_host, buf) == 0) {
status_sslcertcheck = 2;
......@@ -1141,7 +1170,9 @@ static int HTLoadHTTP(const char *arg,
}
if (extensions) {
BStrCat0(command, " ");
BStrCat0(command, HTTP_VERSION);
BStrCat0(command, ((HTprotocolLevel == HTTP_1_0)
? "HTTP/1.0"
: "HTTP/1.1"));
}
BStrCat0(command, crlf); /* CR LF, as in rfc 977 */
......@@ -1155,6 +1186,9 @@ static int HTLoadHTTP(const char *arg,
HTBprintf(&command, "Host: %s%c%c", host, CR, LF);
FREE(host);
}
if (HTprotocolLevel >= HTTP_1_1) {
HTBprintf(&command, "Connection: close%c%c", CR, LF);
}
if (!HTPresentations)
HTFormatInit();
......
/*
* $LynxId: dtd_util.c,v 1.76 2010/09/25 00:30:23 tom Exp $
* $LynxId: dtd_util.c,v 1.78 2015/12/13 23:22:17 tom Exp $
*
* Given a SGML_dtd structure, write a corresponding flat file, or "C" source.
* Given the flat-file, write the "C" source.
......@@ -267,6 +267,8 @@ static const char *NameOfAttrs(const SGML_dtd * dtd, int which)
/* special cases to match existing headers */
if (!strcmp(result, "ABBR"))
result = "GEN";
else if (!strcmp(result, "ARTICLE"))
result = "GEN5";
else if (!strcmp(result, "BLOCKQUOTE"))
result = "BQ";
else if (!strcmp(result, "BASEFONT"))
......@@ -1300,8 +1302,8 @@ static SGML_dtd *load_flatfile(FILE *input)
AttrType *attr_types = 0;
SGML_dtd *result = 0;
size_t n;
size_t number_of_attrs = 0;
size_t number_of_tags = 0;
int number_of_attrs = 0;
int number_of_tags = 0;
HTTag *tag;
int code;
......@@ -1309,7 +1311,7 @@ static SGML_dtd *load_flatfile(FILE *input)
if (code
&& number_of_attrs
&& (attr_types = typecallocn(AttrType, number_of_attrs + 1)) != 0) {
for (n = 0; n < number_of_attrs; ++n) {
for (n = 0; n < (size_t) number_of_attrs; ++n) {
if (!load_flat_AttrType(input, attr_types + n, n)) {
break;
}
......@@ -1320,7 +1322,7 @@ static SGML_dtd *load_flatfile(FILE *input)
if (code == 1) {
if ((result = typecalloc(SGML_dtd)) != 0
&& (result->tags = typecallocn(HTTag, (number_of_tags + 2))) != 0) {
for (n = 0; n < number_of_tags; ++n) {
for (n = 0; n < (size_t) number_of_tags; ++n) {
if (load_flat_HTTag(input, n, &(result->tags[n]), attr_types)) {
result->number_of_tags = (n + 1);
} else {
......@@ -1328,7 +1330,7 @@ static SGML_dtd *load_flatfile(FILE *input)
}
}
tag = 0;
for (n = 0; n < number_of_tags; ++n) {
for (n = 0; n < (size_t) number_of_tags; ++n) {
if (result->tags[n].name != 0
&& !strcmp(result->tags[n].name, "OBJECT")) {
tag = result->tags + number_of_tags;
......
/* $LynxId: hdr_HTMLDTD.h,v 1.22 2011/10/07 00:54:36 Kihara.Hideto Exp $ */
/* $LynxId: hdr_HTMLDTD.h,v 1.23 2015/12/13 23:08:45 Kihara.Hideto Exp $ */
#ifndef hdr_HTMLDTD_H
#define hdr_HTMLDTD_H 1
......@@ -21,6 +21,8 @@ extern "C" {
HTML_ADDRESS,
HTML_APPLET,
HTML_AREA,
HTML_ARTICLE,
HTML_ASIDE,
HTML_AU,
HTML_AUTHOR,
HTML_B,
......@@ -57,8 +59,10 @@ extern "C" {
HTML_EMBED,
HTML_FIELDSET,
HTML_FIG,
HTML_FIGURE,
HTML_FN,
HTML_FONT,
HTML_FOOTER,
HTML_FORM,
HTML_FRAME,
HTML_FRAMESET,
......@@ -69,6 +73,7 @@ extern "C" {
HTML_H5,
HTML_H6,
HTML_HEAD,
HTML_HEADER,
HTML_HR,
HTML_HTML,
HTML_HY,
......@@ -86,11 +91,13 @@ extern "C" {
HTML_LI,
HTML_LINK,
HTML_LISTING,
HTML_MAIN,
HTML_MAP,
HTML_MARQUEE,
HTML_MATH,
HTML_MENU,
HTML_META,
HTML_NAV,
HTML_NEXTID,
HTML_NOFRAMES,
HTML_NOTE,
......@@ -106,6 +113,7 @@ extern "C" {
HTML_S,
HTML_SAMP,
HTML_SCRIPT,
HTML_SECTION,
HTML_SELECT,
HTML_SHY,
HTML_SMALL,
......@@ -148,10 +156,10 @@ extern "C" {
*/
/* # of elements generally visible to Lynx code */
#define HTML_ELEMENTS 118
#define HTML_ELEMENTS 126
/* # of elements visible to SGML parser */
#define HTML_ALL_ELEMENTS 119
#define HTML_ALL_ELEMENTS 127
/*
......@@ -477,6 +485,15 @@ extern "C" {
#define HTML_GEN_TITLE 6
#define HTML_GEN_ATTRIBUTES 7
#define HTML_GEN5_CLASS 0
#define HTML_GEN5_DIR 1
#define HTML_GEN5_ID 2
#define HTML_GEN5_LANG 3
#define HTML_GEN5_ROLE 4
#define HTML_GEN5_STYLE 5
#define HTML_GEN5_TITLE 6
#define HTML_GEN5_ATTRIBUTES 7
#define HTML_H_ALIGN 0
#define HTML_H_CLASS 1
#define HTML_H_CLEAR 2
......
# $LynxId: makefile.in,v 1.31 2012/08/12 23:55:17 tom Exp $
# $LynxId: makefile.in,v 1.32 2015/12/13 23:20:11 tom Exp $
# Make WWW under unix for a.n.other unix system (bsd)
# Use this as a template
......@@ -339,41 +339,42 @@ sources: dtd_util$x src0_HTMLDTD.txt src1_HTMLDTD.txt
dtd_util$x: $(DTD_UTIL)
$(CC) $(CC_OPTS) $(LDFLAGS) -o $@ $(DTD_UTIL) $(LIBS)