lib/krb5_wrap: add smb_krb5_principal_set_realm().
[samba.git] / lib / krb5_wrap / krb5_samba.h
index 42e19b57899fd108d073503d43d153a7c15e1e82..03246fd028830e3fdb10569f68888bc3ad2038c3 100644 (file)
@@ -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,
@@ -257,7 +252,11 @@ krb5_error_code smb_krb5_make_pac_checksum(TALLOC_CTX *mem_ctx,
                                           DATA_BLOB *sig_blob);
 
 char *smb_krb5_principal_get_realm(krb5_context context,
-                                  krb5_principal principal);
+                                  krb5_const_principal principal);
+
+krb5_error_code smb_krb5_principal_set_realm(krb5_context context,
+                                            krb5_principal principal,
+                                            const char *realm);
 
 char *kerberos_get_principal_from_service_hostname(TALLOC_CTX *mem_ctx,
                                                   const char *service,
@@ -281,7 +280,7 @@ krb5_error_code kt_copy_one_principal(krb5_context context,
                                      const char *to,
                                      const char *principal,
                                      krb5_kvno kvno,
-                                     krb5_enctype *enctypes);
+                                     const krb5_enctype *enctypes);
 
 #if defined(HAVE_KRB5_KT_COMPARE)
 #define smb_krb5_kt_compare krb5_kt_compare
@@ -295,6 +294,41 @@ krb5_boolean smb_krb5_kt_compare(krb5_context context,
 
 const krb5_enctype *samba_all_enctypes(void);
 
+uint32_t kerberos_enctype_to_bitmap(krb5_enctype enc_type_enum);
+krb5_enctype ms_suptype_to_ietf_enctype(uint32_t enctype_bitmap);
+krb5_error_code ms_suptypes_to_ietf_enctypes(TALLOC_CTX *mem_ctx,
+                                            uint32_t enctype_bitmap,
+                                            krb5_enctype **enctypes);
+int smb_krb5_get_pw_salt(krb5_context context,
+                        krb5_principal host_princ,
+                        krb5_data *psalt);
+
+int smb_krb5_create_key_from_string(krb5_context context,
+                                   krb5_principal *host_princ,
+                                   krb5_data *salt,
+                                   krb5_data *password,
+                                   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
+#else
+#error krb5_princ_size unavailable
+#endif
+#endif
+
+char *smb_krb5_principal_get_comp_string(TALLOC_CTX *mem_ctx,
+                                        krb5_context context,
+                                        krb5_const_principal principal,
+                                        unsigned int component);
+
+krb5_error_code krb5_copy_data_contents(krb5_data *p,
+                                       const void *data,
+                                       size_t len);
+
 #endif /* HAVE_KRB5 */
 
 int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,