summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2012-04-01 17:28:19 -0400
committerAndreas Schneider <asn@samba.org>2012-04-12 12:06:43 +0200
commitc13c065a9b92c1abf17e999649ea6bb620615d6f (patch)
tree833c324e17eb32fb7d88f06531b6fe2057858f05 /libcli
parent70c303a7f357b2c73955b24128ac8a72b656d4e6 (diff)
downloadsamba-c13c065a9b92c1abf17e999649ea6bb620615d6f.tar.gz
krb5_wrap: krb5_string_to_key / krb5_encrypt_block are deprecated.
Remove checks and replace with krb5_c_string_to_key(). Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/auth/krb5_wrap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcli/auth/krb5_wrap.c b/libcli/auth/krb5_wrap.c
index 2f877e7f0a..55a224612d 100644
--- a/libcli/auth/krb5_wrap.c
+++ b/libcli/auth/krb5_wrap.c
@@ -27,7 +27,8 @@
#include "libcli/auth/krb5_wrap.h"
#include "librpc/gen_ndr/krb5pac.h"
-#if defined(HAVE_KRB5_PRINCIPAL2SALT) && defined(HAVE_KRB5_USE_ENCTYPE) && defined(HAVE_KRB5_ENCRYPT_BLOCK)
+#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,
@@ -36,20 +37,19 @@ int create_kerberos_key_from_string_direct(krb5_context context,
{
int ret = 0;
krb5_data salt;
- krb5_encrypt_block eblock;
ret = krb5_principal2salt(context, host_princ, &salt);
if (ret) {
DEBUG(1,("krb5_principal2salt failed (%s)\n", error_message(ret)));
return ret;
}
- krb5_use_enctype(context, &eblock, enctype);
- ret = krb5_string_to_key(context, &eblock, key, password, &salt);
+ 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,