author | neliasso |
Fri, 29 Nov 2019 11:26:25 +0100 | |
changeset 59324 | 5e8f9713e343 |
parent 58489 | 2faeaa5933a6 |
permissions | -rw-r--r-- |
58489
2faeaa5933a6
8229243: SunPKCS11-Solaris provider tests failing on Solaris 11.4
valeriep
parents:
47216
diff
changeset
|
1 |
/* |
2faeaa5933a6
8229243: SunPKCS11-Solaris provider tests failing on Solaris 11.4
valeriep
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
2faeaa5933a6
8229243: SunPKCS11-Solaris provider tests failing on Solaris 11.4
valeriep
parents:
47216
diff
changeset
|
3 |
*/ |
2faeaa5933a6
8229243: SunPKCS11-Solaris provider tests failing on Solaris 11.4
valeriep
parents:
47216
diff
changeset
|
4 |
|
2 | 5 |
/* |
6 |
* reserved comment block |
|
7 |
* DO NOT REMOVE OR ALTER! |
|
8 |
*/ |
|
9 |
/* Copyright (c) 2002 Graz University of Technology. All rights reserved. |
|
10 |
* |
|
11 |
* Redistribution and use in source and binary forms, with or without |
|
12 |
* modification, are permitted provided that the following conditions are met: |
|
13 |
* |
|
14 |
* 1. Redistributions of source code must retain the above copyright notice, |
|
15 |
* this list of conditions and the following disclaimer. |
|
16 |
* |
|
17 |
* 2. Redistributions in binary form must reproduce the above copyright notice, |
|
18 |
* this list of conditions and the following disclaimer in the documentation |
|
19 |
* and/or other materials provided with the distribution. |
|
20 |
* |
|
21 |
* 3. The end-user documentation included with the redistribution, if any, must |
|
22 |
* include the following acknowledgment: |
|
23 |
* |
|
24 |
* "This product includes software developed by IAIK of Graz University of |
|
25 |
* Technology." |
|
26 |
* |
|
27 |
* Alternately, this acknowledgment may appear in the software itself, if |
|
28 |
* and wherever such third-party acknowledgments normally appear. |
|
29 |
* |
|
30 |
* 4. The names "Graz University of Technology" and "IAIK of Graz University of |
|
31 |
* Technology" must not be used to endorse or promote products derived from |
|
32 |
* this software without prior written permission. |
|
33 |
* |
|
34 |
* 5. Products derived from this software may not be called |
|
35 |
* "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior |
|
36 |
* written permission of Graz University of Technology. |
|
37 |
* |
|
38 |
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED |
|
39 |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
40 |
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
41 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE |
|
42 |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
|
43 |
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
44 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
|
45 |
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
|
46 |
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
47 |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|
48 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
49 |
* POSSIBILITY OF SUCH DAMAGE. |
|
50 |
*/ |
|
51 |
||
52 |
/* |
|
53 |
* platoform.h |
|
54 |
* 10.12.2001 |
|
55 |
* |
|
56 |
* declaration of all platform dependent functions used by pkcs11wrapper.c |
|
57 |
* |
|
58 |
* @author Karl Scheibelhofer <Karl.Scheibelhofer@iaik.at> |
|
59 |
*/ |
|
60 |
||
61 |
/* defines for WIN32 platform *************************************************/ |
|
62 |
||
63 |
#include <windows.h> |
|
64 |
||
65 |
/* statement according to PKCS11 docu */ |
|
66 |
#pragma pack(push, cryptoki, 1) |
|
67 |
||
68 |
/* definitions according to PKCS#11 docu for Win32 environment */ |
|
69 |
#define CK_PTR * |
|
70 |
#define CK_DEFINE_FUNCTION(returnType, name) returnType __declspec(dllexport) name |
|
71 |
#define CK_DECLARE_FUNCTION(returnType, name) returnType __declspec(dllimport) name |
|
72 |
#define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType __declspec(dllimport) (* name) |
|
73 |
#define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name) |
|
74 |
#ifndef NULL_PTR |
|
75 |
#define NULL_PTR 0 |
|
76 |
#endif /* NULL_PTR */ |
|
77 |
||
78 |
/* to avoid clash with Win32 #define */ |
|
79 |
#ifdef CreateMutex |
|
80 |
#undef CreateMutex |
|
81 |
#endif /* CreateMutex */ |
|
82 |
||
83 |
#include "pkcs11.h" |
|
58489
2faeaa5933a6
8229243: SunPKCS11-Solaris provider tests failing on Solaris 11.4
valeriep
parents:
47216
diff
changeset
|
84 |
#include "pkcs11gcm2.h" |
2 | 85 |
|
86 |
/* statement according to PKCS11 docu */ |
|
87 |
#pragma pack(pop, cryptoki) |
|
88 |
||
89 |
#include "jni.h" |
|
90 |
||
91 |
/* A data structure to hold required information about a PKCS#11 module. */ |
|
92 |
struct ModuleData { |
|
93 |
||
94 |
HINSTANCE hModule; |
|
95 |
||
96 |
/* The pointer to the PKCS#11 functions of this module. */ |
|
97 |
CK_FUNCTION_LIST_PTR ckFunctionListPtr; |
|
98 |
||
99 |
/* Reference to the object to use for mutex handling. NULL, if not used. */ |
|
100 |
jobject applicationMutexHandler; |
|
101 |
||
102 |
}; |
|
103 |
typedef struct ModuleData ModuleData; |