summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-25 01:05:43 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-25 04:12:40 +0200
commit9de348f24de5ab4f6eafba7a20f3fa64912b917b (patch)
treee211f27078a6a6a7cb11b7f7567eaa87271cf543
parent371746ebd171a83172b328375992f03f6c336bd4 (diff)
downloadcryptodev-linux-9de348f24de5ab4f6eafba7a20f3fa64912b917b.tar.gz
cryptodev-linux-9de348f24de5ab4f6eafba7a20f3fa64912b917b.tar.xz
cryptodev-linux-9de348f24de5ab4f6eafba7a20f3fa64912b917b.zip
Define session cloning interface
-rw-r--r--crypto.45
-rw-r--r--ncr.h1
-rw-r--r--utils.c1
3 files changed, 7 insertions, 0 deletions
diff --git a/crypto.4 b/crypto.4
index 0dc21e9..04d952e 100644
--- a/crypto.4
+++ b/crypto.4
@@ -543,6 +543,11 @@ For RSA with \fBRSA_PKCS1_PSS\fP.
An 32-bit unsigned integer in native byte order
specifying the PSS salt length.
Optional, defaults to 0.
+.IP \fBNCR_ATTR_SESSION_CLONE_FROM\fP
+Optional, a 32-bit unsigned integer in native byte order
+specifying session state to clone.
+Only supported for some operations and algorithms;
+specifically intended for cloning hashing sessions.
.IP \fBNCR_ATTR_SIGNATURE_HASH_ALGORITHM\fP
Mandatory for some operations and algorithms.
A NUL-terminated string specifying a hash algorithm underlying a signature,
diff --git a/ncr.h b/ncr.h
index 47981d1..3c416eb 100644
--- a/ncr.h
+++ b/ncr.h
@@ -58,6 +58,7 @@ enum {
NCR_ATTR_DH_BASE, /* NLA_BINARY */
NCR_ATTR_DH_PUBLIC, /* NLA_BINARY */
NCR_ATTR_WANTED_ATTRS, /* NLA_BINARY - array of u16 IDs */
+ NCR_ATTR_SESSION_CLONE_FROM, /* NLA_U32 - ncr_session_t */
/* Add new attributes here */
diff --git a/utils.c b/utils.c
index 514833c..a427833 100644
--- a/utils.c
+++ b/utils.c
@@ -82,6 +82,7 @@ static const struct nla_policy ncr_attr_policy[NCR_ATTR_MAX + 1] = {
[NCR_ATTR_DH_BASE] = { NLA_BINARY, 0 },
[NCR_ATTR_DH_PUBLIC] = { NLA_BINARY, 0 },
[NCR_ATTR_WANTED_ATTRS] = { NLA_BINARY, 0 },
+ [NCR_ATTR_SESSION_CLONE_FROM] = { NLA_U32, 0 },
};
void *__ncr_get_input_args(void *fixed, struct nlattr *tb[], size_t fixed_size,