From: Vitaly Chikunov <vt@altlinux.org> To: David Howells <dhowells@redhat.com>, Herbert Xu <herbert@gondor.apana.org.au>, Mimi Zohar <zohar@linux.vnet.ibm.com>, Dmitry Kasatkin <dmitry.kasatkin@gmail.com>, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 3/4] KEYS: set correct flags for keyctl if encrypt is not supported Date: Sun, 6 Jan 2019 16:36:07 +0300 [thread overview] Message-ID: <20190106133608.820-4-vt@altlinux.org> (raw) In-Reply-To: <20190106133608.820-1-vt@altlinux.org> Signed-off-by: Vitaly Chikunov <vt@altlinux.org> --- crypto/asymmetric_keys/public_key.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c index 51dc1c858c7c..382cf67f510e 100644 --- a/crypto/asymmetric_keys/public_key.c +++ b/crypto/asymmetric_keys/public_key.c @@ -136,8 +136,9 @@ static int software_key_query(const struct kernel_pkey_params *params, info->max_sig_size = len; info->max_enc_size = len; info->max_dec_size = len; - info->supported_ops = (KEYCTL_SUPPORTS_ENCRYPT | - KEYCTL_SUPPORTS_VERIFY); + info->supported_ops = KEYCTL_SUPPORTS_VERIFY; + if (crypto_akcipher_alg(tfm)->encrypt) + info->supported_ops |= KEYCTL_SUPPORTS_ENCRYPT; if (pkey->key_is_private) info->supported_ops |= (KEYCTL_SUPPORTS_DECRYPT | KEYCTL_SUPPORTS_SIGN); -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: Vitaly Chikunov <vt@altlinux.org> To: David Howells <dhowells@redhat.com>, Herbert Xu <herbert@gondor.apana.org.au>, Mimi Zohar <zohar@linux.vnet.ibm.com>, Dmitry Kasatkin <dmitry.kasatkin@gmail.com>, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 3/4] KEYS: set correct flags for keyctl if encrypt is not supported Date: Sun, 06 Jan 2019 13:36:07 +0000 [thread overview] Message-ID: <20190106133608.820-4-vt@altlinux.org> (raw) In-Reply-To: <20190106133608.820-1-vt@altlinux.org> Signed-off-by: Vitaly Chikunov <vt@altlinux.org> --- crypto/asymmetric_keys/public_key.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c index 51dc1c858c7c..382cf67f510e 100644 --- a/crypto/asymmetric_keys/public_key.c +++ b/crypto/asymmetric_keys/public_key.c @@ -136,8 +136,9 @@ static int software_key_query(const struct kernel_pkey_params *params, info->max_sig_size = len; info->max_enc_size = len; info->max_dec_size = len; - info->supported_ops = (KEYCTL_SUPPORTS_ENCRYPT | - KEYCTL_SUPPORTS_VERIFY); + info->supported_ops = KEYCTL_SUPPORTS_VERIFY; + if (crypto_akcipher_alg(tfm)->encrypt) + info->supported_ops |= KEYCTL_SUPPORTS_ENCRYPT; if (pkey->key_is_private) info->supported_ops |= (KEYCTL_SUPPORTS_DECRYPT | KEYCTL_SUPPORTS_SIGN); -- 2.11.0
next prev parent reply other threads:[~2019-01-06 13:36 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-01-06 13:36 [RFC PATCH 0/4] crypto: Add EC-RDSA algorithm Vitaly Chikunov 2019-01-06 13:36 ` Vitaly Chikunov 2019-01-06 13:36 ` [RFC PATCH 1/4] X.509: Parse public key parameters from x509 for akcipher Vitaly Chikunov 2019-01-06 13:36 ` Vitaly Chikunov 2019-02-09 21:42 ` Vitaly Chikunov 2019-02-09 21:42 ` Vitaly Chikunov 2019-02-10 18:46 ` Vitaly Chikunov 2019-02-10 18:46 ` Vitaly Chikunov 2019-02-19 4:37 ` Herbert Xu 2019-02-19 4:37 ` Herbert Xu 2019-02-24 6:48 ` Vitaly Chikunov 2019-02-24 6:48 ` Vitaly Chikunov 2019-02-28 6:14 ` Herbert Xu 2019-02-28 6:14 ` Herbert Xu 2019-02-28 7:04 ` Vitaly Chikunov 2019-02-28 7:04 ` Vitaly Chikunov 2019-02-28 7:11 ` Vitaly Chikunov 2019-02-28 7:11 ` Vitaly Chikunov 2019-02-28 7:51 ` Herbert Xu 2019-02-28 7:51 ` Herbert Xu 2019-02-28 8:28 ` Vitaly Chikunov 2019-02-28 8:28 ` Vitaly Chikunov 2019-02-28 9:01 ` Herbert Xu 2019-02-28 9:01 ` Herbert Xu 2019-02-28 10:33 ` Vitaly Chikunov 2019-02-28 10:33 ` Vitaly Chikunov 2019-02-28 10:37 ` Herbert Xu 2019-02-28 10:37 ` Herbert Xu 2019-03-01 16:06 ` Vitaly Chikunov 2019-03-01 16:06 ` Vitaly Chikunov 2019-01-06 13:36 ` [RFC PATCH 2/4] akcipher: Introduce verify2 for public key algorithms Vitaly Chikunov 2019-01-06 13:36 ` Vitaly Chikunov 2019-01-06 13:36 ` Vitaly Chikunov [this message] 2019-01-06 13:36 ` [RFC PATCH 3/4] KEYS: set correct flags for keyctl if encrypt is not supported Vitaly Chikunov 2019-01-06 13:36 ` [RFC PATCH 4/4] crypto: Add EC-RDSA algorithm Vitaly Chikunov 2019-01-06 13:36 ` Vitaly Chikunov 2019-01-06 18:11 ` Stephan Müller 2019-01-06 18:11 ` Stephan Müller 2019-01-07 8:07 ` Vitaly Chikunov 2019-01-07 8:07 ` Vitaly Chikunov 2019-01-07 8:31 ` Stephan Mueller 2019-01-07 8:31 ` Stephan Mueller 2019-01-07 9:04 ` Vitaly Chikunov 2019-01-07 9:04 ` Vitaly Chikunov 2019-01-16 16:15 ` David Howells 2019-01-16 16:19 ` [RFC PATCH 2/4] akcipher: Introduce verify2 for public key algorithms David Howells
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190106133608.820-4-vt@altlinux.org \ --to=vt@altlinux.org \ --cc=dhowells@redhat.com \ --cc=dmitry.kasatkin@gmail.com \ --cc=herbert@gondor.apana.org.au \ --cc=keyrings@vger.kernel.org \ --cc=linux-crypto@vger.kernel.org \ --cc=linux-integrity@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=zohar@linux.vnet.ibm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.