summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/k5-int.h2
-rw-r--r--src/include/krb5/krb5.hin13
-rw-r--r--src/lib/krb5/ccache/cc_mslsa.c4
-rw-r--r--src/lib/krb5/krb/init_ctx.c4
-rw-r--r--src/lib/krb5/libkrb5.exports2
-rw-r--r--src/lib/krb5_32.def4
6 files changed, 21 insertions, 8 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 9136bfc0e..74b12af0e 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -2344,8 +2344,6 @@ krb5_error_code krb5_set_default_tgs_ktypes(krb5_context,
krb5_error_code KRB5_CALLCONV
krb5_get_tgs_ktypes(krb5_context, krb5_const_principal, krb5_enctype **);
-void KRB5_CALLCONV krb5_free_ktypes(krb5_context, krb5_enctype *);
-
krb5_boolean krb5_is_permitted_enctype(krb5_context, krb5_enctype);
krb5_boolean KRB5_CALLCONV krb5int_c_weak_enctype(krb5_enctype);
diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index 687f2b9a3..e95d02989 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -3038,6 +3038,8 @@ krb5_set_default_tgs_enctypes(krb5_context context, const krb5_enctype *etypes);
* keys within @a context, as determined by configuration or by a previous call
* to krb5_set_default_tgs_enctypes().
*
+ * Use krb5_free_enctypes() to free @a ktypes when it is no longer needed.
+ *
* @retval 0 Success; otherwise - Kerberos error codes
*/
krb5_error_code KRB5_CALLCONV
@@ -4757,6 +4759,17 @@ void KRB5_CALLCONV
krb5_free_string(krb5_context context, char *val);
/**
+ * Free an array of encryption types.
+ *
+ * @param [in] context Library context
+ * @param [in] val Array of enctypes to be freed
+ *
+ * @version First introduced in 1.12
+ */
+void KRB5_CALLCONV
+krb5_free_enctypes(krb5_context context, krb5_enctype *val);
+
+/**
* Free an array of checksum types.
*
* @param [in] context Library context
diff --git a/src/lib/krb5/ccache/cc_mslsa.c b/src/lib/krb5/ccache/cc_mslsa.c
index d692b4270..bfaae650b 100644
--- a/src/lib/krb5/ccache/cc_mslsa.c
+++ b/src/lib/krb5/ccache/cc_mslsa.c
@@ -1207,7 +1207,7 @@ krb5_is_permitted_tgs_enctype(krb5_context context, krb5_const_principal princ,
if (*ptr == etype)
ret = 1;
- krb5_free_ktypes (context, list);
+ krb5_free_enctypes(context, list);
return(ret);
}
@@ -1502,7 +1502,7 @@ GetMSTGT(krb5_context context, HANDLE LogonHandle, ULONG PackageId, KERB_EXTERNA
cleanup:
if ( etype_list )
- krb5_free_ktypes(context, etype_list);
+ krb5_free_enctypes(context, etype_list);
if ( pTicketRequest )
LocalFree(pTicketRequest);
diff --git a/src/lib/krb5/krb/init_ctx.c b/src/lib/krb5/krb/init_ctx.c
index 6054b2056..33330e7b6 100644
--- a/src/lib/krb5/krb/init_ctx.c
+++ b/src/lib/krb5/krb/init_ctx.c
@@ -543,7 +543,7 @@ krb5_get_default_in_tkt_ktypes(krb5_context context, krb5_enctype **ktypes)
void
KRB5_CALLCONV
-krb5_free_ktypes (krb5_context context, krb5_enctype *val)
+krb5_free_enctypes(krb5_context context, krb5_enctype *val)
{
free (val);
}
@@ -582,6 +582,6 @@ krb5_is_permitted_enctype(krb5_context context, krb5_enctype etype)
if (krb5_get_permitted_enctypes(context, &list))
return FALSE;
ret = k5_etypes_contains(list, etype);
- krb5_free_ktypes(context, list);
+ krb5_free_enctypes(context, list);
return ret;
}
diff --git a/src/lib/krb5/libkrb5.exports b/src/lib/krb5/libkrb5.exports
index eb3eb79c8..8d19f1493 100644
--- a/src/lib/krb5/libkrb5.exports
+++ b/src/lib/krb5/libkrb5.exports
@@ -291,6 +291,7 @@ krb5_free_enc_kdc_rep_part
krb5_free_enc_sam_response_enc_2
krb5_free_enc_sam_response_enc_2_contents
krb5_free_enc_tkt_part
+krb5_free_enctypes
krb5_free_error
krb5_free_error_message
krb5_free_etype_info
@@ -306,7 +307,6 @@ krb5_free_keyblock
krb5_free_keyblock_contents
krb5_free_keytab_entry_contents
krb5_free_krbhst
-krb5_free_ktypes
krb5_free_last_req
krb5_free_octet_data
krb5_free_pa_data
diff --git a/src/lib/krb5_32.def b/src/lib/krb5_32.def
index 0d066cbf1..d093d1f7b 100644
--- a/src/lib/krb5_32.def
+++ b/src/lib/krb5_32.def
@@ -274,7 +274,6 @@ EXPORTS
krb5int_cc_default @268 ; PRIVATE GSSAPI k5-int.h
krb5_free_ap_req @119 ; PRIVATE GSSAPI krb5.hin
- krb5_free_ktypes @139 ; PRIVATE GSSAPI krb5.hin
krb5_get_tgs_ktypes @177 ; PRIVATE GSSAPI krb5.hin
krb5_auth_con_set_req_cksumtype @36 ; PRIVATE GSSAPI krb5.hin
krb5_kt_free_entry @192 ; PRIVATE GSSAPI krb5.hin
@@ -445,3 +444,6 @@ EXPORTS
krb5_cc_move @416
krb5_get_init_creds_opt_set_in_ccache @417
krb5int_build_conf_principals @418 ; PRIVATE
+
+; new in 1.12
+ krb5_free_enctypes @419