1 /* 2 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 3 * Use is subject to license terms. 4 */ 5 6 #pragma ident "%Z%%M% %I% %E% SMI" 7 8 /* 9 * Copyright (C) 1998 by the FundsXpress, INC. 10 * 11 * All rights reserved. 12 * 13 * Export of this software from the United States of America may require 14 * a specific license from the United States Government. It is the 15 * responsibility of any person or organization contemplating export to 16 * obtain such a license before exporting. 17 * 18 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 19 * distribute this software and its documentation for any purpose and 20 * without fee is hereby granted, provided that the above copyright 21 * notice appear in all copies and that both that copyright notice and 22 * this permission notice appear in supporting documentation, and that 23 * the name of FundsXpress. not be used in advertising or publicity pertaining 24 * to distribution of the software without specific, written prior 25 * permission. FundsXpress makes no representations about the suitability of 26 * this software for any purpose. It is provided "as is" without express 27 * or implied warranty. 28 * 29 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 30 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 31 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 32 */ 33 34 #include "k5-int.h" 35 36 /* 37 * Solaris Kerberos 38 * krb5_string_to_key/krb5_use_enctype are needed by Samba 39 */ 40 41 krb5_error_code KRB5_CALLCONV 42 krb5_string_to_key(krb5_context context, const krb5_encrypt_block *eblock, 43 krb5_keyblock *keyblock, const krb5_data *data, 44 const krb5_data *salt) 45 { 46 return(krb5_c_string_to_key(context, eblock->crypto_entry, data, salt, 47 keyblock)); 48 } 49 50 krb5_error_code KRB5_CALLCONV 51 krb5_use_enctype(krb5_context context, krb5_encrypt_block *eblock, 52 krb5_enctype enctype) 53 { 54 eblock->crypto_entry = enctype; 55 56 return(0); 57 } 58 59 size_t KRB5_CALLCONV 60 krb5_checksum_size(krb5_context context, krb5_cksumtype ctype) 61 { 62 size_t ret; 63 64 if (krb5_c_checksum_length(context, ctype, &ret)) 65 return(-1); /* XXX */ 66 67 return(ret); 68 } 69