From: Aki Tuomi Date: Fri, 3 Jun 2022 11:37:20 +0000 (+0300) Subject: lib-dcrypt: Remove gnutls X-Git-Tag: 2.4.0~3977 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3e930d7e4ee5dc5c9993a1ec6a2391c167474bf;p=thirdparty%2Fdovecot%2Fcore.git lib-dcrypt: Remove gnutls It never worked --- diff --git a/configure.ac b/configure.ac index e0a7e992d3..6680e76d62 100644 --- a/configure.ac +++ b/configure.ac @@ -189,28 +189,6 @@ AS_HELP_STRING([--with-libcap], [Build with libcap support (Dropping capabilitie TEST_WITH(libcap, $withval), want_libcap=auto) -AC_ARG_WITH(ssl, -AS_HELP_STRING([--with-ssl=gnutls|openssl], [Build with GNUTLS or OpenSSL (default)]), - if test x$withval = xno; then - want_gnutls=no - want_openssl=no - elif test x$withval = xgnutls; then - AC_ERROR([GNUTLS support is broken currently]) - want_gnutls=yes - want_openssl=no - elif test x$withval = xopenssl; then - want_gnutls=no - want_openssl=yes - elif test x$withval = xyes; then - want_gnutls=no - want_openssl=yes - else - AC_ERROR([--with-ssl: Invalid value: $withval]) - fi, [ - want_gnutls=no - want_openssl=auto - ]) - AC_ARG_WITH(ssldir, AS_HELP_STRING([--with-ssldir=DIR], [SSL base directory for certificates (/etc/ssl)]), ssldir="$withval", @@ -943,7 +921,7 @@ echo "Install prefix . : $prefix" echo "File offsets ... : ${offt_bits}bit" echo "I/O polling .... : $ioloop" echo "I/O notifys .... : $have_notify" -echo "SSL ............ : $have_ssl" +echo "SSL ............ : openssl" echo "GSSAPI ......... : $have_gssapi" echo "passdbs ........ :$passdb" if test "$not_passdb" != ""; then diff --git a/m4/ssl.m4 b/m4/ssl.m4 index 90c41a2d2e..97efc02833 100644 --- a/m4/ssl.m4 +++ b/m4/ssl.m4 @@ -239,24 +239,4 @@ AC_DEFUN([DOVECOT_SSL], [ AM_CONDITIONAL(BUILD_DCRYPT_OPENSSL, test "$build_dcrypt_openssl" = "yes") AM_CONDITIONAL([SSL_VERSION_GE_102], [test x$ssl_version_ge_102 = xtrue]) - - AS_IF([test $want_gnutls != no && test $have_ssl = no], [ - AC_CHECK_LIB(gnutls, gnutls_global_init, [ - AC_CHECK_HEADER(gnutls/gnutls.h, [ - AC_DEFINE(HAVE_GNUTLS,, [Build with GNUTLS support]) - SSL_LIBS="-lgnutls -lgcrypt" - AC_SUBST(SSL_LIBS) - have_ssl="yes (GNUTLS)" - have_gnutls=yes - ], [ - AS_IF([test $want_gnutls = yes], [ - AC_MSG_ERROR(Can't build with GNUTLS: gnutls/gnutls.h not found) - ]) - ]) - ], [ - AS_IF([test $want_gnutls = yes], [ - AC_MSG_ERROR(Can't build with GNUTLS: libgnutls not found) - ]) - ], -lgcrypt) - ]) ]) diff --git a/src/lib-dcrypt/dcrypt-gnutls.c b/src/lib-dcrypt/dcrypt-gnutls.c deleted file mode 100644 index 1dd1df3ada..0000000000 --- a/src/lib-dcrypt/dcrypt-gnutls.c +++ /dev/null @@ -1,599 +0,0 @@ -/* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */ - -#include "lib.h" -#include "buffer.h" -#include "randgen.h" -#include "array.h" -#include "hash-method.h" -#include "pkcs5.h" -#include "module-dir.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dcrypt.h" -#include "dcrypt-private.h" - -struct dcrypt_context_symmetric { - pool_t pool; - gnutls_cipher_hd_t ctx; - gnutls_cipher_algorithm_t cipher; - gnutls_datum_t key; - gnutls_datum_t iv; - enum dcrypt_sym_mode mode; -}; - -struct dcrypt_context_hmac { - pool_t pool; - gnutls_hmac_hd_t ctx; - gnutls_mac_algorithm_t md; - gnutls_datum_t key; - size_t klen; -}; - -struct dcrypt_public_key { - void *ctx; -}; - -struct dcrypt_private_key { - void *ctx; -}; - -static int -dcrypt_gnutls_private_to_public_key(struct dcrypt_private_key *priv_key, - struct dcrypt_public_key **pub_key_r, - const char **error_r); - -static int dcrypt_gnutls_error(int ec, const char **error_r) -{ - i_assert(ec < 0); - if(error_r != NULL) { - *error_r = gnutls_strerror(ec); - } - return -1; -} - -static int -dcrypt_gnutls_ctx_sym_create(const char *algorithm, - enum dcrypt_sym_mode mode, - struct dcrypt_context_symmetric **ctx_r, - const char **error_r) -{ - gnutls_cipher_algorithm_t cipher = gnutls_cipher_get_id(algorithm); - struct dcrypt_context_symmetric *ctx; - pool_t pool; - - if(cipher == GNUTLS_CIPHER_UNKNOWN) - return dcrypt_gnutls_error(cipher, error_r); - - pool = pool_alloconly_create("dcrypt gnutls", 128); - ctx = p_new(pool, struct dcrypt_context_symmetric, 1); - ctx->pool = pool; - ctx->cipher = cipher; - ctx->mode = mode; - *ctx_r = ctx; - return 0; -} - -static int -dcrypt_gnutls_ctx_sym_destroy(struct dcrypt_context_symmetric **ctx) -{ - pool_t pool = (*ctx)->pool; - - gnutls_cipher_deinit((*ctx)->ctx); - pool_unref(&pool); - *ctx = NULL; - return 0; -} - -static void -dcrypt_gnutls_ctx_sym_set_key(struct dcrypt_context_symmetric *ctx, - const unsigned char *key, size_t key_len) -{ - if(ctx->key.data != NULL) - p_free(ctx->pool, ctx->key.data); - - ctx->key.size = I_MIN(key_len, - (size_t)gnutls_cipher_get_key_size(ctx->cipher)); - ctx->key.data = p_malloc(ctx->pool, ctx->key.size); - memcpy(ctx->key.data, key, ctx->key.size); -} - -static void -dcrypt_gnutls_ctx_sym_set_iv(struct dcrypt_context_symmetric *ctx, - const unsigned char *iv, size_t iv_len) -{ - if(ctx->iv.data != NULL) - p_free(ctx->pool, ctx->iv.data); - ctx->iv.size = I_MIN(iv_len, - (size_t)gnutls_cipher_get_iv_size(ctx->cipher)); - ctx->iv.data = p_malloc(ctx->pool, ctx->iv.size); - memcpy(ctx->iv.data, iv, ctx->iv.size); -} - -static void -dcrypt_gnutls_ctx_sym_set_key_iv_random(struct dcrypt_context_symmetric *ctx) -{ - if(ctx->key.data != NULL) - p_free(ctx->pool, ctx->key.data); - if(ctx->iv.data != NULL) - p_free(ctx->pool, ctx->iv.data); - - ctx->key.data = p_malloc(ctx->pool, - gnutls_cipher_get_key_size(ctx->cipher)); - random_fill(ctx->key.data, gnutls_cipher_get_key_size(ctx->cipher)); - ctx->key.size = gnutls_cipher_get_key_size(ctx->cipher); - ctx->iv.data = p_malloc(ctx->pool, - gnutls_cipher_get_iv_size(ctx->cipher)); - random_fill(ctx->iv.data, gnutls_cipher_get_iv_size(ctx->cipher)); - ctx->iv.size = gnutls_cipher_get_iv_size(ctx->cipher); -} - -static int -dcrypt_gnutls_ctx_sym_get_key(struct dcrypt_context_symmetric *ctx, - buffer_t *key) -{ - if(ctx->key.data == NULL) - return -1; - - buffer_append(key, ctx->key.data, ctx->key.size); - return 0; -} - -static int -dcrypt_gnutls_ctx_sym_get_iv(struct dcrypt_context_symmetric *ctx, buffer_t *iv) -{ - if(ctx->iv.data == NULL) - return -1; - - buffer_append(iv, ctx->iv.data, ctx->iv.size); - return 0; -} - -static int -dcrypt_gnutls_ctx_sym_get_key_length(struct dcrypt_context_symmetric *ctx) -{ - return gnutls_cipher_get_iv_size(ctx->cipher); -} - -static int -dcrypt_gnutls_ctx_sym_get_iv_length(struct dcrypt_context_symmetric *ctx) -{ - return gnutls_cipher_get_iv_size(ctx->cipher); -} - -static int -dcrypt_gnutls_ctx_sym_get_block_size(struct dcrypt_context_symmetric *ctx) -{ - return gnutls_cipher_get_block_size(ctx->cipher); -} - -static int -dcrypt_gnutls_ctx_sym_init(struct dcrypt_context_symmetric *ctx, - const char **error_r) -{ - int ec; - - ec = gnutls_cipher_init(&ctx->ctx, ctx->cipher, &ctx->key, &ctx->iv); - if(ec < 0) - return dcrypt_gnutls_error(ec, error_r); - return 0; -} - -static int -dcrypt_gnutls_ctx_sym_update(struct dcrypt_context_symmetric *ctx, - const unsigned char *data, size_t data_len, - buffer_t *result, const char **error_r) -{ - int ec; - size_t outl = gnutls_cipher_get_block_size(ctx->cipher); - unsigned char buf[outl]; - - ec = gnutls_cipher_encrypt2(ctx->ctx, data, data_len, buf, outl); - if(ec < 0) - return dcrypt_gnutls_error(ec, error_r); - - buffer_append(result, buf, outl); - return ec; -} - -static int -dcrypt_gnutls_ctx_sym_final(struct dcrypt_context_symmetric *ctx, - buffer_t *result, const char **error_r) -{ - return dcrypt_gnutls_ctx_sym_update(ctx, (const unsigned char*)"", 0, - result, error_r); -} - -static int -dcrypt_gnutls_ctx_hmac_create(const char *algorithm, - struct dcrypt_context_hmac **ctx_r, - const char **error_r) -{ - gnutls_mac_algorithm_t md = gnutls_mac_get_id(algorithm); - struct dcrypt_context_hmac *ctx; - pool_t pool; - - if (md == GNUTLS_MAC_UNKNOWN) - return dcrypt_gnutls_error(md, error_r); - - pool = pool_alloconly_create("dcrypt gnutls", 128); - ctx = p_new(pool, struct dcrypt_context_hmac, 1); - ctx->pool = pool; - ctx->md = md; - *ctx_r = ctx; - return 0; -} - -static int -dcrypt_gnutls_ctx_hmac_destroy(struct dcrypt_context_hmac **ctx) -{ - pool_t pool = (*ctx)->pool; - gnutls_hmac_deinit((*ctx)->ctx, NULL); - pool_unref(&pool); - *ctx = NULL; - return 0; -} - -static void -dcrypt_gnutls_ctx_hmac_set_key(struct dcrypt_context_hmac *ctx, - const unsigned char *key, size_t key_len) -{ - if(ctx->key.data != NULL) - p_free(ctx->pool, ctx->key.data); - - ctx->key.size = I_MIN(key_len,(size_t)gnutls_hmac_get_len(ctx->md)); - ctx->key.data = p_malloc(ctx->pool, ctx->key.size); - memcpy(ctx->key.data, key, ctx->key.size); -} - -static int -dcrypt_gnutls_ctx_hmac_get_key(struct dcrypt_context_hmac *ctx, buffer_t *key) -{ - if (ctx->key.data == NULL) - return -1; - - buffer_append(key, ctx->key.data, ctx->key.size); - return 0; -} - -static int -dcrypt_gnutls_ctx_hmac_init(struct dcrypt_context_hmac *ctx, - const char **error_r) -{ - int ec; - - ec = gnutls_hmac_init(&ctx->ctx, ctx->md, ctx->key.data, ctx->key.size); - if (ec < 0) - return dcrypt_gnutls_error(ec, error_r); - return 0; -} - -static int -dcrypt_gnutls_ctx_hmac_update(struct dcrypt_context_hmac *ctx, - const unsigned char *data, size_t data_len, - const char **error_r) -{ - int ec; - - if ((ec = gnutls_hmac(ctx->ctx, data, data_len)) != 0) - return dcrypt_gnutls_error(ec, error_r); - return 0; -} - -static int -dcrypt_gnutls_ctx_hmac_final(struct dcrypt_context_hmac *ctx, - buffer_t *result, const char **error_r) -{ - size_t hlen = gnutls_hmac_get_len(ctx->md); - unsigned char buf[hlen]; - - gnutls_hmac_output(ctx->ctx, buf); - buffer_append(result, buf, hlen); - return 0; -} - -static int -dcrypt_gnutls_ecdh_derive_secret(struct dcrypt_public_key *peer_key, - buffer_t *R, buffer_t *S, - const char **error_r) -{ - -} - -static int -dcrypt_gnutls_pbkdf2(const unsigned char *password, size_t password_len, - const unsigned char *salt, size_t salt_len, - const char *algorithm, unsigned int rounds, - buffer_t *result, unsigned int result_len, - const char **error_r) -{ - unsigned char buf[result_len]; - - /* only sha1 or sha256 is supported */ - if (str_begins_icase_with(algorithm, "sha1")) { - pbkdf2_hmac_sha1(password_len, password, rounds, - salt_len, salt, result_len, buf); - } else if (str_begins_icase_with(algorithm, "sha256")) { - pbkdf2_hmac_sha256(password_len, password, rounds, - salt_len, salt, result_len, buf); - } else if (str_begins_icase_with(algorithm, "sha512")) { - struct hmac_sha512_ctx ctx; - - hmac_sha512_set_key(&ctx, password_len, password); - PBKDF2(&ctx, hmac_sha512_update, hmac_sha512_digest, 64, rounds, - salt_len, salt, result_len, buf); - i_zero(&ctx); - } else { - *error_r = "Unsupported algorithm"; - return -1; - } - - buffer_append(result, buf, result_len); - memset(buf, 0, sizeof(buf)); - return 0; -} - -static int -dcrypt_gnutls_generate_keypair(struct dcrypt_keypair *pair_r, - enum dcrypt_key_type kind, unsigned int bits, - const char *curve, const char **error_r) -{ - gnutls_pk_algorithm_t pk_algo; - gnutls_ecc_curve_t pk_curve; - gnutls_privkey_t priv; - int ec; - - if (kind == DCRYPT_KEY_EC) { - pk_curve = gnutls_ecc_curve_get_id(curve); - if (pk_curve == GNUTLS_ECC_CURVE_INVALID) { - *error_r = "Invalid curve"; - return -1; - } - bits = GNUTLS_CURVE_TO_BITS(pk_curve); -#if GNUTLS_VERSION_NUMBER >= 0x030500 - pk_algo = gnutls_curve_get_pk(pk_curve); -#else - pk_algo = GNUTLS_PK_EC; -#endif - } else if (kind == DCRYPT_KEY_RSA) { - pk_algo = gnutls_pk_get_id("RSA"); - } else { - *error_r = "Unsupported key type"; - return -1; - } - - if ((ec = gnutls_privkey_init(&priv)) != GNUTLS_E_SUCCESS) - return dcrypt_gnutls_error(ec, error_r); -#if GNUTLS_VERSION_NUMBER >= 0x030500 - gnutls_privkey_set_flags(priv, GNUTLS_PRIVKEY_FLAG_EXPORT_COMPAT); -#endif - ec = gnutls_privkey_generate(priv, pk_algo, bits, 0); - if (ec != GNUTLS_E_SUCCESS) { - gnutls_privkey_deinit(priv); - return dcrypt_gnutls_error(ec, error_r); - } - - pair_r->priv = (struct dcrypt_private_key*)priv; - - return dcrypt_gnutls_private_to_public_key(pair_r->priv, - &pair_r->pub, error_r); -} - -static int -dcrypt_gnutls_load_private_key(struct dcrypt_private_key **key_r, - const unsigned char *data, size_t data_len, - dcrypt_password_cb *cb, void *ctx, - const char **error_r) -{ - -} - -static int -dcrypt_gnutls_load_public_key(struct dcrypt_public_key **key_r, - const unsigned char *data, size_t data_len, - const char **error_r) -{ - -} - -static int -dcrypt_gnutls_store_private_key(struct dcrypt_private_key *key, - const char *cipher, buffer_t *destination, - dcrypt_password_cb *cb, void *ctx, - const char **error_r) -{ - gnutls_privkey_t priv = (gnutls_privkey_t)key; - gnutls_x509_privkey_t xkey; - size_t outl = 0; - - gnutls_privkey_export_x509(priv, &xkey); - /* then export PEM */ - gnutls_x509_privkey_export_pkcs8(xkey, GNUTLS_X509_FMT_PEM, NULL, 0, NULL, &outl); - char buffer[outl]; - gnutls_x509_privkey_export_pkcs8(xkey, GNUTLS_X509_FMT_PEM, NULL, 0, buffer, &outl); - buffer_append(destination, buffer, outl); - memset(buffer, 0, sizeof(buffer)); - return 0; -} - -static int -dcrypt_gnutls_store_public_key(struct dcrypt_public_key *key, buffer_t *destination, const char **error_r) -{ - gnutls_pubkey_t pub = (gnutls_pubkey_t)key; - size_t outl = 0; - - gnutls_pubkey_export(pub, GNUTLS_X509_FMT_PEM, NULL, &outl); - char buffer[outl]; - gnutls_pubkey_export(pub, GNUTLS_X509_FMT_PEM, buffer, &outl); - buffer_append(destination, buffer, outl); - return 0; -} - -static int -dcrypt_gnutls_private_to_public_key(struct dcrypt_private_key *priv_key, - struct dcrypt_public_key **pub_key_r, - const char **error_r) -{ - gnutls_privkey_t priv = (gnutls_privkey_t)priv_key; - int ec; - - if (gnutls_privkey_get_pk_algorithm(priv, NULL) == GNUTLS_PK_RSA) { - gnutls_datum_t m,e; - - /* do not extract anything we don't need */ - ec = gnutls_privkey_export_rsa_raw(priv, &m, &e, NULL, NULL, - NULL, NULL, NULL, NULL); - if (ec != GNUTLS_E_SUCCESS) - return dcrypt_gnutls_error(ec, error_r); - gnutls_pubkey_t pub; - gnutls_pubkey_init(&pub); - ec = gnutls_pubkey_import_rsa_raw(pub, &m, &e); - gnutls_free(m.data); - gnutls_free(e.data); - if (ec < 0) { - gnutls_pubkey_deinit(pub); - return dcrypt_gnutls_error(ec, error_r); - } - *pub_key_r = (struct dcrypt_public_key*)pub; - return 0; - } else if (gnutls_privkey_get_pk_algorithm(priv, NULL) == GNUTLS_PK_EC) { - gnutls_ecc_curve_t curve; - gnutls_datum_t x,y,k; - - ec = gnutls_privkey_export_ecc_raw(priv, &curve, &x, &y, NULL); - if (ec != GNUTLS_E_SUCCESS) - return dcrypt_gnutls_error(ec, error_r); - gnutls_pubkey_t pub; - gnutls_pubkey_init(&pub); - ec = gnutls_pubkey_import_ecc_raw(pub, curve, &x, &y); - gnutls_free(x.data); - gnutls_free(y.data); - if (ec < 0) { - gnutls_pubkey_deinit(pub); - return dcrypt_gnutls_error(ec, error_r); - } - *pub_key_r = (struct dcrypt_public_key*)pub; - return 0; - } - - return -1; -} - -static void -dcrypt_gnutls_free_public_key(struct dcrypt_public_key **key) -{ - gnutls_pubkey_deinit((gnutls_pubkey_t)*key); - *key = NULL; -} - -static void -dcrypt_gnutls_free_private_key(struct dcrypt_private_key **key) -{ - gnutls_privkey_deinit((gnutls_privkey_t)*key); - *key = NULL; -} - -static void -dcrypt_gnutls_free_keypair(struct dcrypt_keypair *keypair) -{ - dcrypt_gnutls_free_public_key(&keypair->pub); - dcrypt_gnutls_free_private_key(&keypair->priv); -} - -static int -dcrypt_gnutls_rsa_encrypt(struct dcrypt_public_key *key, - const unsigned char *data, size_t data_len, - buffer_t *result, const char **error_r) -{ - -} - -static int -dcrypt_gnutls_rsa_decrypt(struct dcrypt_private_key *key, - const unsigned char *data, size_t data_len, - buffer_t *result, const char **error_r) -{ - -} - -static int -dcrypt_gnutls_oid_keytype(const unsigned char *oid, size_t oid_len, - enum dcrypt_key_type *key_type, const char **error_r) -{ - -} - -static int -dcrypt_gnutls_keytype_oid(enum dcrypt_key_type key_type, buffer_t *oid, - const char **error_r) -{ - -} - -static const char * -dcrypt_gnutls_oid2name(const unsigned char *oid, size_t oid_len, - const char **error_r) -{ -} - -static int -dcrypt_gnutls_name2oid(const char *name, buffer_t *oid, const char **error_r) -{ - -} - -static struct dcrypt_vfs dcrypt_gnutls_vfs = { - .ctx_sym_create = dcrypt_gnutls_ctx_sym_create, - .ctx_sym_destroy = dcrypt_gnutls_ctx_sym_destroy, - .ctx_sym_set_key = dcrypt_gnutls_ctx_sym_set_key, - .ctx_sym_set_iv = dcrypt_gnutls_ctx_sym_set_iv, - .ctx_sym_set_key_iv_random = dcrypt_gnutls_ctx_sym_set_key_iv_random, - .ctx_sym_get_key = dcrypt_gnutls_ctx_sym_get_key, - .ctx_sym_get_iv = dcrypt_gnutls_ctx_sym_get_iv, - .ctx_sym_get_key_length = dcrypt_gnutls_ctx_sym_get_key_length, - .ctx_sym_get_iv_length = dcrypt_gnutls_ctx_sym_get_iv_length, - .ctx_sym_init = dcrypt_gnutls_ctx_sym_init, - .ctx_sym_update = dcrypt_gnutls_ctx_sym_update, - .ctx_sym_final = dcrypt_gnutls_ctx_sym_final, - .ctx_hmac_create = dcrypt_gnutls_ctx_hmac_create, - .ctx_hmac_destroy = dcrypt_gnutls_ctx_hmac_destroy, - .ctx_hmac_set_key = dcrypt_gnutls_ctx_hmac_set_key, - .ctx_hmac_get_key = dcrypt_gnutls_ctx_hmac_get_key, - .ctx_hmac_init = dcrypt_gnutls_ctx_hmac_init, - .ctx_hmac_update = dcrypt_gnutls_ctx_hmac_update, - .ctx_hmac_final = dcrypt_gnutls_ctx_hmac_final, -// .ecdh_derive_secret = dcrypt_gnutls_ecdh_derive_secret, - .pbkdf2 = dcrypt_gnutls_pbkdf2, - .generate_keypair = dcrypt_gnutls_generate_keypair, - .load_private_key = dcrypt_gnutls_load_private_key, - .load_public_key = dcrypt_gnutls_load_public_key, - .store_private_key = dcrypt_gnutls_store_private_key, - .store_public_key = dcrypt_gnutls_store_public_key, - .private_to_public_key = dcrypt_gnutls_private_to_public_key, - .free_keypair = dcrypt_gnutls_free_keypair, - .free_public_key = dcrypt_gnutls_free_public_key, - .free_private_key = dcrypt_gnutls_free_private_key, - .rsa_encrypt = dcrypt_gnutls_rsa_encrypt, - .rsa_decrypt = dcrypt_gnutls_rsa_decrypt, - .oid_keytype = dcrypt_gnutls_oid_keytype, - .keytype_oid = dcrypt_gnutls_keytype_oid, - .oid2name = dcrypt_gnutls_oid2name, - .name2oid = dcrypt_gnutls_name2oid -}; - -void dcrypt_gnutls_init(struct module *module ATTR_UNUSED) -{ - gnutls_global_init(); - dcrypt_set_vfs(&dcrypt_gnutls_vfs); -} - -void dcrypt_gnutls_deinit(void) -{ - gnutls_global_deinit(); -} diff --git a/src/lib-dcrypt/dcrypt-private.h b/src/lib-dcrypt/dcrypt-private.h index 13da99e900..7b37de983a 100644 --- a/src/lib-dcrypt/dcrypt-private.h +++ b/src/lib-dcrypt/dcrypt-private.h @@ -201,9 +201,7 @@ struct dcrypt_vfs { void dcrypt_set_vfs(struct dcrypt_vfs *vfs); void dcrypt_openssl_init(struct module *module ATTR_UNUSED); -void dcrypt_gnutls_init(struct module *module ATTR_UNUSED); void dcrypt_openssl_deinit(void); -void dcrypt_gnutls_deinit(void); int parse_jwk_key(const char *key_data, struct json_tree **tree_r, const char **error_r); diff --git a/src/lib-dcrypt/dcrypt.h b/src/lib-dcrypt/dcrypt.h index 0e8a9aa6e8..50be288eb9 100644 --- a/src/lib-dcrypt/dcrypt.h +++ b/src/lib-dcrypt/dcrypt.h @@ -90,7 +90,7 @@ struct dcrypt_raw_key { ARRAY_DEFINE_TYPE(dcrypt_raw_key, struct dcrypt_raw_key); /** - * load and initialize dcrypt backend, use either openssl or gnutls + * load and initialize dcrypt backend, use either openssl or custom backend */ bool dcrypt_initialize(const char *backend, const struct dcrypt_settings *set, const char **error_r); diff --git a/src/master/main.c b/src/master/main.c index 1dc0afd6e8..b58049f8f5 100644 --- a/src/master/main.c +++ b/src/master/main.c @@ -681,9 +681,6 @@ static void print_build_options(void) #endif #ifdef IOLOOP_NOTIFY_KQUEUE " notify=kqueue" -#endif -#ifdef HAVE_GNUTLS - " gnutls" #endif " openssl" " io_block_size=%u"