From 5d8e2e5a3c8f4d1353365c49d894c2b5e61544e6 Mon Sep 17 00:00:00 2001 From: "Jacques A. Vidrine" Date: Mon, 20 May 2002 15:14:00 +0000 Subject: [PATCH] In gss_verify_mic and gss_unwrap, initialize the qop_state parameter if non-NULL. We do this prior to calling the encryption-system specific functions in case some day they set qop_state. Doug Rabson encountered this bug while working on RPCSEC_GSS code from UMich's NFSv4 project. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11015 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/krb5/unwrap.c | 2 ++ lib/gssapi/krb5/verify_mic.c | 2 ++ lib/gssapi/unwrap.c | 2 ++ lib/gssapi/verify_mic.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/lib/gssapi/krb5/unwrap.c b/lib/gssapi/krb5/unwrap.c index ccd3841e6..e38866b5d 100644 --- a/lib/gssapi/krb5/unwrap.c +++ b/lib/gssapi/krb5/unwrap.c @@ -388,6 +388,8 @@ OM_uint32 gss_unwrap OM_uint32 ret; krb5_keytype keytype; + if (qop_state != NULL) + *qop_state = GSS_C_QOP_DEFAULT; ret = gss_krb5_get_remotekey(context_handle, &key); if (ret) { gssapi_krb5_set_error_string (); diff --git a/lib/gssapi/krb5/verify_mic.c b/lib/gssapi/krb5/verify_mic.c index 977652b25..c7e4f7732 100644 --- a/lib/gssapi/krb5/verify_mic.c +++ b/lib/gssapi/krb5/verify_mic.c @@ -251,6 +251,8 @@ gss_verify_mic OM_uint32 ret; krb5_keytype keytype; + if (qop_state != NULL) + *qop_state = GSS_C_QOP_DEFAULT; ret = gss_krb5_get_remotekey(context_handle, &key); if (ret) { gssapi_krb5_set_error_string (); diff --git a/lib/gssapi/unwrap.c b/lib/gssapi/unwrap.c index ccd3841e6..e38866b5d 100644 --- a/lib/gssapi/unwrap.c +++ b/lib/gssapi/unwrap.c @@ -388,6 +388,8 @@ OM_uint32 gss_unwrap OM_uint32 ret; krb5_keytype keytype; + if (qop_state != NULL) + *qop_state = GSS_C_QOP_DEFAULT; ret = gss_krb5_get_remotekey(context_handle, &key); if (ret) { gssapi_krb5_set_error_string (); diff --git a/lib/gssapi/verify_mic.c b/lib/gssapi/verify_mic.c index 977652b25..c7e4f7732 100644 --- a/lib/gssapi/verify_mic.c +++ b/lib/gssapi/verify_mic.c @@ -251,6 +251,8 @@ gss_verify_mic OM_uint32 ret; krb5_keytype keytype; + if (qop_state != NULL) + *qop_state = GSS_C_QOP_DEFAULT; ret = gss_krb5_get_remotekey(context_handle, &key); if (ret) { gssapi_krb5_set_error_string ();