keyctl_dh_compute_kdf: use a void* for opaque data
PATCH 1/1 keyctl_dh_compute_kdf: use a void* for opaque data
Signed-off-by Ben Boeckel <[email protected]>
--- keyutils.c | 2 +- keyutils.h | 4 ++-- man/keyctl_dh_compute.3 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
keyutils.c +1 -1
@@ -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,
keyutils.h +2 -2
@@ -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);
man/keyctl_dh_compute.3 +1 -1
@@ -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
Signature · 1 line
2.17.1
Quoted 6 lines · Ben Boeckel
Signed-off-by Ben Boeckel <[email protected]>--- keyutils.c | 2 +- keyutils.h | 4 ++-- man/keyctl_dh_compute.3 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
I'll note that these changes seem to need patches applied to the kernel as well to at least update the documentation with respect to const and void*, but it's likely code needs updated as well.
I can submit patches for these as well. I assume I should also send them here (based on dhowells/keys-asym-keyctl)?
--Ben
Am Montag, 24. September 2018, 22:45:18 CEST schrieb Ben Boeckel:
Hi Ben,
Quoted 2 lines
I can submit patches for these as well. I assume I should also send them here (based on dhowells/keys-asym-keyctl)?
Sure.
Quoted 2 lines
--Ben
Ciao
Stephan