diff options
Diffstat (limited to 'sm/encrypt.c')
-rw-r--r-- | sm/encrypt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sm/encrypt.c b/sm/encrypt.c index 6210f310a..fb36977af 100644 --- a/sm/encrypt.c +++ b/sm/encrypt.c @@ -483,7 +483,10 @@ encrypt_dek (const DEK dek, ksba_cert_t cert, int pk_algo, s_data = NULL; /* (avoid compiler warning) */ if (pk_algo == GCRY_PK_ECC) { - rc = ecdh_encrypt (dek, s_pkey, &s_ciph); + if (!(opt.compat_flags & COMPAT_ALLOW_ECC_ENCR)) + rc = gpg_error (GPG_ERR_NOT_SUPPORTED); + else + rc = ecdh_encrypt (dek, s_pkey, &s_ciph); } else { |