Skip to content

Commit b9d0f0d

Browse files
Merge pull request #5779 from larsewi/unsupported-3.21.x
Upgrade workflow from unsupported platform (3.21.x)
2 parents c68235e + 7ddcbe3 commit b9d0f0d

6 files changed

Lines changed: 25 additions & 5 deletions

File tree

.github/workflows/acceptance_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
acceptance_tests:
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-22.04
99
steps:
1010
- uses: actions/checkout@v3
1111
with:

.github/workflows/asan_unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
asan_unit_tests:
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-22.04
99
steps:
1010
- uses: actions/checkout@v3
1111
with:
@@ -17,4 +17,4 @@ jobs:
1717
- name: Compile and link (make)
1818
run: make -j8 CFLAGS="-Werror -Wall -fsanitize=address" LDFLAGS="-fsanitize=address"
1919
- name: Run unit tests
20-
run: make -C tests/unit CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address" check
20+
run: ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS="suppressions=../../.github/workflows/suppr.txt" make -C tests/unit CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address" check

.github/workflows/shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
jobs:
55
unit_tests:
66
name: Run shellcheck on shell scripts
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88
steps:
99
- uses: actions/checkout@v3
1010
with:

.github/workflows/suppr.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
leak:crypto

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
jobs:
55
unit_tests:
66
name: Run Unit Tests
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88
steps:
99
- uses: actions/checkout@v3
1010
with:

libpromises/crypto.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ static void CleanupOpenSSLThreadLocks(void);
6363

6464
static bool crypto_initialized = false; /* GLOBAL_X */
6565

66+
#if OPENSSL_VERSION_NUMBER > 0x30000000
67+
static OSSL_PROVIDER *legacy_provider = NULL;
68+
static OSSL_PROVIDER *default_provider = NULL;
69+
#endif
70+
6671
const char *CryptoLastErrorString()
6772
{
6873
const char *errmsg = ERR_reason_error_string(ERR_get_error());
@@ -114,6 +119,20 @@ void CryptoDeInitialize()
114119
EVP_cleanup();
115120
CleanupOpenSSLThreadLocks();
116121
ERR_free_strings();
122+
123+
#if OPENSSL_VERSION_NUMBER > 0x30000000
124+
if (legacy_provider != NULL)
125+
{
126+
OSSL_PROVIDER_unload(legacy_provider);
127+
legacy_provider = NULL;
128+
}
129+
if (default_provider != NULL)
130+
{
131+
OSSL_PROVIDER_unload(default_provider);
132+
default_provider = NULL;
133+
}
134+
#endif
135+
117136
crypto_initialized = false;
118137
}
119138
}

0 commit comments

Comments
 (0)