summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorČestmír Kalina <ckalina@redhat.com>2021-09-27 22:42:11 +0200
committerMatt Caswell <matt@openssl.org>2022-10-17 09:45:39 +0100
commit4574a7fd8dda070b129d76defca07703cab53842 (patch)
treea6e03446b0f784e550010a2c51efe5b7861e9473 /Configure
parentb1372197496650c3cb318cade911a3bd6af14adc (diff)
downloadopenssl-new-4574a7fd8dda070b129d76defca07703cab53842.tar.gz
crypto: add preemptive threading support
Some primitives are designed to be used in a multi-threaded environment, if supported, e.g., Argon2. This patch adds support for preemptive threading and basic synchronization primitives for platforms compliant with POSIX threads or Windows CRT. Native functions are wrapped to provide a common (internal) API. Threading support can be disabled at compile time. If enabled, threading is disabled by default and needs to be explicitly enabled by the user. Thread enablement requires an explicit limit on the number of threads that OpenSSL may spawn (non-negative integer/infinity). The limit may be changed. Signed-off-by: Čestmír Kalina <ckalina@redhat.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12255)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure19
1 files changed, 3 insertions, 16 deletions
diff --git a/Configure b/Configure
index 01c2d0bafe..fbafe0e867 100755
--- a/Configure
+++ b/Configure
@@ -655,6 +655,9 @@ my @disable_cascades = (
"fips" => [ "fips-securitychecks", "acvp-tests" ],
+ "threads" => [ "thread-pool" ],
+ "thread-pool" => [ "default-thread-pool" ],
+
"deprecated-3.0" => [ "engine", "srp" ]
);
@@ -812,8 +815,6 @@ while (@argvcopy)
s /^-?-?shared$/enable-shared/;
s /^sctp$/enable-sctp/;
s /^threads$/enable-threads/;
- s /^thread-pool$/enable-thread-pool/;
- s /^default-thread-pool$/enable-default-thread-pool/;
s /^zlib$/enable-zlib/;
s /^zlib-dynamic$/enable-zlib-dynamic/;
s /^fips$/enable-fips/;
@@ -1400,14 +1401,6 @@ if (grep { $_ =~ /(?:^|\s)-static(?:\s|$)/ } @{$config{LDFLAGS}}) {
disable('static', 'pic', 'threads');
}
-if ($disabled{threads}) {
- disable('unavailable', 'thread-pool');
-}
-
-if ($disabled{"thread-pool"}) {
- disable('unavailable', 'default-thread-pool');
-}
-
# Allow overriding the build file name
$config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile";
@@ -1506,12 +1499,6 @@ foreach (grep /^-fsanitize=/, @{$config{CFLAGS} || []}) {
unless($disabled{threads}) {
push @{$config{openssl_feature_defines}}, "OPENSSL_THREADS";
}
-unless($disabled{"thread-pool"}) {
- push @{$config{openssl_feature_defines}}, "OPENSSL_THREAD_POOL";
-}
-unless($disabled{"default-thread-pool"}) {
- push @{$config{openssl_feature_defines}}, "OPENSSL_DEFAULT_THREAD_POOL";
-}
my $no_shared_warn=0;
if (($target{shared_target} // '') eq "")