summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:37:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:37:18 +0000
commit82adb3ced76821078f4cd08f73fa8271d225a9a5 (patch)
treea70950ee1ddd4c9623896b14e4e44f61cfec7d3a /lib
parentReleasing progress-linux version 2:2.7.0-1~progress7.99u1. (diff)
downloadcryptsetup-82adb3ced76821078f4cd08f73fa8271d225a9a5.tar.xz
cryptsetup-82adb3ced76821078f4cd08f73fa8271d225a9a5.zip
Merging upstream version 2:2.7.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto_backend/argon2_generic.c9
-rw-r--r--lib/libcryptsetup.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/crypto_backend/argon2_generic.c b/lib/crypto_backend/argon2_generic.c
index eca575b..9b3c039 100644
--- a/lib/crypto_backend/argon2_generic.c
+++ b/lib/crypto_backend/argon2_generic.c
@@ -21,15 +21,18 @@
#include <errno.h>
#include "crypto_backend_internal.h"
+
+/* Check for HAVE_ARGON2_H is run only if libargon2 code is used */
+#if USE_INTERNAL_ARGON2 || HAVE_ARGON2_H
+
+#define CONST_CAST(x) (x)(uintptr_t)
+
#if HAVE_ARGON2_H
#include <argon2.h>
#else
#include "argon2/argon2.h"
#endif
-#define CONST_CAST(x) (x)(uintptr_t)
-
-#if USE_INTERNAL_ARGON2 || HAVE_ARGON2_H
int argon2(const char *type, const char *password, size_t password_length,
const char *salt, size_t salt_length,
char *key, size_t key_length,
diff --git a/lib/libcryptsetup.h b/lib/libcryptsetup.h
index 82d042f..88d03ba 100644
--- a/lib/libcryptsetup.h
+++ b/lib/libcryptsetup.h
@@ -3135,7 +3135,7 @@ void crypt_safe_memzero(void *data, size_t size);
*
* @note keyring_to_link_vk may be passed in various string formats:
* It can be kernel key numeric id of existing keyring written as a string,
- * keyring name prefixed optionally be either "%:" or "%keyring:" substrings or keyctl
+ * keyring name prefixed by either "%:" or "%keyring:" substrings or keyctl
* special values for keyrings "@t", "@p", "@s" and so on. See keyctl(1) man page,
* section KEY IDENTIFIERS for more information. All other prefixes starting "%<type>:"
* are ignored.