Mercurial > hg > orthanc
annotate OrthancFramework/Resources/Patches/openssl-3.0.1.patch @ 4938:f630796a59b1 more-tags
ExpandResource now able to return computed tags (like ModalitiesInStudies)
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 14 Mar 2022 16:44:00 +0100 |
parents | d1aae7c3dd5d |
children |
rev | line source |
---|---|
4861
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 diff -urEb openssl-3.0.1.orig/crypto/threads_win.c openssl-3.0.1/crypto/threads_win.c |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 --- openssl-3.0.1.orig/crypto/threads_win.c 2021-12-24 16:56:23.016304241 +0100 |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 +++ openssl-3.0.1/crypto/threads_win.c 2021-12-24 16:58:09.436272646 +0100 |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 @@ -207,13 +207,30 @@ |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret, |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 CRYPTO_RWLOCK *lock) |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 { |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 +#if defined(_WIN32) && !defined(_WIN64) |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 + /** |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 + * Prevents the following error, at least on Visual Studio 2008, |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 + * but most probably on any Window 32bit system: |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 + * "CoreLibrary.lib(threads_win.obj) : error LNK2019: unresolved |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 + * external symbol _InterlockedOr64 referenced in function |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 + * _CRYPTO_atomic_or". TODO - The lock should be locked! |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 + * https://developercommunity.visualstudio.com/t/-interlockedexchangeadd64-is-unresolved-on-x86/1227636 |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 + **/ |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 + *ret = (*val) | op; |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 +#else |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 *ret = (uint64_t)InterlockedOr64((LONG64 volatile *)val, (LONG64)op) | op; |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 +#endif |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 return 1; |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 } |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock) |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 { |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 +#if defined(_WIN32) && !defined(_WIN64) |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 + /* See comment above */ |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 + *ret = *val; |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 +#else |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 *ret = (uint64_t)InterlockedOr64((LONG64 volatile *)val, 0); |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 +#endif |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 return 1; |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 } |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 diff -urEb openssl-3.0.1.orig/providers/implementations/rands/seeding/rand_unix.c openssl-3.0.1/providers/implementations/rands/seeding/rand_unix.c |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 --- openssl-3.0.1.orig/providers/implementations/rands/seeding/rand_unix.c 2021-12-24 16:56:23.056304227 +0100 |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 +++ openssl-3.0.1/providers/implementations/rands/seeding/rand_unix.c 2021-12-24 16:57:03.408290650 +0100 |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 @@ -453,6 +453,7 @@ |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 * system call and this should always succeed which renders |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 * this alternative but essentially identical source moot. |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 */ |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 +#if !defined(__LSB_VERSION__) // "syscall()" is not available in LSB |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 if (uname(&un) == 0) { |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 kernel[0] = atoi(un.release); |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 p = strchr(un.release, '.'); |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 @@ -463,6 +464,7 @@ |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 return 0; |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 } |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 } |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 +#endif |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 /* Open /dev/random and wait for it to be readable */ |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 if ((fd = open(DEVRANDOM_WAIT, O_RDONLY)) != -1) { |
d1aae7c3dd5d
upgraded openssl to 3.0.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 if (DEVRANDM_WAIT_USE_SELECT && fd < FD_SETSIZE) { |