summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-03-03 20:25:24 +0100
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-03-04 22:21:46 +0100
commit612bc926f7b40b2867fe1a28cf686c2131c72110 (patch)
tree474c9f5e46cbc5af03c1daaf57408d42fcf02f80
parentc74521628bf5c7172b2df06dcc7db6ac2fd6bcb3 (diff)
downloadcurl-612bc926f7b40b2867fe1a28cf686c2131c72110.tar.gz
krb5: use nondeprecated functions
gss_seal/gss_unseal have been deprecated in favor of gss_wrap/gss_unwrap with GSS-API v2 from January 1997 [1]. The first version of "The Kerberos Version 5 GSS-API Mechanism" [2] from June 1996 already says "GSS_Wrap() (formerly GSS_Seal())" and "GSS_Unwrap() (formerly GSS_Unseal())". Use the nondeprecated functions to avoid deprecation warnings. [1] https://tools.ietf.org/html/rfc2078 [2] https://tools.ietf.org/html/rfc1964 Closes https://github.com/curl/curl/pull/2356
-rw-r--r--lib/krb5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/krb5.c b/lib/krb5.c
index 35a4ca0c2..8b5a24720 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -85,7 +85,7 @@ krb5_decode(void *app_data, void *buf, int len,
enc.value = buf;
enc.length = len;
- maj = gss_unseal(&min, *context, &enc, &dec, NULL, NULL);
+ maj = gss_unwrap(&min, *context, &enc, &dec, NULL, NULL);
if(maj != GSS_S_COMPLETE) {
if(len >= 4)
strcpy(buf, "599 ");
@@ -119,11 +119,11 @@ krb5_encode(void *app_data, const void *from, int length, int level, void **to)
int len;
/* NOTE that the cast is safe, neither of the krb5, gnu gss and heimdal
- * libraries modify the input buffer in gss_seal()
+ * libraries modify the input buffer in gss_wrap()
*/
dec.value = (void *)from;
dec.length = length;
- maj = gss_seal(&min, *context,
+ maj = gss_wrap(&min, *context,
level == PROT_PRIVATE,
GSS_C_QOP_DEFAULT,
&dec, &state, &enc);