diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-04-20 12:03:48 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-04-20 04:31:07 +0200 |
commit | 0e5482c791b9d99a44ca62323aa4dedbbf8d188e (patch) | |
tree | 0fe06f6281fead5e8034244082fd7104bcca7e7b /libcli/auth/krb5_wrap.h | |
parent | 3a2afe4285fca8ab9e3e323ef7f5388f4090d669 (diff) | |
download | samba-0e5482c791b9d99a44ca62323aa4dedbbf8d188e.tar.gz |
libcli/auth: Move more kerberos wrapping in common
These functions are required to get the krb5 PAC parsing and
verfication in common.
Andrew Bartlett
Diffstat (limited to 'libcli/auth/krb5_wrap.h')
-rw-r--r-- | libcli/auth/krb5_wrap.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libcli/auth/krb5_wrap.h b/libcli/auth/krb5_wrap.h index e608efe58c9..3cdcedc9711 100644 --- a/libcli/auth/krb5_wrap.h +++ b/libcli/auth/krb5_wrap.h @@ -21,6 +21,8 @@ */ #include "system/kerberos.h" +struct PAC_SIGNATURE_DATA; +struct PAC_DATA; int create_kerberos_key_from_string_direct(krb5_context context, krb5_principal host_princ, @@ -30,3 +32,25 @@ int create_kerberos_key_from_string_direct(krb5_context context, void kerberos_free_data_contents(krb5_context context, krb5_data *pdata); krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry); char *smb_get_krb5_error_message(krb5_context context, krb5_error_code code, TALLOC_CTX *mem_ctx); + + krb5_error_code smb_krb5_parse_name(krb5_context context, + const char *name, /* in unix charset */ + krb5_principal *principal); +krb5_error_code smb_krb5_unparse_name(TALLOC_CTX *mem_ctx, + krb5_context context, + krb5_const_principal principal, + char **unix_name); + krb5_error_code smb_krb5_parse_name_norealm(krb5_context context, + const char *name, + krb5_principal *principal); + bool smb_krb5_principal_compare_any_realm(krb5_context context, + krb5_const_principal princ1, + krb5_const_principal princ2); + void smb_krb5_checksum_from_pac_sig(krb5_checksum *cksum, + struct PAC_SIGNATURE_DATA *sig); + krb5_error_code smb_krb5_verify_checksum(krb5_context context, + const krb5_keyblock *keyblock, + krb5_keyusage usage, + krb5_checksum *cksum, + uint8_t *data, + size_t length); |