/* Generated by IDL compiler version OSF DCE T1.1.0-03 */
#ifndef DCEAPI 
# include <dce/dcedef.h> 
#endif 
#ifndef sec_authn_v0_0_included
#define sec_authn_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
    extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef lbase_v0_0_included
#include <dce/lbase.h>
#endif
#ifndef sec_id_base_v0_0_included
#include <dce/id_base.h>
#endif
#ifndef rpc_v0_0_included
#include <dce/rpc.h>
#endif
#ifndef sec_base_v0_0_included
#include <dce/sec_base.h>
#endif
#define SEC_AUTHZ_FMT_V1_0 (1)
#define SEC_AUTHZ_FMT_V1_1 (2)
typedef idl_void_p_t sec_krb_parsed_name;
typedef idl_void_p_t sec_krb_cred;
typedef idl_void_p_t sec_krb_ccache;
typedef idl_void_p_t sec_krb_ticket;
typedef struct sec_krb_message {
unsigned32 length;
byte_p_t data;
} sec_krb_message;
typedef unsigned32 sec_krb_timestamp;
typedef struct sec_des_block {
idl_byte bits[8];
} sec_des_block;
typedef struct sec_des_key {
idl_byte bits[8];
} sec_des_key;
typedef sec_des_block sec_des_key_schedule[16];
typedef struct sec_md_struct {
unsigned32 i[2];
unsigned32 buffer[4];
idl_byte in[64];
idl_byte digest[16];
} sec_md_struct;
typedef sec_md_struct *sec_md_ptr;
extern void  DCEAPI sec_krb_parsed_name_free(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_krb_parsed_name *pname
#endif
);
extern void  DCEAPI sec_krb_cred_free(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_krb_cred *cred
#endif
);
extern void  DCEAPI sec_krb_ccache_free(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_krb_ccache *ccache
#endif
);
extern void  DCEAPI sec_krb_message_free(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_krb_message *message
#endif
);
extern void  DCEAPI sec_krb_ticket_free(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_krb_ticket *ticket
#endif
);
extern void  DCEAPI sec_id_pac_free(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_id_pac_t *pac
#endif
);
extern error_status_t  DCEAPI sec_id_pac_copy(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_id_pac_t *pac,
    /* [out] */ sec_id_pac_t *opac
#endif
);
extern error_status_t  DCEAPI sec_krb_parse_name(
#ifdef IDL_PROTOTYPES
    /* [in] */ idl_char *name,
    /* [out] */ sec_krb_parsed_name *pname
#endif
);
extern error_status_t  DCEAPI sec_krb_sec_parse_name(
#ifdef IDL_PROTOTYPES
    /* [in] */ rpc_auth_identity_handle_t auth_ident,
    /* [in] */ unsigned32 authn_level,
    /* [in] */ idl_char *name,
    /* [out] */ sec_krb_parsed_name *pname
#endif
);
extern error_status_t  DCEAPI sec_krb_unparse_name(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_parsed_name pname,
    /* [out] */ idl_char **name
#endif
);
extern error_status_t  DCEAPI sec_krb_get_cc(
#ifdef IDL_PROTOTYPES
    /* [in] */ rpc_auth_identity_handle_t auth_ident,
    /* [out] */ sec_krb_ccache *ccache
#endif
);
extern error_status_t  DCEAPI sec_krb_get_cred(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_ccache ccache,
    /* [in] */ sec_krb_parsed_name server_name,
    /* [in] */ unsigned32 authn_level,
    /* [in] */ unsigned32 authz_proto,
    /* [out] */ sec_krb_cred *cred,
    /* [out] */ unsigned32 *expiration
#endif
);
extern error_status_t  DCEAPI sec_krb_get_name(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_ccache ccache,
    /* [out] */ sec_krb_parsed_name *client_name
#endif
);
extern error_status_t  DCEAPI sec_krb_get_pac(
#ifdef IDL_PROTOTYPES
    /* [in] */ rpc_auth_identity_handle_t auth_ident,
    /* [out] */ sec_id_pac_t *pac
#endif
);
extern error_status_t  DCEAPI sec_krb_build_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_ccache ccache,
    /* [in] */ sec_krb_cred cred,
    /* [in] */ sec_des_block *challenge,
    /* [in] */ unsigned32 authn_level,
    /* [in] */ unsigned32 authz_proto,
    /* [in] */ unsigned32 key_seq,
    /* [in] */ sec_des_key *key,
    /* [in] */ sec_id_pac_t *client_pac,
    /* [out] */ sec_krb_message *message
#endif
);
extern error_status_t  DCEAPI sec_krb_dg_build_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_ccache ccache,
    /* [in] */ sec_krb_cred cred,
    /* [in] */ sec_des_block *challenge,
    /* [in] */ unsigned32 authn_level,
    /* [in] */ unsigned32 authz_proto,
    /* [in] */ unsigned32 key_seq,
    /* [in] */ sec_des_key *key,
    /* [in] */ sec_des_block *ivec,
    /* [in] */ unsigned32 authz_fmt,
    /* [out] */ sec_krb_message *message
#endif
);
extern error_status_t  DCEAPI sec_krb_st_translate(
#ifdef IDL_PROTOTYPES
    /* [in] */ signed32 code
#endif
);
extern error_status_t  DCEAPI sec_krb_decode_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_message *message,
    /* [in] */ sec_des_block *challenge,
    /* [in] */ boolean32 use_replay,
    /* [out] */ idl_char **client_name,
    /* [out] */ sec_id_pac_t *client_pac,
    /* [out] */ sec_krb_parsed_name *server_name,
    /* [out] */ unsigned32 *authn_level,
    /* [out] */ unsigned32 *authz_proto,
    /* [out] */ unsigned32 *key_seq,
    /* [out] */ sec_des_key *key,
    /* [out] */ unsigned32 *expiration,
    /* [out] */ sec_krb_ticket *ticket
#endif
);
extern error_status_t  DCEAPI sec_krb_dg_decode_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_message *message,
    /* [in] */ sec_des_block *challenge,
    /* [in] */ unsigned32 authz_fmt,
    /* [out] */ idl_char **client_name,
    /* [out] */ sec_id_pac_t *client_pac,
    /* [out] */ rpc_authz_cred_handle_t *client_creds,
    /* [out] */ sec_krb_parsed_name *server_name,
    /* [out] */ unsigned32 *authn_level,
    /* [out] */ unsigned32 *authz_proto,
    /* [out] */ unsigned32 *key_seq,
    /* [out] */ sec_des_key *key,
    /* [out] */ sec_des_block *ivec,
    /* [out] */ unsigned32 *expiration
#endif
);
extern error_status_t  DCEAPI sec_krb_dg_decode_msg_frags(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_message *message,
    /* [in] */ sec_des_block *challenge,
    /* [in] */ unsigned32 authz_fmt,
    /* [out] */ idl_char **client_name,
    /* [out] */ sec_id_pac_t *client_pac,
    /* [out] */ sec_bytes_t *raw_epac_setP,
    /* [out] */ rpc_authz_cred_handle_t *client_creds,
    /* [out] */ sec_krb_parsed_name *server_name,
    /* [out] */ unsigned32 *authn_level,
    /* [out] */ unsigned32 *authz_proto,
    /* [out] */ unsigned32 *key_seq,
    /* [out] */ sec_des_key *key,
    /* [out] */ sec_des_block *ivec,
    /* [out] */ unsigned32 *expiration
#endif
);
extern error_status_t  DCEAPI sec_krb_dg_decode_message_kern(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_message *message,
    /* [in] */ sec_des_block *challenge,
    /* [in] */ unsigned32 authz_fmt,
    /* [in] */ handle_t h,
    /* [in] */ uuid_t *actuid,
    /* [in] */ unsigned32 boot_time,
    /* [in] */ error_status_t completion_status,
    /* [out] */ idl_char **client_name,
    /* [out] */ sec_id_pac_t *client_pac,
    /* [out] */ rpc_authz_cred_handle_t *client_creds,
    /* [out] */ sec_krb_parsed_name *server_name,
    /* [out] */ unsigned32 *authn_level,
    /* [out] */ unsigned32 *authz_proto,
    /* [out] */ unsigned32 *key_seq,
    /* [out] */ sec_des_key *key,
    /* [out] */ sec_des_block *ivec,
    /* [out] */ unsigned32 *expiration
#endif
);
extern error_status_t  DCEAPI sec_krb_register_server(
#ifdef IDL_PROTOTYPES
    /* [in] */ unsigned_char_p_t server_princ_name,
    /* [in] */ rpc_auth_key_retrieval_fn_t get_key_func,
    /* [in] */ idl_void_p_t arg
#endif
);
extern error_status_t  DCEAPI sec_krb_get_server(
#ifdef IDL_PROTOTYPES
    /* [out] */ unsigned_char_p_t *server_name
#endif
);
extern void  DCEAPI sec_krb_init(
#ifdef IDL_PROTOTYPES
    void
#endif
);
#define sec_des_decrypt (0)
#define sec_des_encrypt (1)
extern void  DCEAPI sec_des_cbc_cksum(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_des_block *plaintext,
    /* [out] */ sec_des_block *cksum,
    /* [in] */ signed32 length,
    /* [in] */ sec_des_key_schedule key,
    /* [in] */ sec_des_block *ivec
#endif
);
extern void  DCEAPI sec_des_ecb_encrypt(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_des_block *inblock,
    /* [out] */ sec_des_block *outblock,
    /* [in] */ sec_des_key_schedule key,
    /* [in] */ signed32 direction
#endif
);
extern void  DCEAPI sec_des_cbc_encrypt(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_des_block *inblocks,
    /* [out] */ sec_des_block *outblocks,
    /* [in] */ signed32 length,
    /* [in] */ sec_des_key_schedule key,
    /* [in] */ sec_des_block *ivec,
    /* [in] */ signed32 direction
#endif
);
extern error_status_t  DCEAPI sec_des_key_sched(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_des_key *key,
    /* [out] */ sec_des_key_schedule schedule
#endif
);
extern error_status_t  DCEAPI sec_des_new_random_key(
#ifdef IDL_PROTOTYPES
    /* [out] */ sec_des_key *key
#endif
);
extern error_status_t  DCEAPI sec_des_generate_random_block(
#ifdef IDL_PROTOTYPES
    /* [out] */ sec_des_block *key
#endif
);
extern void  DCEAPI sec_md_begin(
#ifdef IDL_PROTOTYPES
    /* [out] */ sec_md_ptr state
#endif
);
extern void  DCEAPI sec_md_update(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_md_ptr state,
    /* [in] */ idl_byte *data,
    /* [in] */ unsigned32 length
#endif
);
extern void  DCEAPI sec_md_final(
#ifdef IDL_PROTOTYPES
    /* [in, out] */ sec_md_ptr state
#endif
);
extern error_status_t  DCEAPI sec_krb_cn_build_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_ccache ccache,
    /* [in] */ sec_krb_cred cred,
    /* [in] */ unsigned32 authn_level,
    /* [in] */ unsigned32 authz_proto,
    /* [in] */ unsigned32 authz_fmt,
    /* [out] */ sec_des_key *key,
    /* [out] */ sec_krb_timestamp *ctime,
    /* [out] */ unsigned32 *cusec,
    /* [out] */ sec_krb_message *message
#endif
);
extern error_status_t  DCEAPI sec_krb_cn_build_rep_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ unsigned32 authn_level,
    /* [in] */ sec_krb_timestamp ctime,
    /* [in] */ unsigned32 cusec,
    /* [out] */ sec_krb_message *rep_message,
    /* [in] */ sec_des_key *key
#endif
);
extern error_status_t  DCEAPI sec_krb_cn_build_err_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ unsigned32 authn_level,
    /* [in] */ unsigned32 error,
    /* [in] */ sec_krb_timestamp ctime,
    /* [in] */ unsigned32 cusec,
    /* [out] */ sec_krb_message *err_message,
    /* [in] */ sec_des_key *key
#endif
);
extern error_status_t  DCEAPI sec_krb_cn_decode_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ sec_krb_message *message,
    /* [in] */ unsigned32 authz_fmt,
    /* [out] */ idl_char **client_name,
    /* [out] */ sec_id_pac_t *client_pac,
    /* [out] */ rpc_authz_cred_handle_t *client_creds,
    /* [out] */ sec_krb_parsed_name *server_name,
    /* [out] */ unsigned32 *authz_proto,
    /* [out] */ sec_des_key *key,
    /* [out] */ unsigned32 *expiration,
    /* [out] */ sec_krb_timestamp *ctime,
    /* [out] */ unsigned32 *cusec
#endif
);
extern error_status_t  DCEAPI sec_krb_cn_decode_err_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ unsigned32 authn_level,
    /* [in] */ sec_krb_message *err_message,
    /* [out] */ unsigned32 *error,
    /* [in] */ sec_des_key *key
#endif
);
extern error_status_t  DCEAPI sec_krb_cn_decode_rep_message(
#ifdef IDL_PROTOTYPES
    /* [in] */ unsigned32 authn_level,
    /* [in] */ sec_krb_message *message,
    /* [in] */ sec_krb_timestamp ctime,
    /* [in] */ unsigned32 cusec,
    /* [in] */ sec_des_key *key
#endif
);

#ifdef __cplusplus
    }
#endif

#endif
