Skip to content

Commit 120cf51

Browse files
committed
Disable cipher scheme AEGIS for MSVC 2015 and below (issue #195)
MSVC 2015 is very strict regarding data alignment. Passing aligned parameters by value is not supported. Therefore the cipher scheme AEGIS is disabled for now. The underlying libaegis library passes aligned parameters by value for a number of functions. To support older MSVC compilers it would be necessary to change the parameter passing mechanism for the affected functions from "by value" to "by reference". In case this will done in the upstream libaegis library, the AEGIS cipher scheme will be re-enabled for MSVC 2015 and below.
1 parent f2becd3 commit 120cf51

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Diff for: src/sqlite3mc_config.h

+13-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
** Purpose: Header file for SQLite3 Multiple Ciphers compile-time configuration
44
** Author: Ulrich Telle
55
** Created: 2021-09-27
6-
** Copyright: (c) 2019-2024 Ulrich Telle
6+
** Copyright: (c) 2019-2025 Ulrich Telle
77
** License: MIT
88
*/
99

@@ -72,6 +72,18 @@
7272
#define HAVE_CIPHER_ASCON128 1
7373
#endif
7474

75+
/*
76+
** Disable AEGIS cipher scheme for MSVC 2015 and below
77+
** MSVC versions below MSVC 2017 can't compile the AEGIS cipher code
78+
** due to not supporting to pass aligned parameters by value
79+
*/
80+
#if defined(_MSC_VER) && _MSC_VER < 1910
81+
#ifdef HAVE_CIPHER_AEGIS
82+
#undef HAVE_CIPHER_AEGIS
83+
#endif
84+
#define HAVE_CIPHER_AEGIS 0
85+
#endif
86+
7587
#ifndef HAVE_CIPHER_AEGIS
7688
#define HAVE_CIPHER_AEGIS 1
7789
#endif

0 commit comments

Comments
 (0)