/* @(#)59       1.4  src/security/idl/sec_base.idl, security.src, os2dce21.dss, 960602a.1  5/17/95  09:49:15 */
/*
 * COMPONENT_NAME:  security.src 
 *
 * FUNCTIONS: 
 *
 * ORIGINS: 72
 *
 */
/*
 * Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
 * ALL RIGHTS RESERVED (DCE).  See the file named COPYRIGHT.DCE in the
 * src directory for the full copyright text.
 */
/*
 * HISTORY
 * $Log: sec_base.idl,v $
 * Revision 1.1.4.1  1994/01/28  23:10:58  burati
 * 	Delegation/EPAC changes (dlg_bl1)
 * 	[1994/01/18  20:54:19  burati]
 *
 * Revision 1.1.2.2  1992/12/29  13:53:57  zeliff
 *      Embedding copyright notice
 *      [1992/12/28  20:22:06  zeliff]
 *
 * Revision 1.1  1992/01/19  14:55:27  devrcs
 * Initial revision
 *
 * $EndLog$
 */
/*
** Copyright (c) Hewlett-Packard Company 1991, 1993
** Unpublished work. All Rights Reserved.
**
*/
/* 
** DCE Security Service Architectural Constants
*/

interface sec_base
{
    import "dce/dce_cf_const.idl";

    /* IMPORTANT: KRB_DIR_ROOT_LEN must be longer than GLOBAL_DIR_ROOT_LEN */
    const char *    KRB_DIR_ROOT        = "krbtgt/";
    const signed32  KRB_DIR_ROOT_LEN    = 7;
    
    /*
     * The following name constants are relative to the "person" domain
     * of the DCE security namespace
     */
    const char * SEC_PRIV_SERVER_NAME =  "dce-ptgt";
    const char * SEC_RGY_SERVER_NAME  =  "dce-rgy";

    typedef enum {
        sec_chksum_none,  
        sec_chksum_crc32,
        sec_chksum_des_cbc,
        sec_chksum_rsa_md4,
        sec_chksum_rsa_md4_des
    } sec_chksum_type_t; 
  
/* CMVC 5209, OT 7619, sec_chksum_t tag added */ 
    typedef struct sec_chksum_t {
        sec_chksum_type_t        chksum_type;
        unsigned32               len;
        [size_is(len), ptr] byte *chksum;
    } sec_chksum_t;

    typedef enum {
        sec_etype_none, 
        sec_etype_des_cbc_crc
    } sec_etype_t; 

    /* key version number type */
    typedef  unsigned32    sec_passwd_version_t, sec_key_version_t;

    /* 0 is reserved */ 
    const    unsigned32    sec_passwd_c_version_none  = 0;
    const    unsigned32    sec_c_key_version_none     = 0;

    /* 
     * A generic type for uninterpreted byte strings.
     * Typically the bytes will be a network data 
     * "pickle" of some sort.  
     */
    typedef struct {
        unsigned32          num_bytes;
        [size_is(num_bytes), ptr] 
            byte            *bytes;
    } sec_bytes_t;
    typedef [ptr] sec_bytes_t *sec_bytes_p_t;

    /* and another generic type for encrypting them */
    typedef struct  {
        sec_etype_t         etype;      
        sec_key_version_t   ekvno;   
        sec_bytes_t         ebytes;
    } sec_encrypted_bytes_t;
    typedef [ptr] sec_encrypted_bytes_t *sec_encrypted_bytes_p_t;

}


