diff options
author | Bruce Momjian | 2020-12-28 02:37:42 +0000 |
---|---|---|
committer | Bruce Momjian | 2020-12-28 02:37:42 +0000 |
commit | 3187ef7c46c5b884267a88f2d6119c9a05f1bbba (patch) | |
tree | 6ff5e31d8ffaaf806ee908fe2ef8733c7ba348ef /src/common/cipher.c | |
parent | facad31474ac6dace3894ebc7c45dc3cc829422e (diff) |
Revert "Add key management system" (978f869b99) & later commits
The patch needs test cases, reorganization, and cfbot testing.
Technically reverts commits 5c31afc49d..e35b2bad1a (exclusive/inclusive)
and 08db7c63f3..ccbe34139b.
Reported-by: Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/E1ktAAG-0002V2-VB@gemulon.postgresql.org
Diffstat (limited to 'src/common/cipher.c')
-rw-r--r-- | src/common/cipher.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/common/cipher.c b/src/common/cipher.c deleted file mode 100644 index 483cb610a3d..00000000000 --- a/src/common/cipher.c +++ /dev/null @@ -1,70 +0,0 @@ -/*------------------------------------------------------------------------- - * - * cipher.c - * Shared frontend/backend for cryptographic functions - * - * Copyright (c) 2020, PostgreSQL Global Development Group - * - * IDENTIFICATION - * src/common/cipher.c - * - *------------------------------------------------------------------------- - */ - -#ifndef FRONTEND -#include "postgres.h" -#else -#include "postgres_fe.h" -#endif - -#include "common/cipher.h" - -static void cipher_failure(void) pg_attribute_noreturn(); - - -PgCipherCtx * -pg_cipher_ctx_create(int cipher, uint8 *key, int klen, bool enc) -{ - cipher_failure(); - return NULL; /* keep compiler quiet */ -} - -void -pg_cipher_ctx_free(PgCipherCtx *ctx) -{ - cipher_failure(); -} - -bool -pg_cipher_encrypt(PgCipherCtx *ctx, const unsigned char *plaintext, - const int inlen, unsigned char *ciphertext, int *outlen, - const unsigned char *iv, const int ivlen, - unsigned char *outtag, const int taglen) -{ - cipher_failure(); - return false; /* keep compiler quiet */ -} - -bool -pg_cipher_decrypt(PgCipherCtx *ctx, const unsigned char *ciphertext, - const int inlen, unsigned char *plaintext, int *outlen, - const unsigned char *iv, const int ivlen, - unsigned char *intag, const int taglen) -{ - cipher_failure(); - return false; /* keep compiler quiet */ -} - -static void -cipher_failure(void) -{ -#ifndef FRONTEND - ereport(ERROR, - (errcode(ERRCODE_CONFIG_FILE_ERROR), - (errmsg("cluster file encryption is not supported because OpenSSL is not supported by this build"), - errhint("Compile with --with-openssl to use this feature.")))); -#else - fprintf(stderr, _("cluster file encryption is not supported because OpenSSL is not supported by this build")); - exit(1); -#endif -} |