Skip to content

Commit

Permalink
BUILD 56; released, libmbedtls default engine
Browse files Browse the repository at this point in the history
  • Loading branch information
adamy committed Apr 30, 2020
1 parent 095cc72 commit 51d8a01
Show file tree
Hide file tree
Showing 21 changed files with 348 additions and 83 deletions.
2 changes: 1 addition & 1 deletion BUILDNUMBER.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
53
56
6 changes: 4 additions & 2 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Thu Apr 30 01:03:24 2020 adamy
Thu Apr 30 23:08:57 2020 adamy

* BUILD 55
* BUILD 56; release

* -E and -v command options; note only effective within local builds.

* libssh2 1.9.0; + Blowfish.

Expand Down
2 changes: 1 addition & 1 deletion INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@

-------

$Id: $
$Id: INSTALL.txt,v 1.1 2020/04/30 21:30:14 cvsuser Exp $


4 changes: 3 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- mode: mak; -*-
# $Id: Makefile.in,v 1.7 2020/04/29 19:33:08 cvsuser Exp $
# $Id: Makefile.in,v 1.8 2020/04/30 21:30:28 cvsuser Exp $
# winsh - top level makefile.
#
#
Expand Down Expand Up @@ -156,6 +156,7 @@ LIBS= $(LW)w32$(A)
endif
LIBS+=\
$(LW)z$(A) \
$(LW)mbedtls$(A) \
$(LW)ssh2$(A) \
$(LW)termemu$(A)

Expand Down Expand Up @@ -255,6 +256,7 @@ clean:
$(MAKE) -C libw32 clean
$(MAKE) -C libz clean
$(MAKE) -C libssh2 clean
$(MAKE) -C libmbedtls clean
$(MAKE) -C libtermemu clean
$(MAKE) -C rlogin clean
$(MAKE) -C slogin clean
Expand Down
89 changes: 89 additions & 0 deletions libmbedtls/readme_2_13_0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

Source: mbed TLS 2.13.0 (Apache)

include\libmbedtls\platform.h

- extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... );

#if defined(_WIN32) && !defined(LIBMBEDCRYPTO_SOURCE)
+ #include "crypto_globals.h"
+ #define mbedtls_fprintf get_mbedtls_fprintf()
+ #else
+ extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... );
+ #endif

-------

- extern int (*mbedtls_printf)( const char * format, ... );

+ #if defined(_WIN32) && !defined(LIBMBEDCRYPTO_SOURCE)
+ #include "crypto_globals.h"
+ #define mbedtls_printf get_mbedtls_printf()
+ #else
+ extern int (*mbedtls_printf)( const char * format, ... );
+ #endif

-------

- extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... );

+ #if defined(_WIN32) && !defined(LIBMBEDCRYPTO_SOURCE)
+ #include "crypto_globals.h"
+ #define mbedtls_snprintf get_mbedtls_snprintf()
+ #else
+ extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... );
+ #endif

include\libmbedtls\platform_util.h

//stdlib linkage
- static void * (* const volatile memset_func)( void *, int, size_t ) = memset;

+ static void * stdlib_memset( void *buf, int value, size_t len)
+ {
+ return memset( buf, value, len);
+ }
+ static void * (* const volatile memset_func)( void *, int, size_t ) = stdlib_memset;

include\libmbedtls\ssl_tls.h

#if defined(MBEDTLS_X509_CRT_PARSE_C)
#include "mbedtls/oid.h"
#endif

+ #if defined(_WIN32)
+ #include "x509_globals.h"
+ #endif

-------

+ #if defined(_WIN32)
+ conf->cert_profile = get_mbedtls_x509_crt_profile_suiteb();
+ #else
conf->cert_profile = &mbedtls_x509_crt_profile_suiteb;
+ #endf

-------

+ #if defined(_WIN32)
+ conf->cert_profile = get_mbedtls_x509_crt_profile_default();
+ #else
conf->cert_profile = &mbedtls_x509_crt_profile_default;
+ #endif

library\x590.c

- lt = gmtime_s( &tm_buf, &tt ) == 0 ? &tm_buf : NULL;
+ #if defined(__WATCOMC__)
+ lt = gmtime_s( (const tm *)&tt, &tm_buf );
+ #else
+ lt = (gmtime_s( &tm_buf, (const tm *)&tt ) == 0) ? &tm_buf : NULL;
+ #endif

win32\libmbedcrypto.def

; library\asn1write.c
+ mbedtls_asn1_write_tagged_string



23 changes: 18 additions & 5 deletions libssh2/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*-
# $Id: Makefile.in,v 1.8 2020/04/30 01:03:21 cvsuser Exp $
# $Id: Makefile.in,v 1.9 2020/04/30 20:52:42 cvsuser Exp $
# libssh2 makefile.
#
#
Expand Down Expand Up @@ -96,13 +96,20 @@ SSH2SRC= $(SSH2BASE)/src
SSH2INCLUDE= $(SSH2BASE)/include

CINCLUDE+= -I$(SSH2BASE)/win32 -I$(SSH2INCLUDE) -I./sdk
CEXTRA+= -D_WIN32_WINNT=0x601 -DLIBSSH2_WIN32 -DLIBSSH2_WINCNG -DLIBSSH2_HAVE_ZLIB
CEXTRA+= -D_WIN32_WINNT=0x601 -DLIBSSH2_WIN32 -DLIBSSH2_HAVE_ZLIB

##CEXTRA+= -DLIBSSH2_WINOPENSSL
##CEXTRA+= -DLIBSSH2_WINCNG
CEXTRA+= -DLIBSSH2_MBEDTLS
# Crypto backends (see: crypto.h):
# LIBSSH2_OPENSSL lib openssl
# LIBSSH2_WINCNG Windows crypto
# LIBSSH2_WINCNG Windows crypto;
# Note: current Windows enc engine wont allow OpenSSH connections.
# LIBSSH2_MBEDTLS mbedtls
#
LDLIBS+= -llibz_static ./sdk/bcrypt.lib ./sdk/crypt32.lib
LDLIBS+= libmbedcrypto_static.lib
LDLIBS+= libz_static.lib
##LDLIBS+= ./sdk/bcrypt.lib ./sdk/crypt32.lib

VPATH+= $(SSH2SRC) $(SSH2BASE)/win32
CRYPTO_CSOURCES=\
Expand All @@ -113,7 +120,8 @@ CSOURCES=\
channel.c comp.c crypt.c hostkey.c kex.c mac.c misc.c \
packet.c publickey.c scp.c session.c sftp.c transport.c userauth.c \
version.c knownhost.c agent.c pem.c keepalive.c global.c \
$(CRYPTO_CSOURCES)
$(CRYPTO_CSOURCES) \
libssh2_helper.c

#+1.9.0
CSOURCES+=\
Expand All @@ -139,6 +147,9 @@ TSKS=
all: source unpacked
unpacked: object $(LIBS) $(DLLS) $(TSKS) installinc

ifdef SSH2DEBUG # enable LIBSSH2 run-time diagnostics
CEXTRA += -DLIBSSH2DEBUG
endif
CEXTRA += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE

$(SSH2LIB): CEXTRA += -DLIBSSH2_STATIC
Expand Down Expand Up @@ -168,6 +179,7 @@ installinc: ../include/.created
@echo publishing headers ...
-cp $(SSH2INCLUDE)/libssh2.h ../include
-cp $(SSH2INCLUDE)/libssh2_Sftp.h ../include
-cp libssh2_helper.h ../include

%/.created:
-@mkdir $(@D)
Expand All @@ -177,6 +189,7 @@ clean:
-@$(LIBTOOL) --mode=clean $(RM) $(DLLS) $(DLLOBJS) >/dev/null 2>&1
-@$(RM) $(RMFLAGS) $(BAK) $(TSKS) $(LIBS) $(CLEAN) $(XCLEAN) >/dev/null 2>&1
-@$(RM) $(LIBOBJS) >/dev/null 2>&1
-@$(RM) ../include/libssh2*.h >/dev/null 2>&1

$(D_OBJ)/%$(O): %.c
$(CC) $(CFLAGS) -o $@ -c $<
Expand Down
Binary file modified libssh2/libssh2-1.9.0.gr.tgz
Binary file not shown.
39 changes: 39 additions & 0 deletions libssh2/libssh2_helper.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//$Id: libssh2_helper.c,v 1.1 2020/04/30 20:52:42 cvsuser Exp $
//
// libssh2 support
//

#define LIBSSH2_LIBRARY
#include <libssh2_helper.h>


LIBSSH2_API int
libssh2_helper_trace(void)
{
#if defined(LIBSSH2DEBUG)
return 1;
#else
return 0;
#endif
}


LIBSSH2_API const char *
libssh2_helper_engine(void)
{
#if defined(LIBSSH2_OPENSSL)
return "openssl";

#elif defined(LIBSSH2_MBEDTLS)
return "mbedtls";

#elif defined(LIBSSH2_WINCNG)
return "wincng";

#else
#error Unknown engine configuration
#endif
}

//end

20 changes: 20 additions & 0 deletions libssh2/libssh2_helper.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//$Id: libssh2_helper.h,v 1.1 2020/04/30 20:52:42 cvsuser Exp $
//
// libssh2 support
//

#include <libssh2.h>

#ifdef __cplusplus
extern "C" {
#endif

LIBSSH2_API int libssh2_helper_trace(void);
LIBSSH2_API const char *libssh2_helper_engine(void);

#ifdef __cplusplus
} /* extern "C" */
#endif

//end

5 changes: 4 additions & 1 deletion libssh2/readme_1_9_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@

#ifdef WIN32
+ #if defined(__WATCOMC__)
+ static void *safememset(void *a, int b, size_t c) {
+ return memset(a, b, c);
+ }
+ static void * (__watcall * const volatile memset_libssh)(void *, int, size_t) =
+ memset;
+ safememset;
+ #else
static void * (__cdecl * const volatile memset_libssh)(void *, int, size_t) =
memset;
Expand Down
2 changes: 1 addition & 1 deletion libtermemu/termemu_cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* libtermemu console driver
*
* Copyright (c) 2015 - 2018, Adam Young.
* Copyright (c) 2015 - 2020, Adam Young.
* All rights reserved.
*
* This file is part of the WinRSH/WinSSH project.
Expand Down
2 changes: 1 addition & 1 deletion libtermemu/termemu_keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* libtermemu console driver
*
* Copyright (c) 2015 - 2018, Adam Young.
* Copyright (c) 2015 - 2020, Adam Young.
* All rights reserved.
*
* This file is part of the WinRSH/WinSSH project.
Expand Down
3 changes: 2 additions & 1 deletion libtermemu/termemu_tsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* libtermemu console driver
*
* Copyright (c) 2015 - 2018, Adam Young.
* Copyright (c) 2015 - 2020, Adam Young.
* All rights reserved.
*
* This file is part of the WinRSH/WinSSH project.
Expand Down Expand Up @@ -476,4 +476,5 @@ static int cb_renderer(struct tsm_screen *screen, uint32_t id,
vio_atputc(y, x, *ch ? *ch : ' ', 1);
return 0;
}

/*end*/
27 changes: 15 additions & 12 deletions libtermemu/termemu_vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
/*
* libtermemu console driver
*
* Copyright (c) 2007, 2012 - 2018 Adam Young.
* Copyright (c) 2007, 2012 - 2020 Adam Young.
*
* This file is part of the Midnight Commander.
* This file is part of the WinRSH/WinSSH project.
*
* The Midnight Commander is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
* The WinRSH/WinSSH project is free software: you can redistribute it
* and/or modify it under the terms of the WinRSH/WinSSH project License.
*
* The Midnight Commander is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Redistributions of source code must retain the above copyright
* notice, and must be distributed with the license document above.
*
* Redistributions in binary form must reproduce the above copyright
* notice, and must include the license document above in
* the documentation and/or other materials provided with the
* distribution.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* The WinRSH/WinSSH project is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License for more details.
* ==end==
*/

Expand Down
3 changes: 2 additions & 1 deletion libw32/w32_err.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <edidentifier.h>
__CIDENT_RCSID(gr_w32_err_c,"$Id: w32_err.c,v 1.4 2020/04/29 11:54:25 cvsuser Exp $")
__CIDENT_RCSID(gr_w32_err_c,"$Id: w32_err.c,v 1.5 2020/04/30 21:35:16 cvsuser Exp $")

/*
* Copyright (c) 1993
Expand Down Expand Up @@ -106,3 +106,4 @@ warnx(const char *fmt, ...)
fputc('\n', stderr);
}

/*end*/
Loading

0 comments on commit 51d8a01

Please sign in to comment.