Thread (44 messages) 44 messages, 6 authors, 2016-06-23

Re: [PATCH RESEND v5 6/6] crypto: AF_ALG - add support for key_id

From: Mat Martineau <hidden>
Date: 2016-05-13 23:32:40
Also in: linux-api, lkml

Tadeusz -

David updated the keys-asym-keyctl branch, and this patch set won't build 
any more.

On Thu, 5 May 2016, Tadeusz Struk wrote:
quoted hunk ↗ jump to hunk
diff --git a/crypto/algif_akcipher.c b/crypto/algif_akcipher.c
index e00793d..f486b6d 100644
--- a/crypto/algif_akcipher.c
+++ b/crypto/algif_akcipher.c
+static int asym_key_encrypt(const struct key *key, struct akcipher_request *req)
...
+	params.data_len = req->src_len;
+	params.enc_len = req->dst_len;
The params member names have changed (now in_len and out_len).
+	ret = encrypt_blob(&params, in, out);
The encrypt function for the key can now be called with 
params.key->type->asym_eds_op(). This also allows you to factor out the 
duplication in asym_key_encrypt, asym_key_decrypt, and asym_key_sign. See 
keyctl_pkey_e_d_s() in keyctl_pkey.c
+static int asym_key_verify(const struct key *key, struct akcipher_request *req)
...
+	ret = verify_signature(key, NULL, &sig);
key->type->asym_verify_signature() is available as well.


Regards,

--
Mat Martineau
Intel OTC
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help