From: Ben Boeckel <mathstuf@gmail.com>
To: keyrings@vger.kernel.org
Subject: [PATCH] keyctl_dh_compute_kdf: use a void* for opaque data
Date: Mon, 24 Sep 2018 17:55:06 +0000 [thread overview]
Message-ID: <20180924175506.21077-1-mathstuf@gmail.com> (raw)
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
---
keyutils.c | 2 +-
keyutils.h | 4 ++--
man/keyctl_dh_compute.3 | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/keyutils.c b/keyutils.c
index a087a33..5cc90cb 100644
--- a/keyutils.c
+++ b/keyutils.c
@@ -246,7 +246,7 @@ long keyctl_dh_compute(key_serial_t priv, key_serial_t prime,
long keyctl_dh_compute_kdf(key_serial_t private, key_serial_t prime,
key_serial_t base, const char *hashname,
- const char *otherinfo, size_t otherinfolen,
+ const void *otherinfo, size_t otherinfolen,
char *buffer, size_t buflen)
{
struct keyctl_dh_params params = { .priv = private,
diff --git a/keyutils.h b/keyutils.h
index 273f66f..bd6137f 100644
--- a/keyutils.h
+++ b/keyutils.h
@@ -116,7 +116,7 @@ struct keyctl_dh_params {
struct keyctl_kdf_params {
const char *hashname;
- const char *otherinfo;
+ const void *otherinfo;
uint32_t otherinfolen;
uint32_t __spare[8];
};
@@ -204,7 +204,7 @@ extern long keyctl_dh_compute(key_serial_t priv, key_serial_t prime,
key_serial_t base, char *buffer, size_t buflen);
extern long keyctl_dh_compute_kdf(key_serial_t private, key_serial_t prime,
key_serial_t base, char *hashname,
- char *otherinfo, size_t otherinfolen,
+ void *otherinfo, size_t otherinfolen,
char *buffer, size_t buflen);
extern long keyctl_restrict_keyring(key_serial_t keyring, const char *type,
const char *restriction);
diff --git a/man/keyctl_dh_compute.3 b/man/keyctl_dh_compute.3
index 58ad5df..7aaf4a6 100644
--- a/man/keyctl_dh_compute.3
+++ b/man/keyctl_dh_compute.3
@@ -25,7 +25,7 @@ keyctl_dh_compute_kdf \- Derive key from a Diffie-Hellman shared secret
.BI "key_serial_t " prime ", key_serial_t " base ", void **" _buffer ");"
.sp
.BI "long keyctl_dh_compute_kdf(key_serial_t " private ", key_serial_t " prime ,
-.BI "key_serial_t " base ", const char *" hashname ", const char *" otherinfo ",
+.BI "key_serial_t " base ", const char *" hashname ", const void *" otherinfo ",
.BI "size_t " otherinfolen ", char *" buffer ", size_t " buflen ");"
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH DESCRIPTION
--
2.17.1
next reply other threads:[~2018-09-24 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 17:55 Ben Boeckel [this message]
2018-09-24 20:45 ` [PATCH] keyctl_dh_compute_kdf: use a void* for opaque data Ben Boeckel
2018-09-25 11:41 ` Stephan Mueller
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=20180924175506.21077-1-mathstuf@gmail.com \
--to=mathstuf@gmail.com \
--cc=keyrings@vger.kernel.org \
/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: link
Be 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.