diff options
author | Gary R Hook <gary.hook@amd.com> | 2017-07-17 23:16:42 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-07-28 12:58:06 +0300 |
commit | e28c190db66830c04b403b7eba7f8a5b53c22ffc (patch) | |
tree | 9bf7a348288769ba4396d3e9741fd2ce64b398d5 /drivers/crypto/ccp/ccp-ops.c | |
parent | ceeec0afd684fdfde285469df0ead6c3ab53513e (diff) | |
download | linux-e28c190db66830c04b403b7eba7f8a5b53c22ffc.tar.xz |
csrypto: ccp - Expand RSA support for a v5 ccp
A version 5 CCP can handle an RSA modulus up to 16k bits.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-ops.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c index 1b757531f79a..40c062ad8726 100644 --- a/drivers/crypto/ccp/ccp-ops.c +++ b/drivers/crypto/ccp/ccp-ops.c @@ -1736,7 +1736,8 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) unsigned int sb_count, i_len, o_len; int ret; - if (rsa->key_size > CCP_RSA_MAX_WIDTH) + /* Check against the maximum allowable size, in bits */ + if (rsa->key_size > cmd_q->ccp->vdata->rsamax) return -EINVAL; if (!rsa->exp || !rsa->mod || !rsa->src || !rsa->dst) |