mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Merge branch 'master' of github.com:jedisct1/libsodium
* 'master' of github.com:jedisct1/libsodium: Don't even include signal.h on WASI Use unsigned long long for opslimit
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ jobs:
|
||||
curl https://get.wasmer.io -sSfL | sh
|
||||
displayName: Install wasmer
|
||||
- script: |
|
||||
curl -sL -o - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-10/wasi-sdk-10.0-linux.tar.gz | tar xz -f - -C /opt/
|
||||
curl -sL -o - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/wasi-sdk-11.0-linux.tar.gz | tar xz -f - -C /opt/
|
||||
sudo mv /opt/wasi-sdk-* /opt/wasi-sdk
|
||||
sudo ln -s /opt/wasi-sdk/share/*sysroot* /opt/wasi-sysroot
|
||||
displayName: Install the WASI SDK
|
||||
|
||||
@@ -72,14 +72,14 @@ crypto_pwhash_argon2i_strprefix(void)
|
||||
return crypto_pwhash_argon2i_STRPREFIX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2i_opslimit_min(void)
|
||||
{
|
||||
COMPILER_ASSERT(crypto_pwhash_argon2i_OPSLIMIT_MIN >= ARGON2_MIN_TIME);
|
||||
return crypto_pwhash_argon2i_OPSLIMIT_MIN;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2i_opslimit_max(void)
|
||||
{
|
||||
COMPILER_ASSERT(crypto_pwhash_argon2i_OPSLIMIT_MAX <= ARGON2_MAX_TIME);
|
||||
@@ -100,7 +100,7 @@ crypto_pwhash_argon2i_memlimit_max(void)
|
||||
return crypto_pwhash_argon2i_MEMLIMIT_MAX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2i_opslimit_interactive(void)
|
||||
{
|
||||
return crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE;
|
||||
@@ -112,7 +112,7 @@ crypto_pwhash_argon2i_memlimit_interactive(void)
|
||||
return crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2i_opslimit_moderate(void)
|
||||
{
|
||||
return crypto_pwhash_argon2i_OPSLIMIT_MODERATE;
|
||||
@@ -124,7 +124,7 @@ crypto_pwhash_argon2i_memlimit_moderate(void)
|
||||
return crypto_pwhash_argon2i_MEMLIMIT_MODERATE;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2i_opslimit_sensitive(void)
|
||||
{
|
||||
return crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE;
|
||||
|
||||
@@ -68,14 +68,14 @@ crypto_pwhash_argon2id_strprefix(void)
|
||||
return crypto_pwhash_argon2id_STRPREFIX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2id_opslimit_min(void)
|
||||
{
|
||||
COMPILER_ASSERT(crypto_pwhash_argon2id_OPSLIMIT_MIN >= ARGON2_MIN_TIME);
|
||||
return crypto_pwhash_argon2id_OPSLIMIT_MIN;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2id_opslimit_max(void)
|
||||
{
|
||||
COMPILER_ASSERT(crypto_pwhash_argon2id_OPSLIMIT_MAX <= ARGON2_MAX_TIME);
|
||||
@@ -96,7 +96,7 @@ crypto_pwhash_argon2id_memlimit_max(void)
|
||||
return crypto_pwhash_argon2id_MEMLIMIT_MAX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2id_opslimit_interactive(void)
|
||||
{
|
||||
return crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE;
|
||||
@@ -108,7 +108,7 @@ crypto_pwhash_argon2id_memlimit_interactive(void)
|
||||
return crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2id_opslimit_moderate(void)
|
||||
{
|
||||
return crypto_pwhash_argon2id_OPSLIMIT_MODERATE;
|
||||
@@ -120,7 +120,7 @@ crypto_pwhash_argon2id_memlimit_moderate(void)
|
||||
return crypto_pwhash_argon2id_MEMLIMIT_MODERATE;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_argon2id_opslimit_sensitive(void)
|
||||
{
|
||||
return crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE;
|
||||
|
||||
@@ -65,13 +65,13 @@ crypto_pwhash_strprefix(void)
|
||||
return crypto_pwhash_STRPREFIX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_opslimit_min(void)
|
||||
{
|
||||
return crypto_pwhash_OPSLIMIT_MIN;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_opslimit_max(void)
|
||||
{
|
||||
return crypto_pwhash_OPSLIMIT_MAX;
|
||||
@@ -89,7 +89,7 @@ crypto_pwhash_memlimit_max(void)
|
||||
return crypto_pwhash_MEMLIMIT_MAX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_opslimit_interactive(void)
|
||||
{
|
||||
return crypto_pwhash_OPSLIMIT_INTERACTIVE;
|
||||
@@ -101,7 +101,7 @@ crypto_pwhash_memlimit_interactive(void)
|
||||
return crypto_pwhash_MEMLIMIT_INTERACTIVE;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_opslimit_moderate(void)
|
||||
{
|
||||
return crypto_pwhash_OPSLIMIT_MODERATE;
|
||||
@@ -113,7 +113,7 @@ crypto_pwhash_memlimit_moderate(void)
|
||||
return crypto_pwhash_MEMLIMIT_MODERATE;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_opslimit_sensitive(void)
|
||||
{
|
||||
return crypto_pwhash_OPSLIMIT_SENSITIVE;
|
||||
|
||||
@@ -105,13 +105,13 @@ crypto_pwhash_scryptsalsa208sha256_strprefix(void)
|
||||
return crypto_pwhash_scryptsalsa208sha256_STRPREFIX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_scryptsalsa208sha256_opslimit_min(void)
|
||||
{
|
||||
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_scryptsalsa208sha256_opslimit_max(void)
|
||||
{
|
||||
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX;
|
||||
@@ -129,7 +129,7 @@ crypto_pwhash_scryptsalsa208sha256_memlimit_max(void)
|
||||
return crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(void)
|
||||
{
|
||||
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE;
|
||||
@@ -141,7 +141,7 @@ crypto_pwhash_scryptsalsa208sha256_memlimit_interactive(void)
|
||||
return crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE;
|
||||
}
|
||||
|
||||
size_t
|
||||
unsigned long long
|
||||
crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(void)
|
||||
{
|
||||
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE;
|
||||
|
||||
@@ -56,11 +56,11 @@ const char *crypto_pwhash_strprefix(void);
|
||||
|
||||
#define crypto_pwhash_OPSLIMIT_MIN crypto_pwhash_argon2id_OPSLIMIT_MIN
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_opslimit_min(void);
|
||||
unsigned long long crypto_pwhash_opslimit_min(void);
|
||||
|
||||
#define crypto_pwhash_OPSLIMIT_MAX crypto_pwhash_argon2id_OPSLIMIT_MAX
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_opslimit_max(void);
|
||||
unsigned long long crypto_pwhash_opslimit_max(void);
|
||||
|
||||
#define crypto_pwhash_MEMLIMIT_MIN crypto_pwhash_argon2id_MEMLIMIT_MIN
|
||||
SODIUM_EXPORT
|
||||
@@ -72,7 +72,7 @@ size_t crypto_pwhash_memlimit_max(void);
|
||||
|
||||
#define crypto_pwhash_OPSLIMIT_INTERACTIVE crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_opslimit_interactive(void);
|
||||
unsigned long long crypto_pwhash_opslimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_MEMLIMIT_INTERACTIVE crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE
|
||||
SODIUM_EXPORT
|
||||
@@ -80,7 +80,7 @@ size_t crypto_pwhash_memlimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_OPSLIMIT_MODERATE crypto_pwhash_argon2id_OPSLIMIT_MODERATE
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_opslimit_moderate(void);
|
||||
unsigned long long crypto_pwhash_opslimit_moderate(void);
|
||||
|
||||
#define crypto_pwhash_MEMLIMIT_MODERATE crypto_pwhash_argon2id_MEMLIMIT_MODERATE
|
||||
SODIUM_EXPORT
|
||||
@@ -88,7 +88,7 @@ size_t crypto_pwhash_memlimit_moderate(void);
|
||||
|
||||
#define crypto_pwhash_OPSLIMIT_SENSITIVE crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_opslimit_sensitive(void);
|
||||
unsigned long long crypto_pwhash_opslimit_sensitive(void);
|
||||
|
||||
#define crypto_pwhash_MEMLIMIT_SENSITIVE crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE
|
||||
SODIUM_EXPORT
|
||||
|
||||
@@ -48,11 +48,11 @@ const char *crypto_pwhash_argon2i_strprefix(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_OPSLIMIT_MIN 3U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2i_opslimit_min(void);
|
||||
unsigned long long crypto_pwhash_argon2i_opslimit_min(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_OPSLIMIT_MAX 4294967295U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2i_opslimit_max(void);
|
||||
unsigned long long crypto_pwhash_argon2i_opslimit_max(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_MEMLIMIT_MIN 8192U
|
||||
SODIUM_EXPORT
|
||||
@@ -65,7 +65,7 @@ size_t crypto_pwhash_argon2i_memlimit_max(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE 4U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2i_opslimit_interactive(void);
|
||||
unsigned long long crypto_pwhash_argon2i_opslimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE 33554432U
|
||||
SODIUM_EXPORT
|
||||
@@ -73,7 +73,7 @@ size_t crypto_pwhash_argon2i_memlimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_OPSLIMIT_MODERATE 6U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2i_opslimit_moderate(void);
|
||||
unsigned long long crypto_pwhash_argon2i_opslimit_moderate(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_MEMLIMIT_MODERATE 134217728U
|
||||
SODIUM_EXPORT
|
||||
@@ -81,7 +81,7 @@ size_t crypto_pwhash_argon2i_memlimit_moderate(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE 8U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2i_opslimit_sensitive(void);
|
||||
unsigned long long crypto_pwhash_argon2i_opslimit_sensitive(void);
|
||||
|
||||
#define crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE 536870912U
|
||||
SODIUM_EXPORT
|
||||
|
||||
@@ -48,11 +48,11 @@ const char *crypto_pwhash_argon2id_strprefix(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_OPSLIMIT_MIN 1U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2id_opslimit_min(void);
|
||||
unsigned long long crypto_pwhash_argon2id_opslimit_min(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_OPSLIMIT_MAX 4294967295U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2id_opslimit_max(void);
|
||||
unsigned long long crypto_pwhash_argon2id_opslimit_max(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_MEMLIMIT_MIN 8192U
|
||||
SODIUM_EXPORT
|
||||
@@ -65,7 +65,7 @@ size_t crypto_pwhash_argon2id_memlimit_max(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE 2U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2id_opslimit_interactive(void);
|
||||
unsigned long long crypto_pwhash_argon2id_opslimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE 67108864U
|
||||
SODIUM_EXPORT
|
||||
@@ -73,7 +73,7 @@ size_t crypto_pwhash_argon2id_memlimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_OPSLIMIT_MODERATE 3U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2id_opslimit_moderate(void);
|
||||
unsigned long long crypto_pwhash_argon2id_opslimit_moderate(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_MEMLIMIT_MODERATE 268435456U
|
||||
SODIUM_EXPORT
|
||||
@@ -81,7 +81,7 @@ size_t crypto_pwhash_argon2id_memlimit_moderate(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE 4U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_argon2id_opslimit_sensitive(void);
|
||||
unsigned long long crypto_pwhash_argon2id_opslimit_sensitive(void);
|
||||
|
||||
#define crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE 1073741824U
|
||||
SODIUM_EXPORT
|
||||
|
||||
@@ -45,11 +45,11 @@ const char *crypto_pwhash_scryptsalsa208sha256_strprefix(void);
|
||||
|
||||
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN 32768U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_min(void);
|
||||
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_min(void);
|
||||
|
||||
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX 4294967295U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_max(void);
|
||||
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_max(void);
|
||||
|
||||
#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN 16777216U
|
||||
SODIUM_EXPORT
|
||||
@@ -62,7 +62,7 @@ size_t crypto_pwhash_scryptsalsa208sha256_memlimit_max(void);
|
||||
|
||||
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE 524288U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(void);
|
||||
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE 16777216U
|
||||
SODIUM_EXPORT
|
||||
@@ -70,7 +70,7 @@ size_t crypto_pwhash_scryptsalsa208sha256_memlimit_interactive(void);
|
||||
|
||||
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE 33554432U
|
||||
SODIUM_EXPORT
|
||||
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(void);
|
||||
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(void);
|
||||
|
||||
#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE 1073741824U
|
||||
SODIUM_EXPORT
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef __wasm__
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#ifdef HAVE_CATCHABLE_SEGV
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
#define TEST_NAME "sodium_utils2"
|
||||
#include "cmptest.h"
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#ifdef HAVE_CATCHABLE_SEGV
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
#define TEST_NAME "sodium_utils3"
|
||||
#include "cmptest.h"
|
||||
|
||||
Reference in New Issue
Block a user