Skip to content

Commit

Permalink
Merge branch 'master' into libssh-xp-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrg committed Jun 30, 2024
2 parents 77a4cef + 35b6d13 commit 21a5bf1
Show file tree
Hide file tree
Showing 25 changed files with 711 additions and 142 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
# So we're now fetching zlib from ftp.zx.net.nz instead.
ZLIB_VERSION: 1.2.13
# Expected filename: https://www.openssl.org/source/openssl-${{env.OPENSSL_VERSION}}.tar.gz
OPENSSL_VERSION: 3.0.13
OPENSSL_VERSION: 3.0.14
# Exoected filename: ${{env.LIBSSH_SOURCE}}libssh-${{env.LIBSSH_VERSION}}.tar.xz
LIBSSH_SOURCE: https://www.libssh.org/files/0.10/
LIBSSH_VERSION: 0.10.6
Expand Down Expand Up @@ -129,7 +129,6 @@ jobs:
uses: ilammy/[email protected]
with:
arch: x86
toolset: 14.3
- name: Build ckwart
run: |
call ..\..\setenv.bat
Expand Down Expand Up @@ -167,7 +166,7 @@ jobs:
toolset:
- 14.0
- 14.2
- 14.3
- 14.4
exclude:
# No point building ARM or ARM64 targets with anything less than the latest as the latest
# still supports the first ARM Windows.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Major features include:
To get the latest most stable release as well as other news and information,
visit the [C-Kermit for Windows Beta website](https://www.kermitproject.org/ckw10beta.html).
This software is currently based on C-Kermit version 10.0 Pre-Beta.11 of
6-FEB-2024 and is available under the 3-clause BSD license.
29-JUN-2024 and is available under the 3-clause BSD license.

![Screenshot](doc/screenshot-w11.png)

Expand Down
9 changes: 8 additions & 1 deletion doc/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Windows NT for MIPS computers, though without TAPI support.

### Minor Enhancements and other changes

* Upgraded to OpenSSL 3.0.13, the current long term support release
* Upgraded to OpenSSL 3.0.14, the current long term support release
(supported until 7 September 2026)
* Help text for "set gui window position" updated: this command *is* supported
and it does work.
Expand All @@ -57,6 +57,13 @@ Windows NT for MIPS computers, though without TAPI support.
* Upgraded to C-Kermit 10.0 Pre-Beta.11
* About window (Help -> About) now includes the beta number

### New features

* Implemented the DECRQCRA VT420 escape sequence which is required by esctest2.
This is disabled by default due to its security risks, but can be enabled
with `set terminal send-data on`. As C-Kermit doesn't currently have a VT420
terminal option yet, select VT320 to make use of VT420 features.

### Source Changes

* Some minor changes to support a future replacement for the dialer.
Expand Down
16 changes: 16 additions & 0 deletions kermit/k95/ck_crp.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ static char * tmpstring = NULL;
#ifdef CRYPT_DLL
int cmd_quoting = 0;

#ifdef OS2
/* Copied from ckctel.c */
char *
#ifdef CK_ANSIC
tel_unk(int opt) /* "UNKNOWN-%u" string. */
#else
tel_unk(opt) int opt;
#endif /* CK_ANSIC */
{
/* 2024-03-27 SMS. Added (decimal) value to "UNKNOWN" messages. */
static char val_str[ 20];
sprintf(val_str, "UNKNOWN-%u", opt);
return(val_str);
}
#endif /* OS2 */

#ifndef TELOPT_MACRO
int
telopt_index(opt) int opt; {
Expand Down
35 changes: 34 additions & 1 deletion kermit/k95/ck_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2684,7 +2684,11 @@ ssl_http_init(hostname) char * hostname;
#endif /* NOHTTP */

char *
#ifdef CK_ANSIC
ssl_get_dNSName(SSL *ssl)
#else
ssl_get_dNSName(ssl) SSL * ssl;
#endif /* CK_ANSIC */
{
static char *dns = NULL;
X509 *server_cert = NULL;
Expand Down Expand Up @@ -2732,7 +2736,12 @@ ssl_get_dNSName(ssl) SSL * ssl;
}

char *
ssl_get_commonName(ssl) SSL * ssl; {
#ifdef CK_ANSIC
ssl_get_commonName(SSL *ssl)
#else
ssl_get_commonName(ssl) SSL * ssl;
#endif /* CK_ANSIC */
{
static char name[256];
int name_text_len;
int err;
Expand Down Expand Up @@ -2761,7 +2770,11 @@ ssl_get_commonName(ssl) SSL * ssl; {
}

char *
#ifdef CK_ANSIC
ssl_get_issuer_name(SSL *ssl)
#else
ssl_get_issuer_name(ssl) SSL * ssl;
#endif /* CK_ANSIC */
{
static char name[256];
X509 *server_cert;
Expand All @@ -2781,7 +2794,11 @@ ssl_get_issuer_name(ssl) SSL * ssl;
}

char *
#ifdef CK_ANSIC
ssl_get_subject_name(SSL *ssl)
#else
ssl_get_subject_name(ssl) SSL * ssl;
#endif /* CK_ANSIC */
{
static char name[256];
X509 *server_cert;
Expand Down Expand Up @@ -3030,7 +3047,11 @@ ssl_verify_crl(int ok, X509_STORE_CTX *ctx)
}

char *
#ifdef CK_ANSIC
tls_userid_from_client_cert(SSL *ssl)
#else
tls_userid_from_client_cert(ssl) SSL * ssl;
#endif /* CK_ANSIC */
{
/* DavidG 2022-09-05: On Windows and OS/2, X509_to_user is expected to be
* provided by a user-supplied DLL as described here:
Expand Down Expand Up @@ -4023,7 +4044,11 @@ ck_tn_tls_negotiate(VOID)
}

int
#ifdef CK_ANSIC
ck_ssl_incoming(int fd)
#else
ck_ssl_incoming(fd) int fd;
#endif /* CK_ANSIC */
{
/* if we are not running in debug then any error
* stuff from SSL debug *must* not go down
Expand Down Expand Up @@ -4194,7 +4219,11 @@ ck_ssl_incoming(fd) int fd;
}

int
#ifdef CK_ANSIC
ck_ssl_outgoing(int fd)
#else
ck_ssl_outgoing(fd) int fd;
#endif /* CK_ANSIC */
{
int timo = 2000;

Expand Down Expand Up @@ -4371,7 +4400,11 @@ ck_ssl_outgoing(fd) int fd;

#ifndef NOHTTP
int
#ifdef CK_ANSIC
ck_ssl_http_client(int fd, char *hostname)
#else
ck_ssl_http_client(fd, hostname) int fd; char * hostname;
#endif /* CK_ANSIC */
{
int timo = 2000;

Expand Down
84 changes: 78 additions & 6 deletions kermit/k95/ckcdeb.h
Original file line number Diff line number Diff line change
Expand Up @@ -1405,9 +1405,6 @@ extern int errno; /* fdc 1 November 2022 */
#else /* def __ALPHA */
#ifdef __ia64
#define VMS64
#ifndef VMSI64
#define VMSI64 /* See ckvtio.c. Pointless now? */
#endif /* ndef VMSI64 */
#else /* def __ia64 */
#ifdef __x86_64
#define VMS64
Expand Down Expand Up @@ -2705,15 +2702,24 @@ _PROTOTYP( void bleep, (short) );

#ifndef NOFLOAT

#ifdef __alpha /* Why only __alpha? Other 64-bit systems? */
#define FLT_NOT_DBL /* (See also ckclib.c:ckround()). */
#else /* def __alpha */
#ifdef VMS64
#define FLT_NOT_DBL /* Was testing only __alpha below. */
#endif /* def VMS64 */
#endif /* def __alpha [else] */

#ifndef CKFLOAT
#ifdef __alpha
#ifdef FLT_NOT_DBL /* 2024-05-16 SMS. Use instead of __alpha. */
/* Don't use double on 64-bit platforms -- bad things happen */
/* "double" on 64-bit platforms typically means 128-bit? Do we care?*/
#define CKFLOAT float
#define CKFLOAT_S "float"
#else
#else /* def FLT_NOT_DBL */
#define CKFLOAT double
#define CKFLOAT_S "double"
#endif /* __alpha */
#endif /* def FLT_NOT_DBL [else] */
#endif /* CKFLOAT */

#ifndef NOGFTIMER /* Floating-point timers */
Expand Down Expand Up @@ -6438,6 +6444,72 @@ extern int _flsbuf(char c,FILE *stream);
* obsolete value, which is why NAMX_C_MAXRSS is used instead.
*/

/* Maximum length for a simple filename, not counting \0 at end. */
/*
Define maximum length for a file name if not already defined.
NOTE: This applies to a path segment (directory or file name),
not the entire path string, which can be CKMAXPATH bytes long.
*/

/* On VMS, this is ill-defined, and depends on the file system:
* ODS2: 39.39 + version (;32767), so 84.
* ODS5: 238 + version (;32767), so 233.
*/
#ifndef CKMAXNAM
#ifdef VMS
#ifdef NAML$C_BID
#define CKMAXNAM 233 /* ODS5 possible. */
#else
#define CKMAXNAM 84 /* ODS5 unknown. */
#endif /* def NAML$C_BID */
#else /* def VMS */
/* Non-VMS definitions moved here from ckufio.c. with MAXNAMLEN -> CKMAXNAM. */

#ifndef CKMAXNAM /* If MAXNAMLEN is defined, then use that. */
#ifdef MAXNAMLEN
#define CKMAXNAM MAXNAMLEN
#endif /* def MAXNAMLEN */
#endif /* ndef CKMAXNAM */

#ifdef QNX
#ifdef _MAX_FNAME
#define CKMAXNAM _MAX_FNAME
#else
#define CKMAXNAM 48
#endif /* _MAX_FNAME */
#else
#ifndef CKMAXNAM
#ifdef sun
#define CKMAXNAM 255
#else
#ifdef FILENAME_MAX
#define CKMAXNAM FILENAME_MAX
#else
#ifdef NAME_MAX
#define CKMAXNAM NAME_MAX
#else
#ifdef _POSIX_NAME_MAX
#define CKMAXNAM _POSIX_NAME_MAX
#else
#ifdef _D_NAME_MAX
#define CKMAXNAM _D_NAME_MAX
#else
#ifdef DIRSIZ
#define CKMAXNAM DIRSIZ
#else
#define CKMAXNAM 14
#endif /* DIRSIZ */
#endif /* _D_NAME_MAX */
#endif /* _POSIX_NAME_MAX */
#endif /* _POSIX_NAME_MAX */
#endif /* NAME_MAX */
#endif /* FILENAME_MAX */
#endif /* sun */
#endif /* CKMAXNAM */
#endif /* QNX */

#endif /* def VMS [else] */

/* Maximum length for the name of a tty device */
#ifndef DEVNAMLEN
#define DEVNAMLEN CKMAXPATH
Expand Down
16 changes: 12 additions & 4 deletions kermit/k95/ckcfns.c
Original file line number Diff line number Diff line change
Expand Up @@ -6399,16 +6399,24 @@ nxtstatus(
}
break;
case 7: {
extern int maxnam;
debug(F101,"nxtstatus case","",7);
sprintf((char *)funcbuf," Filename length limit: %d\n", maxnam);
#ifdef CKMAXNAM
sprintf((char *)funcbuf,
" Filename length limit: %d\n", CKMAXNAM);
#else
*funcbuf = '\0';
#endif /* def CKMAXNAM [else] */
break;
}
case 8: {
extern int maxpath;
debug(F101,"nxtstatus case","",8);
#ifdef CKMAXPATH
sprintf((char *)funcbuf,
" Pathname length limit: %d\n\n", maxpath);
" Pathname length limit: %d\n\n", CKMAXPATH);
#else
*funcbuf = '\0';
#endif /* def CKMAXPATH [else] */

break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion kermit/k95/ckclib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,7 @@ ckround(fpnum,places,obuf,obuflen)
}
}
if (minus) number--; /* Back up to minus sign, if any. */
#ifdef __alpha
#ifdef FLT_NOT_DBL
sscanf(number,"%f",&value); /* Convert back to floating point */
#else
sscanf(number,"%lf",&value); /* Convert back to floating point */
Expand Down
15 changes: 9 additions & 6 deletions kermit/k95/ckcmai.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ckcmai.c - Main program for C-Kermit plus some miscellaneous functions */

#define EDITDATE "06 Feb 2024" /* Last edit date dd mmm yyyy */
#define EDITNDATE "20240206" /* Keep them in sync */
/* Tue Feb 6 11:41:35 2024 */
#define EDITDATE "5 Jun 2024" /* Last edit date dd mmm yyyy */
#define EDITNDATE "20240605" /* Keep them in sync */
/* Wed Jun 5 13:44:42 2024 */
/*
As of 27 September 2022 BETATEST is defined in ckcdeb.h, not here,
because it's also used in other modules.
Expand Down Expand Up @@ -104,9 +104,9 @@ int offtsize = 0; /* Size of OFF_T */
Macintosh), just C-Kermit for each platform (except the original Mac).
*/
char *ck_s_ver = "10.0"; /* C-Kermit version string */
char *ck_s_edit = "408"; /* Edit number (for Debian package) */
char *ck_s_xver = "10.0.408"; /* eXtended version string */
long ck_l_ver = 1000408L; /* C-Kermit version number */
char *ck_s_edit = "413"; /* Edit number (for Debian package) */
char *ck_s_xver = "10.0.413"; /* eXtended version string */
long ck_l_ver = 1000413L; /* C-Kermit version number */
char *ck_s_name = "C-Kermit"; /* Name of this program */
char *ck_s_who = ""; /* Where customized, "" = not. */
char *ck_patch = ""; /* Patch info, if any. */
Expand Down Expand Up @@ -1357,6 +1357,9 @@ int deblog = 0, /* Debug log is open */
dest = DEST_D, /* Destination for packet data */
zchkod = 0, /* zchko() should work for dirs too? */
zchkid = 0, /* zchki() should work for dirs too? */
#ifdef VMS
vms_text = VMSTFS, /* VMS text file dflt fmt: Stream_LF */
#endif /* VMS */

/* If you change this, also see struct ptab above... */

Expand Down
Loading

0 comments on commit 21a5bf1

Please sign in to comment.