aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-11-05 13:59:42 +0100
committerPeter Eisentraut <peter@eisentraut.org>2021-11-05 14:06:59 +0100
commitdb7d1a7b0530e8cbd045744e1c75b0e63fb6916f (patch)
treea03045045b1bd83cabc6bd2994c156c93c5b65a7 /src
parenta5b336b8b9e04a93e7c8526302504d2e5201eb80 (diff)
downloadpostgresql-db7d1a7b0530e8cbd045744e1c75b0e63fb6916f.tar.gz
postgresql-db7d1a7b0530e8cbd045744e1c75b0e63fb6916f.zip
pgcrypto: Remove non-OpenSSL support
pgcrypto had internal implementations of some encryption algorithms, as an alternative to calling out to OpenSSL. These were rarely used, since most production installations are built with OpenSSL. Moreover, maintaining parallel code paths makes the code more complex and difficult to maintain. This patch removes these internal implementations. Now, pgcrypto is only built if OpenSSL support is configured. Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://www.postgresql.org/message-id/flat/0b42f1df-8cba-6a30-77d7-acc241cc88c1%40enterprisedb.com
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/Mkvcbuild.pm39
-rw-r--r--src/tools/msvc/vcregress.pl7
2 files changed, 3 insertions, 43 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 4362bd44fd1..856fb7a2cc5 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -440,7 +440,7 @@ sub mkvcbuild
if (!$solution->{options}->{openssl})
{
- push @contrib_excludes, 'sslinfo', 'ssl_passphrase_callback';
+ push @contrib_excludes, 'sslinfo', 'ssl_passphrase_callback', 'pgcrypto';
}
if (!$solution->{options}->{uuid})
@@ -448,41 +448,6 @@ sub mkvcbuild
push @contrib_excludes, 'uuid-ossp';
}
- # AddProject() does not recognize the constructs used to populate OBJS in
- # the pgcrypto Makefile, so it will discover no files.
- my $pgcrypto =
- $solution->AddProject('pgcrypto', 'dll', 'crypto', 'contrib/pgcrypto');
- $pgcrypto->AddFiles(
- 'contrib/pgcrypto', 'pgcrypto.c',
- 'px.c', 'px-hmac.c',
- 'px-crypt.c', 'crypt-gensalt.c',
- 'crypt-blowfish.c', 'crypt-des.c',
- 'crypt-md5.c', 'mbuf.c',
- 'pgp.c', 'pgp-armor.c',
- 'pgp-cfb.c', 'pgp-compress.c',
- 'pgp-decrypt.c', 'pgp-encrypt.c',
- 'pgp-info.c', 'pgp-mpi.c',
- 'pgp-pubdec.c', 'pgp-pubenc.c',
- 'pgp-pubkey.c', 'pgp-s2k.c',
- 'pgp-pgsql.c');
- if ($solution->{options}->{openssl})
- {
- $pgcrypto->AddFiles('contrib/pgcrypto', 'openssl.c',
- 'pgp-mpi-openssl.c');
- }
- else
- {
- $pgcrypto->AddFiles(
- 'contrib/pgcrypto', 'internal.c',
- 'internal-sha2.c', 'blf.c',
- 'rijndael.c', 'pgp-mpi-internal.c',
- 'imath.c');
- }
- $pgcrypto->AddReference($postgres);
- $pgcrypto->AddLibrary('ws2_32.lib');
- my $mf = Project::read_file('contrib/pgcrypto/Makefile');
- GenerateContribSqlFiles('pgcrypto', $mf);
-
foreach my $subdir ('contrib', 'src/test/modules')
{
opendir($D, $subdir) || croak "Could not opendir on $subdir!\n";
@@ -795,7 +760,7 @@ sub mkvcbuild
}
}
- $mf =
+ my $mf =
Project::read_file('src/backend/utils/mb/conversion_procs/Makefile');
$mf =~ s{\\\r?\n}{}g;
$mf =~ m{SUBDIRS\s*=\s*(.*)$}m
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index fc826da3ff2..f3357b32920 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -726,18 +726,13 @@ sub fetchTests
if ($m =~ /contrib\/pgcrypto/)
{
- # pgcrypto is special since the tests depend on the
+ # pgcrypto is special since some tests depend on the
# configuration of the build
- my $cftests =
- $config->{openssl}
- ? GetTests("OSSL_TESTS", $m)
- : GetTests("INT_TESTS", $m);
my $pgptests =
$config->{zlib}
? GetTests("ZLIB_TST", $m)
: GetTests("ZLIB_OFF_TST", $m);
- $t =~ s/\$\(CF_TESTS\)/$cftests/;
$t =~ s/\$\(CF_PGP_TESTS\)/$pgptests/;
}
}