Commit Graph
42 Commits
Author SHA1 Message Date
Andreas Steffen a46e436e29 af-alg: Added AES_ECB support 2019-11-28 17:03:09 +01:00
Baruch Siach 0727c8a533 af-alg: Fix crypt() definition conflict
Rename the crypt() method to avoid conflict with POSIX crypt(). Fixes the
following build failure with musl libc:

In file included from ../../../../src/libstrongswan/utils/utils.h:53:0,
                 from ../../../../src/libstrongswan/library.h:101,
                 from af_alg_ops.h:24,
                 from af_alg_ops.c:16:
af_alg_ops.c:110:22: error: conflicting types for 'crypt'
 METHOD(af_alg_ops_t, crypt, bool,
                      ^
../../../../src/libstrongswan/utils/utils/object.h:99:13: note: in definition of macro 'METHOD'
  static ret name(union {iface *_public; this;} \
             ^
In file included from af_alg_ops.c:18:0:
.../host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/unistd.h:144:7: note: previous declaration of 'crypt' was here
 char *crypt(const char *, const char *);
       ^

Closes strongswan/strongswan#72.
2017-05-15 16:33:21 +02:00
Martin Willi 294ac097d6 af-alg: Silently skip probing algorithms if AF_ALG is not supported
If the af-alg plugin is enabled, but kernel support is missing, we get
an error line during startup for each probed algorithm. This is way too
verbose, so just skip probing if AF_ALG is unsupported.
2016-05-19 11:13:24 +02:00
Andreas Steffen b12c53ce77 Use standard unsigned integer types 2016-03-24 18:52:48 +01:00
Martin Willi 71afe0a556 utils: Use memeq_const() for all cryptographic purposes 2015-04-14 11:53:31 +02:00
Martin Willi 4075e9d7a4 af-alg: Reset hmac/xcbc state before doing set_key() 2015-03-27 16:06:21 +01:00
Martin Willi 4163421f91 plugins: Don't link with -rdynamic on Windows 2014-06-04 15:53:02 +02:00
Tobias Brunner e2c9a03d15 Remove HASH_PREFERRED, usages are replaced with HASH_SHA1, which is required for IKEv2 anyway 2013-10-11 15:13:25 +02:00
Martin Willi 19cb07b890 automake: replace INCLUDES by AM_CPPFLAGS
INCLUDES are now deprecated and throw warnings when using automake 1.13.
We now also differentiate AM_CPPFLAGS and AM_CFLAGS, where includes and
defines are passed to AM_CPPFLAGS only.
2013-07-18 14:59:19 +02:00
Martin Willi 2e9201f4ef af-alg: fix number of signers after adding untruncated HMAC-SHA-512 (1f2a34d6) 2013-05-15 17:20:36 +02:00
Tobias Brunner 1f2a34d6d8 Add support for untruncated HMAC-SHA-512 2013-05-08 15:02:39 +02:00
Tobias Brunner f05b427265 Moved debug.[ch] to utils folder 2012-10-24 16:00:51 +02:00
Martin Willi ae4411547a Check and forward syscall errors in AF_ALG 2012-07-16 14:55:07 +02:00
Martin Willi e3b2e900e6 Add a return value to hasher_t.reset() 2012-07-16 14:55:06 +02:00
Martin Willi 87dd205b61 Add a return value to hasher_t.allocate_hash() 2012-07-16 14:55:06 +02:00
Martin Willi 8bd6a30af1 Add a return value to hasher_t.get_hash() 2012-07-16 14:55:06 +02:00
Martin Willi ce73fc19db Add a return value to crypter_t.set_key() 2012-07-16 14:53:38 +02:00
Martin Willi 3b96189a2a Add a return value to crypter_t.decrypt() 2012-07-16 14:53:38 +02:00
Martin Willi e35abbe588 Add a return value to crypter_t.encrypt 2012-07-16 14:53:37 +02:00
Martin Willi f3ca96b2bf Add a return value to prf_t.set_key() 2012-07-16 14:53:34 +02:00
Martin Willi ecc080b393 Add a return value to prf_t.allocate_bytes() 2012-07-16 14:53:34 +02:00
Martin Willi bc47488323 Add a return value to prf_t.get_bytes() 2012-07-16 14:53:33 +02:00
Martin Willi 2d56575d52 Add a return value to signer_t.set_key() 2012-07-16 14:53:33 +02:00
Martin Willi 2e96de60a8 Add a return value to signer_t.get_signature() 2012-07-16 14:53:33 +02:00
Martin Willi cbfbba7d86 Add a return value to signer_t.allocate_signature() 2012-07-16 14:53:32 +02:00
Martin Willi d6c7b30cad Add features support to af_alg plugin 2011-10-14 10:05:45 +02:00
Martin Willi 628f285778 Fix strict aliasing warning 2011-05-25 10:09:16 +02:00
Martin Willi 513701f41b Fix some warnings triggered by gcc 4.6 -Wunused-but-set-variable 2011-05-19 15:47:40 +02:00
Martin Willi c55818ebb0 Added a (not yet implemented) plugin_t method to reload plugin configuration 2011-04-15 10:07:13 +02:00
Martin Willi 787b5884aa Added a get_name() function to plugin_t, create_plugin_enumerator enumerates over plugin_t 2011-04-15 10:07:12 +02:00
Martin Willi 8dad3072c6 Use an IV size of zero for DES in ECB mode 2011-04-08 14:55:46 +02:00
Martin Willi 2f02375a82 Added support for DES_ECB to af-alg, required for eap-mschapv2 2011-04-05 15:20:38 +02:00
Andreas Steffen d77c6c49a9 printed plugin names have a hyphen 2010-12-24 05:53:27 +01:00
Martin Willi 23a737eb29 Probe for supported AF_ALG algorithms, register dynamically 2010-12-20 10:09:20 +01:00
Martin Willi d214ebdf82 Register some less common AF_ALG ciphers (cast5, serpent, twofish, blowfish) 2010-12-20 09:52:02 +01:00
Martin Willi 533151692f Implemented PRFs using AF_ALG 2010-12-20 09:52:02 +01:00
Martin Willi 06eb35efb0 Use the AF_ALG wrapper in hasher, crypter and signer 2010-12-20 09:52:02 +01:00
Martin Willi 1b5de7ce3b Use a generic AF_ALG wrapper for common operations 2010-12-20 09:52:02 +01:00
Martin Willi a5c973b955 Implemented crypter on top of AF_ALG 2010-12-20 09:52:02 +01:00
Martin Willi e75e1c9473 Implemented signer interface using AF_ALG 2010-12-20 09:52:02 +01:00
Martin Willi 6f08911321 Implemented hasher based on AF_ALG 2010-12-20 09:52:02 +01:00
Martin Willi 71c87e3483 Added plugin stub for AF_ALG 2010-12-20 09:52:02 +01:00