OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
hw_4758_cca.h
Go to the documentation of this file.
1 /**********************************************************************/
2 /* */
3 /* Prototypes of the CCA verbs used by the 4758 CCA openssl driver */
4 /* */
5 /* Maurice Gittens <[email protected]> */
6 /* */
7 /**********************************************************************/
8 
9 #ifndef __HW_4758_CCA__
10 #define __HW_4758_CCA__
11 
12 /*
13  * Only WIN32 support for now
14  */
15 #if defined(WIN32)
16 
17  #define CCA_LIB_NAME "CSUNSAPI"
18 
19  #define CSNDPKX "CSNDPKX_32"
20  #define CSNDKRR "CSNDKRR_32"
21  #define CSNDPKE "CSNDPKE_32"
22  #define CSNDPKD "CSNDPKD_32"
23  #define CSNDDSV "CSNDDSV_32"
24  #define CSNDDSG "CSNDDSG_32"
25  #define CSNBRNG "CSNBRNG_32"
26 
27  #define SECURITYAPI __stdcall
28 #else
29  /* Fixme!!
30  Find out the values of these constants for other platforms.
31  */
32  #define CCA_LIB_NAME "CSUNSAPI"
33 
34  #define CSNDPKX "CSNDPKX"
35  #define CSNDKRR "CSNDKRR"
36  #define CSNDPKE "CSNDPKE"
37  #define CSNDPKD "CSNDPKD"
38  #define CSNDDSV "CSNDDSV"
39  #define CSNDDSG "CSNDDSG"
40  #define CSNBRNG "CSNBRNG"
41 
42  #define SECURITYAPI
43 #endif
44 
45 /*
46  * security API prototypes
47  */
48 
49 /* PKA Key Record Read */
50 typedef void (SECURITYAPI *F_KEYRECORDREAD)
51  (long * return_code,
52  long * reason_code,
53  long * exit_data_length,
54  unsigned char * exit_data,
55  long * rule_array_count,
56  unsigned char * rule_array,
57  unsigned char * key_label,
58  long * key_token_length,
59  unsigned char * key_token);
60 
61 /* Random Number Generate */
62 typedef void (SECURITYAPI *F_RANDOMNUMBERGENERATE)
63  (long * return_code,
64  long * reason_code,
65  long * exit_data_length,
66  unsigned char * exit_data,
67  unsigned char * form,
68  unsigned char * random_number);
69 
70 /* Digital Signature Generate */
71 typedef void (SECURITYAPI *F_DIGITALSIGNATUREGENERATE)
72  (long * return_code,
73  long * reason_code,
74  long * exit_data_length,
75  unsigned char * exit_data,
76  long * rule_array_count,
77  unsigned char * rule_array,
79  unsigned char * PKA_private_key_id,
80  long * hash_length,
81  unsigned char * hash,
83  long * signature_bit_length,
84  unsigned char * signature_field);
85 
86 /* Digital Signature Verify */
88  long * return_code,
89  long * reason_code,
90  long * exit_data_length,
91  unsigned char * exit_data,
92  long * rule_array_count,
93  unsigned char * rule_array,
94  long * PKA_public_key_id_length,
95  unsigned char * PKA_public_key_id,
96  long * hash_length,
97  unsigned char * hash,
99  unsigned char * signature_field);
100 
101 /* PKA Public Key Extract */
103  long * return_code,
104  long * reason_code,
105  long * exit_data_length,
106  unsigned char * exit_data,
107  long * rule_array_count,
108  unsigned char * rule_array,
109  long * source_key_identifier_length,
110  unsigned char * source_key_identifier,
111  long * target_key_token_length,
112  unsigned char * target_key_token);
113 
114 /* PKA Encrypt */
115 typedef void (SECURITYAPI *F_PKAENCRYPT)
116  (long * return_code,
117  long * reason_code,
118  long * exit_data_length,
119  unsigned char * exit_data,
120  long * rule_array_count,
121  unsigned char * rule_array,
122  long * key_value_length,
123  unsigned char * key_value,
124  long * data_struct_length,
125  unsigned char * data_struct,
126  long * RSA_public_key_length,
127  unsigned char * RSA_public_key,
128  long * RSA_encipher_length,
129  unsigned char * RSA_encipher );
130 
131 /* PKA Decrypt */
132 typedef void (SECURITYAPI *F_PKADECRYPT)
133  (long * return_code,
134  long * reason_code,
135  long * exit_data_length,
136  unsigned char * exit_data,
137  long * rule_array_count,
138  unsigned char * rule_array,
139  long * enciphered_key_length,
140  unsigned char * enciphered_key,
141  long * data_struct_length,
142  unsigned char * data_struct,
143  long * RSA_private_key_length,
144  unsigned char * RSA_private_key,
145  long * key_value_length,
146  unsigned char * key_value );
147 
148 
149 #endif