[ttssh2-commit] [9623] LibreSSL に対応

Zurück zum Archiv-Index
scmno****@osdn***** scmno****@osdn*****
2021年 12月 24日 (金) 01:03:30 JST


Revision: 9623
          https://osdn.net/projects/ttssh2/scm/svn/commits/9623
Author:   nmaya
Date:     2021-12-24 01:03:30 +0900 (Fri, 24 Dec 2021)
Log Message:
-----------
LibreSSL に対応

- OpenSSL 1.1 に移行したときに OpenSSL の関数に置き換えた EVP_CIPHER_meth_ で始まる関数が LibreSSL にはないため、元に戻した。
  https://osdn.net/projects/ttssh2/svn/view/trunk/ttssh2/ttxssh/cipher-ctr.c?root=ttssh2&r1=6229&r2=8316
  https://osdn.net/projects/ttssh2/svn/view/trunk/ttssh2/ttxssh/ttxssh.c?root=ttssh2&r1=8273&r2=8316

- LibreSSL の RAND_bytes() の中で落ちるので、BCryptGenRandom() を使うようにした
  RAND_bytes() を呼んでいるのは _rs_stir() の中
  OpenSSH の openbsd-compat/arc4random.c は、OpenSSL ではないときに RAND_bytes() を呼んでいない
    https://anongit.mindrot.org/openssh.git/tree/openbsd-compat/arc4random.c
  OpenBSD の lib/libc/crypt/arc4random.c, lib/libcrypto/arc4random/getentropy_win.c では BCryptGenRandom() を呼んでいる
    https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?annotate=1.55
    https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/arc4random/getentropy_win.c?annotate=1.6
  BCryptGenRandom() を呼ぶので、動作するのは Windows Vista 以上となる

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/1
    https://osdn.net/projects/ttssh2/scm/svn/commits/2
    https://osdn.net/projects/ttssh2/scm/svn/commits/1
    https://osdn.net/projects/ttssh2/scm/svn/commits/2

Modified Paths:
--------------
    branches/libressl_3_4_2/libs/buildall.bat
    branches/libressl_3_4_2/ttssh2/ttxssh/arc4random.c
    branches/libressl_3_4_2/ttssh2/ttxssh/cipher-3des1.c
    branches/libressl_3_4_2/ttssh2/ttxssh/cipher-ctr.c
    branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj
    branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters

Added Paths:
-----------
    branches/libressl_3_4_2/libs/buildlibressl.bat
    branches/libressl_3_4_2/libs/libressl/

-------------- next part --------------
Modified: branches/libressl_3_4_2/libs/buildall.bat
===================================================================
--- branches/libressl_3_4_2/libs/buildall.bat	2021-12-23 15:56:10 UTC (rev 9622)
+++ branches/libressl_3_4_2/libs/buildall.bat	2021-12-23 16:03:30 UTC (rev 9623)
@@ -10,7 +10,7 @@
     exit /b 1
 )
 
-CALL buildopenssl11.bat
+CALL buildlibressl.bat
 if ERRORLEVEL 1 (
     echo "buildall.bat \x82\xF0\x8FI\x97\xB9\x82\xB5\x82܂\xB7"
     exit /b 1

Added: branches/libressl_3_4_2/libs/buildlibressl.bat
===================================================================
--- branches/libressl_3_4_2/libs/buildlibressl.bat	                        (rev 0)
+++ branches/libressl_3_4_2/libs/buildlibressl.bat	2021-12-23 16:03:30 UTC (rev 9623)
@@ -0,0 +1,18 @@
+rem LibreSSL\x82̃r\x83\x8B\x83h
+
+cd libressl
+
+
+cmake -G "Visual Studio 16 2019" -A Win32
+perl -e "open(IN,'CMakeCache.txt');while(<IN>){s|=/MD|=/MT|;print $_;}close(IN);" > CMakeCache.txt.tmp
+move /y CMakeCache.txt.tmp CMakeCache.txt
+rem \x95ύX\x82\xB5\x82\xBD CMakeCache.txt \x82Ɋ\xEE\x82Â\xA2\x82Đ\xB6\x90\xAC\x82\xB3\x82\xEA\x82\xE9\x82悤\x82ɍēx\x8E\xC0\x8Ds
+cmake -G "Visual Studio 16 2019" -A Win32
+
+devenv /build Debug LibreSSL.sln /project crypto /projectconfig Debug
+
+devenv /build Release LibreSSL.sln /project crypto /projectconfig Release
+
+
+cd ..
+exit /b 0

Modified: branches/libressl_3_4_2/ttssh2/ttxssh/arc4random.c
===================================================================
--- branches/libressl_3_4_2/ttssh2/ttxssh/arc4random.c	2021-12-23 15:56:10 UTC (rev 9622)
+++ branches/libressl_3_4_2/ttssh2/ttxssh/arc4random.c	2021-12-23 16:03:30 UTC (rev 9623)
@@ -22,8 +22,16 @@
 
 /*
  * ChaCha based random number generator for OpenBSD.
+ *   openssh-portable: openbsd-compat/arc4random.c
  */
 
+/*
+ * with LibreSSL, use getentropy() instead of RAND_bytes().
+ *   OpenBSD: lib/libcrypto/arc4random/getentropy_win.c
+ *   $OpenBSD: getentropy_win.c,v 1.6 2020/11/11 10:41:24 bcook Exp $
+ */
+
+
 #include <sys/types.h>
 
 #include <stdlib.h>
@@ -35,8 +43,12 @@
 #include "arc4random.h"
 #include "chacha.h"
 
+#ifndef LIBRESSL_VERSION_NUMBER
 #include <openssl/rand.h>
 #include <openssl/err.h>
+#else
+#include <bcrypt.h>
+#endif
 
 /* OpenSSH isn't multithreaded */
 #define _ARC4_LOCK()
@@ -64,14 +76,41 @@
 	chacha_ivsetup(&rs, buf + KEYSZ, NULL);
 }
 
+#ifdef LIBRESSL_VERSION_NUMBER
+/*
+ * On Windows, BCryptGenRandom with BCRYPT_USE_SYSTEM_PREFERRED_RNG is supposed
+ * to be a well-seeded, cryptographically strong random number generator.
+ * https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom
+ */
+static int
+getentropy(void *buf, size_t len)
+{
+	if (len > 256) {
+		return (-1);
+	}
+
+	if (FAILED(BCryptGenRandom(NULL, buf, len, BCRYPT_USE_SYSTEM_PREFERRED_RNG))) {
+		return (-1);
+	}
+
+	return (0);
+}
+#endif /* LIBRESSL_VERSION_NUMBER */
+
 static void
 _rs_stir(void)
 {
 	u_char rnd[KEYSZ + IVSZ];
 
+#ifndef LIBRESSL_VERSION_NUMBER
 	if (RAND_bytes(rnd, sizeof(rnd)) <= 0) {
 		return;
 	}
+#else
+	if (getentropy(rnd, sizeof(rnd)) <= 0) {
+		return;
+	}
+#endif
 
 	if (!rs_initialized) {
 		rs_initialized = 1;

Modified: branches/libressl_3_4_2/ttssh2/ttxssh/cipher-3des1.c
===================================================================
--- branches/libressl_3_4_2/ttssh2/ttxssh/cipher-3des1.c	2021-12-23 15:56:10 UTC (rev 9622)
+++ branches/libressl_3_4_2/ttssh2/ttxssh/cipher-3des1.c	2021-12-23 16:03:30 UTC (rev 9623)
@@ -52,7 +52,6 @@
 };
 
 const EVP_CIPHER * evp_ssh1_3des(void);
-int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
 
 static int ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv, int enc)
 {
@@ -124,49 +123,18 @@
 	return 1;
 }
 
-// ssh1_3des_iv \x82͖\xA2\x8Eg\x97p\x81B
-int ssh1_3des_iv(EVP_CIPHER_CTX *evp, int doset, u_char *iv, int len)
-{
-	struct ssh1_3des_ctx *c;
-
-	if (len != 24) {
-		//fatal("%s: bad 3des iv length: %d", __func__, len);
-		return SSH_ERR_INVALID_ARGUMENT;
-	}
-
-	if ((c = EVP_CIPHER_CTX_get_app_data(evp)) == NULL) {
-		//fatal("%s: no 3des context", __func__);
-		return SSH_ERR_INTERNAL_ERROR;
-	}
-
-	if (doset) {
-		//debug3("%s: Installed 3DES IV", __func__);
-		memcpy(EVP_CIPHER_CTX_iv_noconst(c->k1), iv, 8);
-		memcpy(EVP_CIPHER_CTX_iv_noconst(c->k2), iv + 8, 8);
-		memcpy(EVP_CIPHER_CTX_iv_noconst(c->k3), iv + 16, 8);
-	} else {
-		//debug3("%s: Copying 3DES IV", __func__);
-		memcpy(iv, EVP_CIPHER_CTX_iv(c->k1), 8);
-		memcpy(iv + 8, EVP_CIPHER_CTX_iv(c->k2), 8);
-		memcpy(iv + 16, EVP_CIPHER_CTX_iv(c->k3), 8);
-	}
-	return 0;
-}
-
 const EVP_CIPHER *evp_ssh1_3des(void)
 {
-	static EVP_CIPHER *p = NULL;
+	static EVP_CIPHER ssh1_3des;
 
-	if (p == NULL) {
-		p = EVP_CIPHER_meth_new(NID_undef, /*block_size*/8, /*key_len*/16);
-		/*** TODO: OPENSSL1.1.1 ERROR CHECK(ticket#39335\x82ŏ\x88\x92u\x97\\x92\xE8) ***/
-	}
-	if (p) {
-		EVP_CIPHER_meth_set_iv_length(p, 0);
-		EVP_CIPHER_meth_set_init(p, ssh1_3des_init);
-		EVP_CIPHER_meth_set_cleanup(p, ssh1_3des_cleanup);
-		EVP_CIPHER_meth_set_do_cipher(p, ssh1_3des_cbc);
-		EVP_CIPHER_meth_set_flags(p, EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH);
-	}
-	return (p);
+	memset(&ssh1_3des, 0, sizeof(EVP_CIPHER));
+	ssh1_3des.nid = NID_undef;
+	ssh1_3des.block_size = 8;
+	ssh1_3des.iv_len = 0;
+	ssh1_3des.key_len = 16;
+	ssh1_3des.init = ssh1_3des_init;
+	ssh1_3des.cleanup = ssh1_3des_cleanup;
+	ssh1_3des.do_cipher = ssh1_3des_cbc;
+	ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH;
+	return (&ssh1_3des);
 }

Modified: branches/libressl_3_4_2/ttssh2/ttxssh/cipher-ctr.c
===================================================================
--- branches/libressl_3_4_2/ttssh2/ttxssh/cipher-ctr.c	2021-12-23 15:56:10 UTC (rev 9622)
+++ branches/libressl_3_4_2/ttssh2/ttxssh/cipher-ctr.c	2021-12-23 16:03:30 UTC (rev 9623)
@@ -133,20 +133,20 @@
 const EVP_CIPHER *
 evp_aes_128_ctr(void)
 {
-	static EVP_CIPHER *p = NULL;
+	static EVP_CIPHER aes_ctr;
 
-	if (p == NULL) {
-		p = EVP_CIPHER_meth_new(NID_undef, /*block_size*/AES_BLOCK_SIZE, /*key_len*/16);
-		/*** TODO: OPENSSL1.1.1 ERROR CHECK(ticket#39335\x82ŏ\x88\x92u\x97\\x92\xE8) ***/
-	}
-	if (p) {
-		EVP_CIPHER_meth_set_iv_length(p, AES_BLOCK_SIZE);
-		EVP_CIPHER_meth_set_init(p, ssh_aes_ctr_init);
-		EVP_CIPHER_meth_set_cleanup(p, ssh_aes_ctr_cleanup);
-		EVP_CIPHER_meth_set_do_cipher(p, ssh_aes_ctr);
-		EVP_CIPHER_meth_set_flags(p, EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV);
-	}
-	return (p);
+	memset(&aes_ctr, 0, sizeof(EVP_CIPHER));
+	aes_ctr.nid = NID_undef;
+	aes_ctr.block_size = AES_BLOCK_SIZE;
+	aes_ctr.iv_len = AES_BLOCK_SIZE;
+	aes_ctr.key_len = 16;
+	aes_ctr.init = ssh_aes_ctr_init;
+	aes_ctr.cleanup = ssh_aes_ctr_cleanup;
+	aes_ctr.do_cipher = ssh_aes_ctr;
+#ifndef SSH_OLD_EVP
+	aes_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
+#endif
+	return (&aes_ctr);
 }
 
 //============================================================================
@@ -212,20 +212,20 @@
 const EVP_CIPHER *
 evp_des3_ctr(void)
 {
-	static EVP_CIPHER *p = NULL;
+	static EVP_CIPHER des3_ctr;
 
-	if (p == NULL) {
-		p = EVP_CIPHER_meth_new(NID_undef, /*block_size*/DES_BLOCK_SIZE, /*key_len*/24);
-		/*** TODO: OPENSSL1.1.1 ERROR CHECK(ticket#39335\x82ŏ\x88\x92u\x97\\x92\xE8) ***/
-	}
-	if (p) {
-		EVP_CIPHER_meth_set_iv_length(p, DES_BLOCK_SIZE);
-		EVP_CIPHER_meth_set_init(p, ssh_des3_ctr_init);
-		EVP_CIPHER_meth_set_cleanup(p, ssh_des3_ctr_cleanup);
-		EVP_CIPHER_meth_set_do_cipher(p, ssh_des3_ctr);
-		EVP_CIPHER_meth_set_flags(p, EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV);
-	}
-	return (p);
+	memset(&des3_ctr, 0, sizeof(EVP_CIPHER));
+	des3_ctr.nid = NID_undef;
+	des3_ctr.block_size = DES_BLOCK_SIZE;
+	des3_ctr.iv_len = DES_BLOCK_SIZE;
+	des3_ctr.key_len = 24;
+	des3_ctr.init = ssh_des3_ctr_init;
+	des3_ctr.cleanup = ssh_des3_ctr_cleanup;
+	des3_ctr.do_cipher = ssh_des3_ctr;
+#ifndef SSH_OLD_EVP
+	des3_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
+#endif
+	return (&des3_ctr);
 }
 
 //============================================================================
@@ -306,20 +306,20 @@
 const EVP_CIPHER *
 evp_bf_ctr(void)
 {
-	static EVP_CIPHER *p = NULL;
+	static EVP_CIPHER blowfish_ctr;
 
-	if (p == NULL) {
-		p = EVP_CIPHER_meth_new(NID_undef, /*block_size*/BF_BLOCK, /*key_len*/16);
-		/*** TODO: OPENSSL1.1.1 ERROR CHECK(ticket#39335\x82ŏ\x88\x92u\x97\\x92\xE8) ***/
-	}
-	if (p) {
-		EVP_CIPHER_meth_set_iv_length(p, BF_BLOCK);
-		EVP_CIPHER_meth_set_init(p, ssh_bf_ctr_init);
-		EVP_CIPHER_meth_set_cleanup(p, ssh_bf_ctr_cleanup);
-		EVP_CIPHER_meth_set_do_cipher(p, ssh_bf_ctr);
-		EVP_CIPHER_meth_set_flags(p, EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV);
-	}
-	return (p);
+	memset(&blowfish_ctr, 0, sizeof(EVP_CIPHER));
+	blowfish_ctr.nid = NID_undef;
+	blowfish_ctr.block_size = BF_BLOCK;
+	blowfish_ctr.iv_len = BF_BLOCK;
+	blowfish_ctr.key_len = 16;
+	blowfish_ctr.init = ssh_bf_ctr_init;
+	blowfish_ctr.cleanup = ssh_bf_ctr_cleanup;
+	blowfish_ctr.do_cipher = ssh_bf_ctr;
+#ifndef SSH_OLD_EVP
+	blowfish_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
+#endif
+	return (&blowfish_ctr);
 }
 
 //============================================================================
@@ -400,20 +400,20 @@
 const EVP_CIPHER *
 evp_cast5_ctr(void)
 {
-	static EVP_CIPHER *p = NULL;
+	static EVP_CIPHER cast5_ctr;
 
-	if (p == NULL) {
-		p = EVP_CIPHER_meth_new(NID_undef, /*block_size*/CAST_BLOCK, /*key_len*/16);
-		/*** TODO: OPENSSL1.1.1 ERROR CHECK(ticket#39335\x82ŏ\x88\x92u\x97\\x92\xE8) ***/
-	}
-	if (p) {
-		EVP_CIPHER_meth_set_iv_length(p, CAST_BLOCK);
-		EVP_CIPHER_meth_set_init(p, ssh_cast5_ctr_init);
-		EVP_CIPHER_meth_set_cleanup(p, ssh_cast5_ctr_cleanup);
-		EVP_CIPHER_meth_set_do_cipher(p, ssh_cast5_ctr);
-		EVP_CIPHER_meth_set_flags(p, EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV);
-	}
-	return (p);
+	memset(&cast5_ctr, 0, sizeof(EVP_CIPHER));
+	cast5_ctr.nid = NID_undef;
+	cast5_ctr.block_size = CAST_BLOCK;
+	cast5_ctr.iv_len = CAST_BLOCK;
+	cast5_ctr.key_len = 16;
+	cast5_ctr.init = ssh_cast5_ctr_init;
+	cast5_ctr.cleanup = ssh_cast5_ctr_cleanup;
+	cast5_ctr.do_cipher = ssh_cast5_ctr;
+#ifndef SSH_OLD_EVP
+	cast5_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
+#endif
+	return (&cast5_ctr);
 }
 
 //============================================================================
@@ -474,19 +474,18 @@
 const EVP_CIPHER *
 evp_camellia_128_ctr(void)
 {
+	static EVP_CIPHER camellia_ctr;
 
-	static EVP_CIPHER *p = NULL;
-
-	if (p == NULL) {
-		p = EVP_CIPHER_meth_new(NID_undef, /*block_size*/CAMELLIA_BLOCK_SIZE, /*key_len*/16);
-		/*** TODO: OPENSSL1.1.1 ERROR CHECK(ticket#39335\x82ŏ\x88\x92u\x97\\x92\xE8) ***/
-	}
-	if (p) {
-		EVP_CIPHER_meth_set_iv_length(p, CAMELLIA_BLOCK_SIZE);
-		EVP_CIPHER_meth_set_init(p, ssh_camellia_ctr_init);
-		EVP_CIPHER_meth_set_cleanup(p, ssh_camellia_ctr_cleanup);
-		EVP_CIPHER_meth_set_do_cipher(p, ssh_camellia_ctr);
-		EVP_CIPHER_meth_set_flags(p, EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV);
-	}
-	return (p);
+	memset(&camellia_ctr, 0, sizeof(EVP_CIPHER));
+	camellia_ctr.nid = NID_undef;
+	camellia_ctr.block_size = CAMELLIA_BLOCK_SIZE;
+	camellia_ctr.iv_len = CAMELLIA_BLOCK_SIZE;
+	camellia_ctr.key_len = 16;
+	camellia_ctr.init = ssh_camellia_ctr_init;
+	camellia_ctr.cleanup = ssh_camellia_ctr_cleanup;
+	camellia_ctr.do_cipher = ssh_camellia_ctr;
+#ifndef SSH_OLD_EVP
+	camellia_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
+#endif
+	return (&camellia_ctr);
 }

Modified: branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj
===================================================================
--- branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj	2021-12-23 15:56:10 UTC (rev 9622)
+++ branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj	2021-12-23 16:03:30 UTC (rev 9623)
@@ -65,7 +65,7 @@
     <ClCompile>
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\openssl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;$(SolutionDir)argon2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\libressl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;$(SolutionDir)argon2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
@@ -82,9 +82,9 @@
       <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>common_static.lib;ws2_32.lib;libcrypto.lib;zlibd.lib;ttpcmn.lib;dnsapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>common_static.lib;ws2_32.lib;crypto-47.lib;Bcrypt.lib;zlibd.lib;ttpcmn.lib;dnsapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>$(SolutionDir)..\libs\openssl\out32.dbg;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>$(SolutionDir)..\libs\libressl\crypto\Debug;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <ModuleDefinitionFile>$(ProjectName).def</ModuleDefinitionFile>
       <DelayLoadDLLs>user32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -112,7 +112,7 @@
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\openssl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;$(SolutionDir)argon2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\libressl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;$(SolutionDir)argon2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -128,9 +128,9 @@
       <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>common_static.lib;ws2_32.lib;libcrypto.lib;zlib.lib;ttpcmn.lib;dnsapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>common_static.lib;ws2_32.lib;crypto-47.lib;zlib.lib;ttpcmn.lib;dnsapi.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <AdditionalLibraryDirectories>$(SolutionDir)..\libs\openssl\out32;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>$(SolutionDir)..\libs\libressl\crypto\Release;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <ModuleDefinitionFile>$(ProjectName).def</ModuleDefinitionFile>
       <DelayLoadDLLs>user32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
       <GenerateDebugInformation>true</GenerateDebugInformation>
@@ -253,4 +253,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file

Modified: branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters
===================================================================
--- branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters	2021-12-23 15:56:10 UTC (rev 9622)
+++ branches/libressl_3_4_2/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters	2021-12-23 16:03:30 UTC (rev 9623)
@@ -121,24 +121,9 @@
     <ClCompile Include="..\..\teraterm\teraterm\WSAAsyncGetAddrInfo.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\teraterm\common\tipwin.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\teraterm\common\dlglib.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\teraterm\common\dlglib_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\teraterm\common\dlglib_tmpl.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\teraterm\common\ttlib.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\teraterm\common\codeconv.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="arc4random.h">
@@ -249,6 +234,15 @@
     <ClInclude Include="..\..\teraterm\common\codeconv.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\compat_win.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\dllutil.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\ttlib.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Image Include="ttsecure.ico">


ttssh2-commit メーリングリストの案内
Zurück zum Archiv-Index