Mercurial > hg > orthanc
annotate OrthancFramework/Resources/Patches/openssl-3.1.4.patch @ 5502:834be222605b
upgraded to OpenSSL 3.1.4
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 24 Jan 2024 17:16:06 +0100 |
parents | |
children |
rev | line source |
---|---|
5502
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 diff -urEb openssl-3.1.4.orig/crypto/riscvcap.c openssl-3.1.4/crypto/riscvcap.c |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 --- openssl-3.1.4.orig/crypto/riscvcap.c 2024-01-24 16:58:48.308108757 +0100 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 +++ openssl-3.1.4/crypto/riscvcap.c 2024-01-24 17:01:04.114914015 +0100 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 @@ -37,7 +37,8 @@ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 static void strtoupper(char *str) |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 { |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 - for (char *x = str; *x; ++x) |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 + char* x; |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 + for (x = str; *x; ++x) |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 *x = toupper(*x); |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 } |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 @@ -51,12 +52,13 @@ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 { |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 char envstrupper[BUFLEN]; |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 char buf[BUFLEN]; |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 + size_t i; |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 /* Convert env str to all uppercase */ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 OPENSSL_strlcpy(envstrupper, envstr, sizeof(envstrupper)); |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 strtoupper(envstrupper); |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 - for (size_t i = 0; i < kRISCVNumCaps; ++i) { |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 + for (i = 0; i < kRISCVNumCaps; ++i) { |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 /* Prefix capability with underscore in preparation for search */ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 BIO_snprintf(buf, BUFLEN, "_%s", RISCV_capabilities[i].name); |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 if (strstr(envstrupper, buf) != NULL) { |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 diff -urEb openssl-3.1.4.orig/providers/implementations/rands/seeding/rand_unix.c openssl-3.1.4/providers/implementations/rands/seeding/rand_unix.c |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 --- openssl-3.1.4.orig/providers/implementations/rands/seeding/rand_unix.c 2024-01-24 16:58:48.332108547 +0100 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 +++ openssl-3.1.4/providers/implementations/rands/seeding/rand_unix.c 2024-01-24 17:01:30.182683539 +0100 |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 @@ -452,6 +452,7 @@ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 * system call and this should always succeed which renders |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 * this alternative but essentially identical source moot. |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 */ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 +#if !defined(__LSB_VERSION__) // "syscall()" is not available in LSB |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 if (uname(&un) == 0) { |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 kernel[0] = atoi(un.release); |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 p = strchr(un.release, '.'); |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 @@ -462,6 +463,7 @@ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 return 0; |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 } |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 } |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 +#endif |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 /* Open /dev/random and wait for it to be readable */ |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 if ((fd = open(DEVRANDOM_WAIT, O_RDONLY)) != -1) { |
834be222605b
upgraded to OpenSSL 3.1.4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 if (DEVRANDM_WAIT_USE_SELECT && fd < FD_SETSIZE) { |