diff options
author | Günther Deschner <gd@samba.org> | 2014-04-25 14:15:48 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-08-08 06:02:34 +0200 |
commit | 38d454eb44fc695f643a0396ececf8e6a7710454 (patch) | |
tree | d66b34d343e5dbe6722400e4101c3e486e929426 /lib | |
parent | 22c6766693179422d721a752ec942e2a7730a0a0 (diff) | |
download | samba-38d454eb44fc695f643a0396ececf8e6a7710454.tar.gz |
lib/krb5_wrap: remove unused create_kerberos_key_from_string_direct().
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/krb5_wrap/krb5_samba.c | 49 | ||||
-rw-r--r-- | lib/krb5_wrap/krb5_samba.h | 5 |
2 files changed, 0 insertions, 54 deletions
diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index b668716d8e0..df0db67f88c 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -205,55 +205,6 @@ int smb_krb5_create_key_from_string(krb5_context context, return ret; } - -#if defined(HAVE_KRB5_PRINCIPAL2SALT) && defined(HAVE_KRB5_C_STRING_TO_KEY) -/* MIT */ -int create_kerberos_key_from_string_direct(krb5_context context, - krb5_principal host_princ, - krb5_data *password, - krb5_keyblock *key, - krb5_enctype enctype) -{ - int ret = 0; - krb5_data salt; - - ret = krb5_principal2salt(context, host_princ, &salt); - if (ret) { - DEBUG(1,("krb5_principal2salt failed (%s)\n", error_message(ret))); - return ret; - } - ret = krb5_c_string_to_key(context, enctype, password, &salt, key); - SAFE_FREE(salt.data); - - return ret; -} -#elif defined(HAVE_KRB5_GET_PW_SALT) && defined(HAVE_KRB5_STRING_TO_KEY_SALT) -/* Heimdal */ -int create_kerberos_key_from_string_direct(krb5_context context, - krb5_principal host_princ, - krb5_data *password, - krb5_keyblock *key, - krb5_enctype enctype) -{ - int ret; - krb5_salt salt; - - ret = krb5_get_pw_salt(context, host_princ, &salt); - if (ret) { - DEBUG(1,("krb5_get_pw_salt failed (%s)\n", error_message(ret))); - return ret; - } - - ret = krb5_string_to_key_salt(context, enctype, (const char *)password->data, salt, key); - krb5_free_salt(context, salt); - - return ret; -} -#else -#error UNKNOWN_CREATE_KEY_FUNCTIONS -#endif - - /** * @brief Create a salt for a given principal * diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h index 0c30ca898d3..0977f8e06ea 100644 --- a/lib/krb5_wrap/krb5_samba.h +++ b/lib/krb5_wrap/krb5_samba.h @@ -134,11 +134,6 @@ int create_kerberos_key_from_string(krb5_context context, krb5_keyblock *key, krb5_enctype enctype, bool no_salt); -int create_kerberos_key_from_string_direct(krb5_context context, - krb5_principal host_princ, - krb5_data *password, - krb5_keyblock *key, - krb5_enctype enctype); krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes); bool get_krb5_smb_session_key(TALLOC_CTX *mem_ctx, |