From: Greg Hudson Date: Wed, 17 Apr 2019 05:57:28 +0000 (-0400) Subject: Fix gss_get_mic_iov() example code X-Git-Tag: krb5-1.18-beta1~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F917%2Fhead;p=thirdparty%2Fkrb5.git 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. ticket: 8797 tags: pullup target_version: 1.17-next --- diff --git a/doc/appdev/gssapi.rst b/doc/appdev/gssapi.rst index d26ac0825b..f574b608b1 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);