react-native-quick-crypto 1.0.0-beta.19 → 1.0.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,7 +53,7 @@ android {
53
53
  externalNativeBuild {
54
54
  cmake {
55
55
  cppFlags "-frtti -fexceptions -Wall -fstack-protector-all"
56
- arguments "-DANDROID_STL=c++_shared",
56
+ arguments "-DANDROID_STL=c++_shared",
57
57
  "-DSODIUM_ENABLED=${sodiumEnabled}",
58
58
  "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
59
59
  abiFilters (*reactNativeArchitectures())
@@ -143,11 +143,11 @@ dependencies {
143
143
  implementation project(":react-native-nitro-modules")
144
144
 
145
145
  // Add a dependency on OpenSSL
146
- implementation 'io.github.ronickg:openssl:3.3.2'
146
+ implementation 'io.github.ronickg:openssl:3.3.2-1'
147
147
 
148
148
  if (sodiumEnabled) {
149
149
  // Add a dependency on libsodium
150
- implementation 'io.github.ronickg:sodium:1.0.20'
150
+ implementation 'io.github.ronickg:sodium:1.0.20-1'
151
151
  }
152
152
  }
153
153
 
@@ -658,7 +658,7 @@ AC_SUBST(CFLAGS_RDRAND)
658
658
 
659
659
  AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/random.h intrin.h sys/auxv.h])
660
660
  AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h])
661
- AC_CHECK_HEADERS([cet.h])
661
+ AC_CHECK_HEADERS([cet.h threads.h])
662
662
 
663
663
  AC_MSG_CHECKING([if _xgetbv() is available])
664
664
  AC_LINK_IFELSE(
@@ -36,7 +36,7 @@
36
36
  # and this notice are preserved. This file is offered as-is, without any
37
37
  # warranty.
38
38
 
39
- #serial 8
39
+ #serial 10
40
40
 
41
41
  AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[
42
42
  ac_save_cflags=$CFLAGS
@@ -58,7 +58,7 @@ AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[
58
58
  AC_LANG_SOURCE([[
59
59
  #define _FORTIFY_SOURCE 3
60
60
  #include <string.h>
61
- int main() {
61
+ int main(void) {
62
62
  char *s = " ";
63
63
  strcpy(s, "x");
64
64
  return strlen(s)-1;
@@ -71,13 +71,11 @@ AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[
71
71
  CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=3"
72
72
  ], [
73
73
  AC_MSG_RESULT([no])
74
- CFLAGS=$ac_save_cflags
75
74
  ax_add_fortify_3_failed=1
76
75
  ],
77
76
  ),
78
77
  [
79
78
  AC_MSG_RESULT([no])
80
- CFLAGS=$ac_save_cflags
81
79
  ax_add_fortify_3_failed=1
82
80
  ])
83
81
  if test -n "$ax_add_fortify_3_failed"
@@ -36,21 +36,19 @@
36
36
  # AX_VALGRIND_DFLT([sgcheck], [off])
37
37
  # AX_VALGRIND_CHECK
38
38
  #
39
- # Makefile.am:
39
+ # in each Makefile.am with tests:
40
40
  #
41
41
  # @VALGRIND_CHECK_RULES@
42
42
  # VALGRIND_SUPPRESSIONS_FILES = my-project.supp
43
43
  # EXTRA_DIST = my-project.supp
44
44
  #
45
- # This results in a "check-valgrind" rule being added to any Makefile.am
46
- # which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been
47
- # configured with --enable-valgrind). Running `make check-valgrind` in
48
- # that directory will run the module's test suite (`make check`) once for
49
- # each of the available Valgrind tools (out of memcheck, helgrind and drd)
50
- # while the sgcheck will be skipped unless enabled again on the
51
- # commandline with --enable-valgrind-sgcheck. The results for each check
52
- # will be output to test-suite-$toolname.log. The target will succeed if
53
- # there are zero errors and fail otherwise.
45
+ # This results in a "check-valgrind" rule being added. Running `make
46
+ # check-valgrind` in that directory will recursively run the module's test
47
+ # suite (`make check`) once for each of the available Valgrind tools (out
48
+ # of memcheck, helgrind and drd) while the sgcheck will be skipped unless
49
+ # enabled again on the commandline with --enable-valgrind-sgcheck. The
50
+ # results for each check will be output to test-suite-$toolname.log. The
51
+ # target will succeed if there are zero errors and fail otherwise.
54
52
  #
55
53
  # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in
56
54
  # memcheck, helgrind, drd and sgcheck. These are useful because often only
@@ -67,7 +65,7 @@
67
65
  # and this notice are preserved. This file is offered as-is, without any
68
66
  # warranty.
69
67
 
70
- #serial 15
68
+ #serial 23
71
69
 
72
70
  dnl Configured tools
73
71
  m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]])
@@ -80,10 +78,14 @@ AC_DEFUN([AX_VALGRIND_DFLT],[
80
78
  ])dnl
81
79
 
82
80
  AC_DEFUN([AX_VALGRIND_CHECK],[
81
+ AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
82
+ m4_foreach([vgtool], [valgrind_tool_list],
83
+ [AM_EXTRA_RECURSIVE_TARGETS([check-valgrind-]vgtool)])
84
+
83
85
  dnl Check for --enable-valgrind
84
86
  AC_ARG_ENABLE([valgrind],
85
- [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests (requires GNU make)])],
86
- [enable_valgrind=$enableval],[enable_valgrind=no])
87
+ [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])],
88
+ [enable_valgrind=$enableval],[enable_valgrind=])
87
89
 
88
90
  AS_IF([test "$enable_valgrind" != "no"],[
89
91
  # Check for Valgrind.
@@ -175,7 +177,7 @@ valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY))
175
177
  valgrind_quiet_0 = --quiet
176
178
  valgrind_v_use = $(valgrind_v_use_$(V))
177
179
  valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY))
178
- valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):;
180
+ valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%-local,%,$''@):;
179
181
 
180
182
  # Support running with and without libtool.
181
183
  ifneq ($(LIBTOOL),)
@@ -185,12 +187,12 @@ valgrind_lt =
185
187
  endif
186
188
 
187
189
  # Use recursive makes in order to ignore errors during check
188
- check-valgrind:
190
+ check-valgrind-local:
189
191
  ifeq ($(VALGRIND_ENABLED),yes)
190
192
  $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \
191
193
  $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool))
192
194
  else
193
- @echo "Need to use GNU make and reconfigure with --enable-valgrind"
195
+ @echo "Need to reconfigure with --enable-valgrind"
194
196
  endif
195
197
 
196
198
  # Valgrind running
@@ -204,14 +206,16 @@ VALGRIND_LOG_COMPILER = \
204
206
  $(valgrind_lt) \
205
207
  $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS)
206
208
 
207
- define valgrind_tool_rule =
208
- check-valgrind-$(1):
209
+ define valgrind_tool_rule
210
+ check-valgrind-$(1)-local:
209
211
  ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes)
212
+ ifneq ($$(TESTS),)
210
213
  $$(valgrind_v_use)$$(MAKE) check-TESTS \
211
214
  TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \
212
215
  LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \
213
216
  LOG_FLAGS="$$(valgrind_$(1)_flags)" \
214
217
  TEST_SUITE_LOG=test-suite-$(1).log
218
+ endif
215
219
  else ifeq ($$(VALGRIND_ENABLED),yes)
216
220
  @echo "Need to reconfigure with --enable-valgrind-$(1)"
217
221
  else
@@ -227,15 +231,9 @@ A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind
227
231
  MOSTLYCLEANFILES ?=
228
232
  MOSTLYCLEANFILES += $(valgrind_log_files)
229
233
 
230
- .PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools))
234
+ .PHONY: check-valgrind $(addprefix check-valgrind-,$(valgrind_tools))
231
235
  ']
232
236
 
233
- AS_IF([test "$enable_valgrind" != "yes"], [
234
- VALGRIND_CHECK_RULES='
235
- check-valgrind:
236
- @echo "Need to use GNU make and reconfigure with --enable-valgrind"'
237
- ])
238
-
239
237
  AC_SUBST([VALGRIND_CHECK_RULES])
240
238
  m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])])
241
239
  ])
@@ -5,11 +5,13 @@
5
5
  #include <limits.h>
6
6
  #include <stdint.h>
7
7
  #include <stdlib.h>
8
- #include <stdlib.h>
9
8
  #include <string.h>
10
9
  #if !defined(_MSC_VER) && !defined(__BORLANDC__)
11
10
  # include <unistd.h>
12
11
  #endif
12
+ #if !defined(__STDC_NO_THREADS__) && defined(HAVE_THREADS_H)
13
+ # include <threads.h>
14
+ #endif
13
15
 
14
16
  #include <sys/types.h>
15
17
  #ifndef _WIN32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-quick-crypto",
3
- "version": "1.0.0-beta.19",
3
+ "version": "1.0.0-beta.20",
4
4
  "description": "A fast implementation of Node's `crypto` module written in C/C++ JSI",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",