Thread: pgsql: pgcrypto: Remove non-OpenSSL support

pgsql: pgcrypto: Remove non-OpenSSL support

From
Peter Eisentraut
Date:
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/db7d1a7b0530e8cbd045744e1c75b0e63fb6916f

Modified Files
--------------
contrib/Makefile                    |    5 +-
contrib/pgcrypto/Makefile           |   73 +-
contrib/pgcrypto/blf.c              |  499 -----
contrib/pgcrypto/blf.h              |   46 -
contrib/pgcrypto/imath.c            | 3588 -----------------------------------
contrib/pgcrypto/imath.h            |  445 -----
contrib/pgcrypto/internal-sha2.c    |  206 --
contrib/pgcrypto/internal.c         |  585 ------
contrib/pgcrypto/pgp-mpi-internal.c |  304 ---
contrib/pgcrypto/rijndael.c         |  677 -------
contrib/pgcrypto/rijndael.h         |   59 -
contrib/pgcrypto/rijndael.tbl       | 1138 -----------
doc/src/sgml/pgcrypto.sgml          |  113 +-
src/tools/msvc/Mkvcbuild.pm         |   39 +-
src/tools/msvc/vcregress.pl         |    7 +-
15 files changed, 42 insertions(+), 7742 deletions(-)


Re: pgsql: pgcrypto: Remove non-OpenSSL support

From
Andres Freund
Date:
Hi,

On 2021-11-05 13:09:55 +0000, Peter Eisentraut wrote:
> 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.

This appears to have broken msvc pgcrypto being tested with msvc. I think
that's because pgcrypto is still listed in the "base" @contrib_excludes and
thus just isn't getting built anymore, now that the special-case build rule is
gone?

Greetings,

Andres Freund



Re: pgsql: pgcrypto: Remove non-OpenSSL support

From
Tom Lane
Date:
Andres Freund <andres@anarazel.de> writes:
> This appears to have broken msvc pgcrypto being tested with msvc. I think
> that's because pgcrypto is still listed in the "base" @contrib_excludes and
> thus just isn't getting built anymore, now that the special-case build rule is
> gone?

I came to the same conclusion and pushed that change.  We'll soon
see whether it's sufficient.

            regards, tom lane



Re: pgsql: pgcrypto: Remove non-OpenSSL support

From
Tom Lane
Date:
Andres Freund <andres@anarazel.de> writes:
> The log excerpt appears to be from bowerbird [1], and predates that commit. I
> didn't see any windows buildfarm run that completed since the above commit.

bowerbird just came through with a green run.

            regards, tom lane