return ret;
}
-
-/**
- * @brief Return the kerberos library setting for: libdefaults:allow_weak_crypto
- *
- * @param[in] context The library context
- *
- * @return True if weak crypto is allowed, false if not.
- */
-krb5_boolean smb_krb5_get_allowed_weak_crypto(krb5_context context)
-#if defined(HAVE_KRB5_CONFIG_GET_BOOL_DEFAULT)
-{
- return krb5_config_get_bool_default(context,
- NULL,
- FALSE,
- "libdefaults",
- "allow_weak_crypto",
- NULL);
-}
-#elif defined(HAVE_PROFILE_H) && defined(HAVE_KRB5_GET_PROFILE)
-{
-#include <profile.h>
- krb5_error_code ret;
- krb5_boolean ret_default = false;
- profile_t profile;
- int ret_profile;
-
- ret = krb5_get_profile(context,
- &profile);
- if (ret) {
- return ret_default;
- }
-
- ret = profile_get_boolean(profile,
- "libdefaults",
- "allow_weak_crypto",
- NULL, /* subsubname */
- ret_default, /* def_val */
- &ret_profile /* *ret_default */);
- if (ret) {
- return ret_default;
- }
-
- profile_release(profile);
-
- return ret_profile;
-}
-#else
-#error UNKNOWN_KRB5_CONFIG_ROUTINES
-#endif
-
/**
* @brief Return the type of a krb5_principal
*
krb5_enctype enctype,
krb5_keyblock *key);
-krb5_boolean smb_krb5_get_allowed_weak_crypto(krb5_context context);
-
#ifndef krb5_princ_size
#if defined(HAVE_KRB5_PRINCIPAL_GET_NUM_COMP)
#define krb5_princ_size krb5_principal_get_num_comp