krb5 commit [krb5-1.17]: Fix gss_get_mic_iov() example code
Greg Hudson
ghudson at mit.edu
Mon Dec 9 18:22:29 EST 2019
https://github.com/krb5/krb5/commit/b72c491c85cc52c2dc5d1a77bebe840d0b871cf5
commit b72c491c85cc52c2dc5d1a77bebe840d0b871cf5
Author: Greg Hudson <ghudson at mit.edu>
Date: Wed Apr 17 01:57:28 2019 -0400
Fix gss_get_mic_iov() example code
The example code for gss_get_mic_iov() using a caller-provided buffer
calls gss_wrap_iov_length() and gss_wrap_iov() instead of
gss_get_mic_iov_length() and gss_get_mic_iov() as intended. Reported
by Frank Filz.
(cherry picked from commit bf4156db4f6c2e8cd420cd556bfa9e39f1a3d556)
ticket: 8797
version_fixed: 1.17.1
doc/appdev/gssapi.rst | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/doc/appdev/gssapi.rst b/doc/appdev/gssapi.rst
index d26ac08..f574b60 100644
--- a/doc/appdev/gssapi.rst
+++ b/doc/appdev/gssapi.rst
@@ -619,16 +619,14 @@ gss_get_mic_iov_length and gss_get_mic_iov::
iov[1].buffer.value = "message";
iov[1].buffer.length = 7;
- major = gss_wrap_iov_length(&minor, ctx, 1, GSS_C_QOP_DEFAULT,
- NULL, iov, 2);
+ major = gss_get_mic_iov_length(&minor, ctx, GSS_C_QOP_DEFAULT, iov, 2);
if (GSS_ERROR(major))
handle_error(major, minor);
if (iov[0].buffer.length > sizeof(data))
handle_out_of_space_error();
iov[0].buffer.value = data;
- major = gss_wrap_iov(&minor, ctx, 1, GSS_C_QOP_DEFAULT, NULL,
- iov, 2);
+ major = gss_get_mic_iov(&minor, ctx, GSS_C_QOP_DEFAULT, iov, 2);
if (GSS_ERROR(major))
handle_error(major, minor);
More information about the cvs-krb5
mailing list