From 0a548f91e035d74fc9767aa721db6aec83fe2c22 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Wed, 14 Aug 2019 17:20:26 -0400 Subject: [PATCH] Support empty values in gss_key_value_set_desc Effectively, this performs the None -> NULL transformation between Python and C. Currently both MIT krb5 and Heimdal will both treat NULL as an unspecified value, which causes it to be skipped. Resolves: #182 --- gssapi/raw/ext_cred_store.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gssapi/raw/ext_cred_store.pyx b/gssapi/raw/ext_cred_store.pyx index 9ee57c36..0a65fe0a 100644 --- a/gssapi/raw/ext_cred_store.pyx +++ b/gssapi/raw/ext_cred_store.pyx @@ -83,7 +83,8 @@ cdef gss_key_value_set_desc* c_create_key_value_set(dict values) except NULL: for (i, (k, v)) in enumerate(values.items()): res.elements[i].key = k - res.elements[i].value = v + if v: + res.elements[i].value = v return res