1 /* $NetBSD: ldap_casa.h,v 1.3 2022/04/03 01:10:58 christos Exp $ */ 2 3 /* ldap_casa.h 4 5 Definition for CASA modules... */ 6 7 /* Copyright (c) 2006 Novell, Inc. 8 9 * All rights reserved. 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions are met: 12 * 1.Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 2.Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * 3.Neither the name of ISC, ISC DHCP, nor the names of its contributors 18 * may be used to endorse or promote products derived from this software 19 * without specific prior written permission. 20 21 * THIS SOFTWARE IS PROVIDED BY INTERNET SYSTEMS CONSORTIUM AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ISC OR CONTRIBUTORS BE LIABLE 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * POSSIBILITY OF SUCH DAMAGE. 32 33 * This file was written by S Kalyanasundaram <skalyanasundaram@novell.com> 34 */ 35 36 /* 37 * Copyright (C) 2004-2022 Internet Systems Consortium, Inc. ("ISC") 38 * Copyright (c) 1995-2003 by Internet Software Consortium 39 * 40 * Permission to use, copy, modify, and distribute this software for any 41 * purpose with or without fee is hereby granted, provided that the above 42 * copyright notice and this permission notice appear in all copies. 43 * 44 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 45 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 46 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 47 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 48 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 49 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 50 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 51 * 52 * Internet Systems Consortium, Inc. 53 * PO Box 360 54 * Newmarket, NH 03857 USA 55 * <info@isc.org> 56 * https://www.isc.org/ 57 */ 58 59 #if defined(LDAP_CASA_AUTH) 60 #ifndef __LDAP_CASA_H__ 61 #define __LDAP_CASA_H__ 62 63 #include <micasa_mgmd.h> 64 65 #define MICASA_LIB "libmicasa.so.1" 66 67 SSCS_TYPEDEF_LIBCALL(int, CASA_GetCredential_T) 68 ( 69 uint32_t ssFlags, 70 SSCS_SECRET_ID_T *appSecretID, 71 SSCS_SECRET_ID_T *sharedSecretID, 72 uint32_t *credentialType, 73 void *credential, 74 SSCS_EXT_T *ext 75 ); 76 SSCS_TYPEDEF_LIBCALL(int, CASA_SetCredential_T) 77 ( 78 uint32_t ssFlags, 79 SSCS_SECRET_ID_T *appSecretID, 80 SSCS_SECRET_ID_T *sharedSecretID, 81 uint32_t credentialType, 82 void *credential, 83 SSCS_EXT_T *ext 84 ); 85 86 SSCS_TYPEDEF_LIBCALL(int, CASA_RemoveCredential_T) 87 ( 88 uint32_t ssFlags, 89 SSCS_SECRET_ID_T *appSecretID, 90 SSCS_SECRET_ID_T *sharedSecretID, 91 SSCS_EXT_T *ext 92 ); 93 static CASA_GetCredential_T p_miCASAGetCredential = NULL; 94 static CASA_SetCredential_T p_miCASASetCredential = NULL; 95 static CASA_RemoveCredential_T p_miCASARemoveCredential = NULL; 96 static void *casaIDK = NULL; 97 98 int load_casa(void); 99 static void release_casa(void); 100 int load_uname_pwd_from_miCASA(char **, char **); 101 102 #endif /* __LDAP_CASA_H__ */ 103 #endif /* LDAP_CASA_AUTH */ 104