r3345: More MIT/Heimdal tests for comparing enctypes now.
authorJeremy Allison <jra@samba.org>
Fri, 29 Oct 2004 00:02:32 +0000 (00:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:05 +0000 (10:53 -0500)
Jeremy.
(This used to be commit eefb911d0c66bdee586a86446e16723013f84101)

source3/configure.in
source3/libsmb/clikrb5.c

index da60e284eca8ce64be02a89861fb51652fd85807..2b31d24e23bb5c2189f71cec88e4c6d91489f0d9 100644 (file)
@@ -2784,6 +2784,8 @@ if test x"$with_ads_support" != x"no"; then
   AC_CHECK_FUNC_EXT(krb5_free_keytab_entry_contents, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_kt_free_entry, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_krbhst_get_addrinfo, $KRB5_LIBS)
+  AC_CHECK_FUNC_EXT(krb5_c_enctype_compare, $KRB5_LIBS)
+  AC_CHECK_FUNC_EXT(krb5_enctypes_compatible_keys, $KRB5_LIBS)
 
   LIBS="$LIBS $KRB5_LIBS"
   
index 291aa13de018f63ac5752e837a8921b8210557a6..5aa16687054ffb6fa08406f26914dfa6ed62a645 100644 (file)
@@ -262,6 +262,20 @@ void kerberos_set_creds_enctype(krb5_creds *pcreds, int enctype)
 #endif
 }
 
+krb5_boolean kerberos_compatible_enctypes(krb5_context context,
+                                 krb5_enctype enctype1,
+                                 krb5_enctype enctype2)
+{
+#if defined(HAVE_KRB5_C_ENCTYPE_COMPARE)
+       krb5_boolean similar = 0;
+
+       krb5_c_enctype_compare(context, enctype1, enctype2, &similar);
+       return similar;
+#elif defined(HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS)
+       return krb5_enctypes_compatible_keys(context, enctype1, enctype2);
+#endif
+}
+
 static BOOL ads_cleanup_expired_creds(krb5_context context, 
                                      krb5_ccache  ccache,
                                      krb5_creds  *credsp)