Path: blob/master/src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.h
41149 views
/*1* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.2*/34/*5* reserved comment block6* DO NOT REMOVE OR ALTER!7*/8/* Copyright (c) 2002 Graz University of Technology. All rights reserved.9*10* Redistribution and use in source and binary forms, with or without11* modification, are permitted provided that the following conditions are met:12*13* 1. Redistributions of source code must retain the above copyright notice,14* this list of conditions and the following disclaimer.15*16* 2. Redistributions in binary form must reproduce the above copyright notice,17* this list of conditions and the following disclaimer in the documentation18* and/or other materials provided with the distribution.19*20* 3. The end-user documentation included with the redistribution, if any, must21* include the following acknowledgment:22*23* "This product includes software developed by IAIK of Graz University of24* Technology."25*26* Alternately, this acknowledgment may appear in the software itself, if27* and wherever such third-party acknowledgments normally appear.28*29* 4. The names "Graz University of Technology" and "IAIK of Graz University of30* Technology" must not be used to endorse or promote products derived from31* this software without prior written permission.32*33* 5. Products derived from this software may not be called34* "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior35* written permission of Graz University of Technology.36*37* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED38* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED39* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR40* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE41* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,42* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,43* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,44* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON45* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,46* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY47* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE48* POSSIBILITY OF SUCH DAMAGE.49*/5051/*52* pkcs11wrapper.h53* 18.05.200154*55* declaration of all functions used by pkcs11wrapper.c56*57* @author Karl Scheibelhofer <[email protected]>58*/5960/* defines for UNIX platforms *************************************************/6162#ifndef _P11_MD_H63#define _P11_MD_H 16465#define CK_PTR *66#define CK_DEFINE_FUNCTION(returnType, name) returnType name67#define CK_DECLARE_FUNCTION(returnType, name) returnType name68#define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType (* name)69#define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name)70#ifndef NULL_PTR71#define NULL_PTR 072#endif7374#include "pkcs11.h"75#include "pkcs11gcm2.h"7677#include "jni.h"7879/* A data structure to hold required information about a PKCS#11 module. */80struct ModuleData {8182/* the module (DLL or shared library) handle */83void *hModule;8485/* The pointer to the PKCS#11 functions of this module. */86CK_FUNCTION_LIST_PTR ckFunctionListPtr;8788/* Reference to the object to use for mutex handling. NULL, if not used. */89jobject applicationMutexHandler;9091};92typedef struct ModuleData ModuleData;9394#endif /* _P11_MD_H */959697