This file is indexed.

/usr/include/gwenhywfar4/gwenhywfar/ct.h is in libgwenhywfar60-dev 4.10.0beta-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
/***************************************************************************
    begin       : Wed Mar 16 2005
    copyright   : (C) 2005 by Martin Preuss
    email       : martin@libchipcard.de

 ***************************************************************************
 *          Please see toplevel file COPYING for license details           *
 ***************************************************************************/


#ifndef GWEN_CRYPT_CRYPTTOKEN_H
#define GWEN_CRYPT_CRYPTTOKEN_H

#include <gwenhywfar/list1.h>
#include <gwenhywfar/list2.h>



typedef struct GWEN_CRYPT_TOKEN GWEN_CRYPT_TOKEN;

#ifdef __cplusplus
extern "C" {
#endif


GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_CRYPT_TOKEN, GWEN_Crypt_Token, GWENHYWFAR_API)
GWEN_LIST2_FUNCTION_LIB_DEFS(GWEN_CRYPT_TOKEN, GWEN_Crypt_Token, GWENHYWFAR_API)

#ifdef __cplusplus
}
#endif



typedef enum {
  GWEN_Crypt_Token_Device_Unknown=-1,
  GWEN_Crypt_Token_Device_None=0,
  GWEN_Crypt_Token_Device_File,
  GWEN_Crypt_Token_Device_Card,
  GWEN_Crypt_Token_Device_Any=999
} GWEN_CRYPT_TOKEN_DEVICE;


#ifdef __cplusplus
extern "C" {
#endif

/** @name Converting Device Types to and from Strings
 *
 */
/*@{*/
GWENHYWFAR_API GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_Device_fromString(const char *s);
GWENHYWFAR_API const char *GWEN_Crypt_Token_Device_toString(GWEN_CRYPT_TOKEN_DEVICE d);
/*@}*/



#define GWEN_CRYPT_TOKEN_MODE_SECURE_PIN_ENTRY   0x00000001
#define GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY    0x00000002
/** this flag allows updating of old CryptToken files to newer versions */
#define GWEN_CRYPT_TOKEN_MODE_ALLOW_UPDATE       0x00000004
#define GWEN_CRYPT_TOKEN_MODE_EXP_65537          0x00000008
#define GWEN_CRYPT_TOKEN_MODE_DIRECT_SIGN        0x00000010



#define GWEN_CRYPT_TOKEN_FLAGS_MANAGES_SIGNSEQ   0x00000001



#include <gwenhywfar/ct_keyinfo.h>
#include <gwenhywfar/ct_context.h>
#include <gwenhywfar/paddalgo.h>
#include <gwenhywfar/hashalgo.h>
#include <gwenhywfar/cryptalgo.h>
#include <gwenhywfar/cryptdefs.h>


/** @name Basic Informations about a CryptToken
 *
 */
/*@{*/
GWENHYWFAR_API void GWEN_Crypt_Token_free(GWEN_CRYPT_TOKEN *ct);
/*@}*/



/** @name Basic Informations about a CryptToken
 *
 */
/*@{*/
GWENHYWFAR_API uint32_t GWEN_Crypt_Token_GetFlags(const GWEN_CRYPT_TOKEN *ct);

GWENHYWFAR_API uint32_t GWEN_Crypt_Token_GetModes(const GWEN_CRYPT_TOKEN *ct);

GWENHYWFAR_API void GWEN_Crypt_Token_SetModes(GWEN_CRYPT_TOKEN *ct, uint32_t f);

GWENHYWFAR_API void GWEN_Crypt_Token_AddModes(GWEN_CRYPT_TOKEN *ct, uint32_t f);

GWENHYWFAR_API void GWEN_Crypt_Token_SubModes(GWEN_CRYPT_TOKEN *ct, uint32_t f);

GWENHYWFAR_API GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_GetDevice(const GWEN_CRYPT_TOKEN *ct);

GWENHYWFAR_API const char *GWEN_Crypt_Token_GetTokenName(const GWEN_CRYPT_TOKEN *ct);

GWENHYWFAR_API const char *GWEN_Crypt_Token_GetTypeName(const GWEN_CRYPT_TOKEN *ct);

GWENHYWFAR_API const char *GWEN_Crypt_Token_GetFriendlyName(const GWEN_CRYPT_TOKEN *ct);

GWENHYWFAR_API void GWEN_Crypt_Token_SetFriendlyName(GWEN_CRYPT_TOKEN *ct, const char *s);
/*@}*/



/** @name Open, Create and Close
 *
 */
/*@{*/
GWENHYWFAR_API int GWEN_Crypt_Token_Open(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid);


GWENHYWFAR_API int GWEN_Crypt_Token_Create(GWEN_CRYPT_TOKEN *ct, uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_Close(GWEN_CRYPT_TOKEN *ct, int abandon, uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_IsOpen(const GWEN_CRYPT_TOKEN *ct);

/*@}*/



/** @name Cryptographic Objects
 *
 */
/*@{*/
GWENHYWFAR_API int GWEN_Crypt_Token_GetKeyIdList(GWEN_CRYPT_TOKEN *ct,
						 uint32_t *pIdList,
						 uint32_t *pCount,
						 uint32_t gid);

GWENHYWFAR_API const GWEN_CRYPT_TOKEN_KEYINFO* GWEN_Crypt_Token_GetKeyInfo(GWEN_CRYPT_TOKEN *ct,
									   uint32_t id,
									   uint32_t flags,
									   uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_SetKeyInfo(GWEN_CRYPT_TOKEN *ct,
					       uint32_t id,
					       const GWEN_CRYPT_TOKEN_KEYINFO *ki,
					       uint32_t gid);


GWENHYWFAR_API int GWEN_Crypt_Token_GetContextIdList(GWEN_CRYPT_TOKEN *ct,
						     uint32_t *pIdList,
						     uint32_t *pCount,
						     uint32_t gid);

GWENHYWFAR_API const GWEN_CRYPT_TOKEN_CONTEXT* GWEN_Crypt_Token_GetContext(GWEN_CRYPT_TOKEN *ct,
									   uint32_t id,
									   uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_SetContext(GWEN_CRYPT_TOKEN *ct,
					       uint32_t id,
					       const GWEN_CRYPT_TOKEN_CONTEXT *ctx,
					       uint32_t gid);
/*@}*/



/** @name Cryptographic Operations
 *
 */
/*@{*/
GWENHYWFAR_API int GWEN_Crypt_Token_Sign(GWEN_CRYPT_TOKEN *ct,
					 uint32_t keyId,
					 GWEN_CRYPT_PADDALGO *a,
					 const uint8_t *pInData,
					 uint32_t inLen,
					 uint8_t *pSignatureData,
					 uint32_t *pSignatureLen,
					 uint32_t *pSeqCounter,
					 uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_Verify(GWEN_CRYPT_TOKEN *ct,
					   uint32_t keyId,
					   GWEN_CRYPT_PADDALGO *a,
					   const uint8_t *pInData,
					   uint32_t inLen,
					   const uint8_t *pSignatureData,
					   uint32_t signatureLen,
					   uint32_t seqCounter,
					   uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_Encipher(GWEN_CRYPT_TOKEN *ct,
					     uint32_t keyId,
					     GWEN_CRYPT_PADDALGO *a,
					     const uint8_t *pInData,
					     uint32_t inLen,
					     uint8_t *pOutData,
					     uint32_t *pOutLen,
					     uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_Decipher(GWEN_CRYPT_TOKEN *ct,
					     uint32_t keyId,
					     GWEN_CRYPT_PADDALGO *a,
					     const uint8_t *pInData,
					     uint32_t inLen,
					     uint8_t *pOutData,
					     uint32_t *pOutLen,
					     uint32_t gid);
/*@}*/



/** @name Administrative Operations
 *
 */
/*@{*/
GWENHYWFAR_API int GWEN_Crypt_Token_GenerateKey(GWEN_CRYPT_TOKEN *ct,
						uint32_t keyId,
						const GWEN_CRYPT_CRYPTALGO *a,
						uint32_t gid);

GWENHYWFAR_API int GWEN_Crypt_Token_ChangePin(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid);

GWENHYWFAR_API int  GWEN_Crypt_Token_ActivateKey(GWEN_CRYPT_TOKEN *ct, uint32_t id, uint32_t gid);

/*@}*/


#ifdef __cplusplus
}
#endif



#endif