keyctl_dh_compute_kdf: const-ify input parameters
PATCH 4/4 keyctl_dh_compute_kdf: const-ify input parameters
Signed-off-by Ben Boeckel <[email protected]>
--- keyutils.c | 5 +++-- keyutils.h | 4 ++-- man/keyctl_dh_compute.3 | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)
keyutils.c +3 -2
@@ -245,8 +245,9 @@ 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,char *hashname,char *otherinfo, -size_t otherinfolen,char *buffer,size_t buflen) +key_serial_t base,const char *hashname, +const char *otherinfo,size_t otherinfolen, +char *buffer,size_t buflen) {struct keyctl_dh_params params = { .priv = private, .prime = prime,
keyutils.h +2 -2
@@ -115,8 +115,8 @@ struct keyctl_dh_params { };struct keyctl_kdf_params { -char *hashname; -char *otherinfo; +const char *hashname; +const char *otherinfo;uint32_t otherinfolen;uint32_t __spare[8 ]; };
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 ", char *" hashname ", char *" otherinfo ", +.BI "key_serial_t " base ", const char *" hashname ", const char *" otherinfo ", .BI "size_t " otherinfolen ", char *" buffer ", size_t " buflen ");" .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .SH DESCRIPTION
Signature · 1 line
2.17.1
Am Montag, 24. September 2018, 15:01:59 CEST schrieb Ben Boeckel:
Hi Ben,
Quoted 1 line
Signed-off-by Ben Boeckel <[email protected]>
David mentioned that he would like to see the switch to void. Could you please roll that in?
Thanks a lot.
Otherwise, you can mark the whole series as:
Reviewed-by Stephan Mueller <[email protected]>
Ciao
Stephan