summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/openssl.c
diff options
context:
space:
mode:
authorDaniel Gustafsson2022-05-06 12:41:33 +0000
committerDaniel Gustafsson2022-05-06 12:41:33 +0000
commit0250a167a07d4d2cff932e467d84306cbd3704fe (patch)
treea9301694c0d1a380d62e14992ea0363e65e1b705 /contrib/pgcrypto/openssl.c
parent17ec5fa502d299b1919b1afacda839fb7d8206ad (diff)
pgcrypto: report init errors as PXE_CIPHER_INIT
Report OpenSSL errors during initialization as PXE_CIPHER_INIT since that's just what they were, and not generic unknown errors. This also removes the last users of the generic error, and thus it can be removed. Discussion: http://postgr.es/m/C89D932C-501E-4473-9750-638CFCD9095E@yesql.se
Diffstat (limited to 'contrib/pgcrypto/openssl.c')
-rw-r--r--contrib/pgcrypto/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pgcrypto/openssl.c b/contrib/pgcrypto/openssl.c
index 68fd61b716f..53e64297c28 100644
--- a/contrib/pgcrypto/openssl.c
+++ b/contrib/pgcrypto/openssl.c
@@ -209,13 +209,13 @@ px_find_digest(const char *name, PX_MD **res)
if (!ctx)
{
pfree(digest);
- return -1;
+ return PXE_CIPHER_INIT;
}
if (EVP_DigestInit_ex(ctx, md, NULL) == 0)
{
EVP_MD_CTX_destroy(ctx);
pfree(digest);
- return -1;
+ return PXE_CIPHER_INIT;
}
digest->algo = md;