krb5 commit: Fix gss_get_mic_iov() example code

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/bf4156db4f6c2e8cd420cd556bfa9e39f1a3d556
commit bf4156db4f6c2e8cd420cd556bfa9e39f1a3d556
Author: Greg Hudson <[email protected]>
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.
    
    ticket: 8797
    tags: pullup
    target_version: 1.17-next

 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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.