From b2cc748b09456ea24cdd00a7691ce33db9a1af45 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 30 Nov 2016 13:04:16 +0200 Subject: [PATCH] Remove dead stuff from pgcrypto. pgp-pubkey-DISABLED test has been unused since 2006, when support for built-in bignum math was added (commit 1abf76e8). pgp-encrypt-DISABLED has been unused forever, AFAICS. Also remove a couple of unused error codes. --- contrib/pgcrypto/expected/pgp-encrypt-DISABLED.out | 1 - contrib/pgcrypto/expected/pgp-pubkey-DISABLED.out | 1 - contrib/pgcrypto/px.c | 4 ---- contrib/pgcrypto/px.h | 4 ++-- contrib/pgcrypto/sql/pgp-encrypt-DISABLED.sql | 1 - contrib/pgcrypto/sql/pgp-pubkey-DISABLED.sql | 1 - 6 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 contrib/pgcrypto/expected/pgp-encrypt-DISABLED.out delete mode 100644 contrib/pgcrypto/expected/pgp-pubkey-DISABLED.out delete mode 100644 contrib/pgcrypto/sql/pgp-encrypt-DISABLED.sql delete mode 100644 contrib/pgcrypto/sql/pgp-pubkey-DISABLED.sql diff --git a/contrib/pgcrypto/expected/pgp-encrypt-DISABLED.out b/contrib/pgcrypto/expected/pgp-encrypt-DISABLED.out deleted file mode 100644 index 4122300d97..0000000000 --- a/contrib/pgcrypto/expected/pgp-encrypt-DISABLED.out +++ /dev/null @@ -1 +0,0 @@ --- no random source diff --git a/contrib/pgcrypto/expected/pgp-pubkey-DISABLED.out b/contrib/pgcrypto/expected/pgp-pubkey-DISABLED.out deleted file mode 100644 index d35c0971ba..0000000000 --- a/contrib/pgcrypto/expected/pgp-pubkey-DISABLED.out +++ /dev/null @@ -1 +0,0 @@ --- no bignum support diff --git a/contrib/pgcrypto/px.c b/contrib/pgcrypto/px.c index 7e69da696f..b01701ea75 100644 --- a/contrib/pgcrypto/px.c +++ b/contrib/pgcrypto/px.c @@ -67,12 +67,8 @@ static const struct error_desc px_err_list[] = { {PXE_PGP_COMPRESSION_ERROR, "Compression error"}, {PXE_PGP_NOT_TEXT, "Not text data"}, {PXE_PGP_UNEXPECTED_PKT, "Unexpected packet in key data"}, - {PXE_PGP_NO_BIGNUM, - "public-key functions disabled - " - "pgcrypto needs OpenSSL for bignums"}, {PXE_PGP_MATH_FAILED, "Math operation failed"}, {PXE_PGP_SHORT_ELGAMAL_KEY, "Elgamal keys must be at least 1024 bits long"}, - {PXE_PGP_RSA_UNSUPPORTED, "pgcrypto does not support RSA keys"}, {PXE_PGP_UNKNOWN_PUBALGO, "Unknown public-key encryption algorithm"}, {PXE_PGP_WRONG_KEY, "Wrong key"}, {PXE_PGP_MULTIPLE_KEYS, diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h index 9174e137db..800c552bf6 100644 --- a/contrib/pgcrypto/px.h +++ b/contrib/pgcrypto/px.h @@ -88,10 +88,10 @@ void px_free(void *p); #define PXE_PGP_COMPRESSION_ERROR -105 #define PXE_PGP_NOT_TEXT -106 #define PXE_PGP_UNEXPECTED_PKT -107 -#define PXE_PGP_NO_BIGNUM -108 +/* -108 is unused */ #define PXE_PGP_MATH_FAILED -109 #define PXE_PGP_SHORT_ELGAMAL_KEY -110 -#define PXE_PGP_RSA_UNSUPPORTED -111 +/* -111 is unused */ #define PXE_PGP_UNKNOWN_PUBALGO -112 #define PXE_PGP_WRONG_KEY -113 #define PXE_PGP_MULTIPLE_KEYS -114 diff --git a/contrib/pgcrypto/sql/pgp-encrypt-DISABLED.sql b/contrib/pgcrypto/sql/pgp-encrypt-DISABLED.sql deleted file mode 100644 index 4122300d97..0000000000 --- a/contrib/pgcrypto/sql/pgp-encrypt-DISABLED.sql +++ /dev/null @@ -1 +0,0 @@ --- no random source diff --git a/contrib/pgcrypto/sql/pgp-pubkey-DISABLED.sql b/contrib/pgcrypto/sql/pgp-pubkey-DISABLED.sql deleted file mode 100644 index d35c0971ba..0000000000 --- a/contrib/pgcrypto/sql/pgp-pubkey-DISABLED.sql +++ /dev/null @@ -1 +0,0 @@ --- no bignum support -- 2.40.0