aboutsummaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-05-02 16:50:51 +0200
committerRichard Levitte <levitte@openssl.org>2016-05-02 20:19:41 +0200
commitb5293d4c8dde9f71df27723071869ac8b62a0649 (patch)
treef65a3423c8ccf673f3cd554aed5e2282297f855c /Configure
parent85e2fe81136087961ef1b6a40058d3916db08d70 (diff)
downloadopenssl-b5293d4c8dde9f71df27723071869ac8b62a0649.zip
openssl-b5293d4c8dde9f71df27723071869ac8b62a0649.tar.gz
openssl-b5293d4c8dde9f71df27723071869ac8b62a0649.tar.bz2
Add the possibility to have an extra local OpenSSL configs directory
The environment variable OPENSSL_LOCAL_CONFIG_DIR is used to indicate that there's a local directory with extra configuration files. Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/Configure b/Configure
index 90103bb..3d36783 100755
--- a/Configure
+++ b/Configure
@@ -178,6 +178,8 @@ my $srcdir = catdir(absolutedir(dirname($0))); # catdir ensures local syntax
my $blddir = catdir(absolutedir(".")); # catdir ensures local syntax
my $dofile = abs2rel(catfile($srcdir, "util/dofile.pl"));
+my $local_config_envname = 'OPENSSL_LOCAL_CONFIG_DIR';
+
$config{sourcedir} = abs2rel($srcdir);
$config{builddir} = abs2rel($blddir);
@@ -212,6 +214,20 @@ foreach (sort glob($pattern) ) {
&read_config($_);
}
+if (defined $ENV{$local_config_envname}) {
+ if ($^O eq 'VMS') {
+ # VMS environment variables are logical names,
+ # which can be used as is
+ $pattern = $local_config_envname . ':' . '*.conf';
+ } else {
+ $pattern = catfile($ENV{$local_config_envname}, '*.conf');
+ }
+
+ foreach (sort glob($pattern) ) {
+ &read_config($_);
+ }
+}
+
print "Configuring OpenSSL version $config{version} (0x$config{version_num})\n";