src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.h
changeset 47216 71c04702a3d5
parent 43248 5e15de85a1a0
child 58489 2faeaa5933a6
equal deleted inserted replaced
47215:4ebc2e2fb97c 47216:71c04702a3d5
       
     1 /*
       
     2  * reserved comment block
       
     3  * DO NOT REMOVE OR ALTER!
       
     4  */
       
     5 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
       
     6  *
       
     7  * Redistribution and use in  source and binary forms, with or without
       
     8  * modification, are permitted  provided that the following conditions are met:
       
     9  *
       
    10  * 1. Redistributions of  source code must retain the above copyright notice,
       
    11  *    this list of conditions and the following disclaimer.
       
    12  *
       
    13  * 2. Redistributions in  binary form must reproduce the above copyright notice,
       
    14  *    this list of conditions and the following disclaimer in the documentation
       
    15  *    and/or other materials provided with the distribution.
       
    16  *
       
    17  * 3. The end-user documentation included with the redistribution, if any, must
       
    18  *    include the following acknowledgment:
       
    19  *
       
    20  *    "This product includes software developed by IAIK of Graz University of
       
    21  *     Technology."
       
    22  *
       
    23  *    Alternately, this acknowledgment may appear in the software itself, if
       
    24  *    and wherever such third-party acknowledgments normally appear.
       
    25  *
       
    26  * 4. The names "Graz University of Technology" and "IAIK of Graz University of
       
    27  *    Technology" must not be used to endorse or promote products derived from
       
    28  *    this software without prior written permission.
       
    29  *
       
    30  * 5. Products derived from this software may not be called
       
    31  *    "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior
       
    32  *    written permission of Graz University of Technology.
       
    33  *
       
    34  *  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
       
    35  *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
    36  *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
       
    37  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE
       
    38  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
       
    39  *  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
       
    40  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
       
    41  *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
       
    42  *  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
       
    43  *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
       
    44  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
       
    45  *  POSSIBILITY  OF SUCH DAMAGE.
       
    46  */
       
    47 
       
    48 /*
       
    49  * pkcs11wrapper.h
       
    50  * 18.05.2001
       
    51  *
       
    52  * declaration of all functions used by pkcs11wrapper.c
       
    53  *
       
    54  * @author Karl Scheibelhofer <Karl.Scheibelhofer@iaik.at>
       
    55  */
       
    56 
       
    57 /* defines for UNIX platforms *************************************************/
       
    58 
       
    59 #ifndef _P11_MD_H
       
    60 #define _P11_MD_H 1
       
    61 
       
    62 #define CK_PTR *
       
    63 #define CK_DEFINE_FUNCTION(returnType, name) returnType name
       
    64 #define CK_DECLARE_FUNCTION(returnType, name) returnType name
       
    65 #define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType (* name)
       
    66 #define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name)
       
    67 #ifndef NULL_PTR
       
    68 #define NULL_PTR 0
       
    69 #endif
       
    70 
       
    71 #include "pkcs11.h"
       
    72 
       
    73 #include "jni.h"
       
    74 
       
    75 /* A data structure to hold required information about a PKCS#11 module. */
       
    76 struct ModuleData {
       
    77 
       
    78     /* the module (DLL or shared library) handle */
       
    79     void *hModule;
       
    80 
       
    81     /* The pointer to the PKCS#11 functions of this module. */
       
    82     CK_FUNCTION_LIST_PTR ckFunctionListPtr;
       
    83 
       
    84     /* Reference to the object to use for mutex handling. NULL, if not used. */
       
    85     jobject applicationMutexHandler;
       
    86 
       
    87 };
       
    88 typedef struct ModuleData ModuleData;
       
    89 
       
    90 #endif  /* _P11_MD_H */