64 lines
2.4 KiB
Diff
64 lines
2.4 KiB
Diff
diff -Naur cjose-0.6.2.3.orig/configure.ac cjose-0.6.2.3/configure.ac
|
|
--- cjose-0.6.2.3.orig/configure.ac 2024-04-25 00:37:05.329611900 +0300
|
|
+++ cjose-0.6.2.3/configure.ac 2024-04-25 00:37:21.329933800 +0300
|
|
@@ -6,7 +6,7 @@
|
|
AC_INIT([cjose], [0.6.2.3])
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
LT_PREREQ([2.2])
|
|
-LT_INIT([dlopen])
|
|
+LT_INIT([win32-dll])
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
### Basic program checks
|
|
diff -Naur cjose-0.6.2.3.orig/src/Makefile.am cjose-0.6.2.3/src/Makefile.am
|
|
--- cjose-0.6.2.3.orig/src/Makefile.am 2024-04-25 00:37:05.235862500 +0300
|
|
+++ cjose-0.6.2.3/src/Makefile.am 2024-04-25 00:38:14.580215200 +0300
|
|
@@ -2,7 +2,7 @@
|
|
|
|
lib_LTLIBRARIES=libcjose.la
|
|
libcjose_la_CPPFLAGS= -I$(top_srcdir)/include
|
|
-libcjose_la_LDFLAGS= -no-undefined -lm
|
|
+libcjose_la_LDFLAGS= -no-undefined -lm -lws2_32
|
|
libcjose_la_SOURCES=version.c \
|
|
util.c \
|
|
base64.c \
|
|
diff -Naur cjose-0.6.2.3.orig/test/check_concatkdf.c cjose-0.6.2.3/test/check_concatkdf.c
|
|
--- cjose-0.6.2.3.orig/test/check_concatkdf.c 2024-04-25 00:37:05.407790400 +0300
|
|
+++ cjose-0.6.2.3/test/check_concatkdf.c 2024-04-25 00:37:21.329933800 +0300
|
|
@@ -9,7 +9,11 @@
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
+#ifdef _WIN32
|
|
+#include <Winsock2.h>
|
|
+#else
|
|
#include <arpa/inet.h>
|
|
+#endif
|
|
#include <cjose/base64.h>
|
|
#include <cjose/error.h>
|
|
#include <cjose/header.h>
|
|
diff -Naur cjose-0.6.2.3.orig/test/check_jwe.c cjose-0.6.2.3/test/check_jwe.c
|
|
--- cjose-0.6.2.3.orig/test/check_jwe.c 2024-04-25 00:37:05.392114200 +0300
|
|
+++ cjose-0.6.2.3/test/check_jwe.c 2024-04-25 00:37:21.329933800 +0300
|
|
@@ -435,7 +435,7 @@
|
|
// encrypt and decrypt a whole lot of randomly sized payloads
|
|
for (int i = 0; i < 100; ++i)
|
|
{
|
|
- size_t len = random() % 1024;
|
|
+ size_t len = rand() % 1024;
|
|
char *plain = (char *)malloc(len);
|
|
ck_assert_msg(RAND_bytes(plain, len) == 1, "RAND_bytes failed");
|
|
plain[len - 1] = 0;
|
|
diff -Naur cjose-0.6.2.3.orig/test/check_jws.c cjose-0.6.2.3/test/check_jws.c
|
|
--- cjose-0.6.2.3.orig/test/check_jws.c 2024-04-25 00:37:05.392114200 +0300
|
|
+++ cjose-0.6.2.3/test/check_jws.c 2024-04-25 00:37:21.345570900 +0300
|
|
@@ -209,7 +209,7 @@
|
|
// sign and verify a whole lot of randomly sized payloads
|
|
for (int i = 0; i < 100; ++i)
|
|
{
|
|
- size_t len = random() % 1024;
|
|
+ size_t len = rand() % 1024;
|
|
char *plain = (char *)malloc(len);
|
|
ck_assert_msg(RAND_bytes(plain, len) == 1, "RAND_bytes failed");
|
|
plain[len - 1] = 0;
|