/usr/include/gwenhywfar4/gwenhywfar/ct_be.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 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | /***************************************************************************
$RCSfile$
-------------------
cvs : $Id: crypttoken.h 1113 2007-01-10 09:14:16Z martin $
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_BE_H
#define GWEN_CRYPT_CRYPTTOKEN_BE_H
#include <gwenhywfar/ct.h>
#include <gwenhywfar/inherit.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/hashalgo.h>
GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_CRYPT_TOKEN, GWENHYWFAR_API)
/** @name Prototypes for Virtual Functions
*
*/
/*@{*/
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_OPEN_FN)(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_CREATE_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_CLOSE_FN)(GWEN_CRYPT_TOKEN *ct, int abandon, uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN)(GWEN_CRYPT_TOKEN *ct,
uint32_t *pIdList,
uint32_t *pCount,
uint32_t gid);
typedef const GWEN_CRYPT_TOKEN_KEYINFO* GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_GETKEYINFO_FN)(GWEN_CRYPT_TOKEN *ct,
uint32_t id,
uint32_t flags,
uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_SETKEYINFO_FN)(GWEN_CRYPT_TOKEN *ct,
uint32_t id,
const GWEN_CRYPT_TOKEN_KEYINFO *ki,
uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN)(GWEN_CRYPT_TOKEN *ct,
uint32_t *pIdList,
uint32_t *pCount,
uint32_t gid);
typedef const GWEN_CRYPT_TOKEN_CONTEXT* GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_GETCONTEXT_FN)(GWEN_CRYPT_TOKEN *ct,
uint32_t id,
uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_SETCONTEXT_FN)(GWEN_CRYPT_TOKEN *ct,
uint32_t id,
const GWEN_CRYPT_TOKEN_CONTEXT *ctx,
uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_SIGN_FN)(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);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_VERIFY_FN)(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);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_ENCIPHER_FN)(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);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_DECIPHER_FN)(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);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_GENERATEKEY_FN)(GWEN_CRYPT_TOKEN *ct,
uint32_t keyId,
const GWEN_CRYPT_CRYPTALGO *a,
uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_CHANGEPIN_FN)(GWEN_CRYPT_TOKEN *ct, int admin, uint32_t gid);
typedef int GWENHYWFAR_CB
(*GWEN_CRYPT_TOKEN_ACTIVATEKEY_FN)(GWEN_CRYPT_TOKEN *ct, uint32_t id, uint32_t gid);
/*@}*/
/** @name Contructor
*
*/
/*@{*/
GWENHYWFAR_API GWEN_CRYPT_TOKEN *GWEN_Crypt_Token_new(GWEN_CRYPT_TOKEN_DEVICE dev,
const char *typeName,
const char *tokenName);
/*@}*/
/** @name Setting CryptToken Information
*
*/
/*@{*/
GWENHYWFAR_API void GWEN_Crypt_Token_SetTokenName(GWEN_CRYPT_TOKEN *ct, const char *s);
GWENHYWFAR_API void GWEN_Crypt_Token_SetFlags(GWEN_CRYPT_TOKEN *ct, uint32_t f);
GWENHYWFAR_API void GWEN_Crypt_Token_AddFlags(GWEN_CRYPT_TOKEN *ct, uint32_t f);
GWENHYWFAR_API void GWEN_Crypt_Token_SubFlags(GWEN_CRYPT_TOKEN *ct, uint32_t f);
/*@}*/
/** @name Interactive Helper Functions
*
*/
/*@{*/
GWENHYWFAR_API int GWEN_Crypt_Token_GetPin(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_PINTYPE pt,
GWEN_CRYPT_PINENCODING pe,
uint32_t flags,
unsigned char *pwbuffer,
unsigned int minLength,
unsigned int maxLength,
unsigned int *pinLength,
uint32_t gid);
GWENHYWFAR_API int GWEN_Crypt_Token_SetPinStatus(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_PINTYPE pt,
GWEN_CRYPT_PINENCODING pe,
uint32_t flags,
const unsigned char *buffer,
unsigned int pinLength,
int isOk,
uint32_t gid);
GWENHYWFAR_API uint32_t GWEN_Crypt_Token_BeginEnterPin(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_PINTYPE pt,
uint32_t gid);
GWENHYWFAR_API int GWEN_Crypt_Token_EndEnterPin(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_PINTYPE pt,
int ok,
uint32_t id);
GWENHYWFAR_API int GWEN_Crypt_Token_InsertToken(GWEN_CRYPT_TOKEN *ct, uint32_t gid);
GWENHYWFAR_API int GWEN_Crypt_Token_InsertCorrectToken(GWEN_CRYPT_TOKEN *ct, uint32_t gid);
/*@}*/
/** @name Setter for Virtual Functions
*
*/
/*@{*/
GWENHYWFAR_API GWEN_CRYPT_TOKEN_OPEN_FN GWEN_Crypt_Token_SetOpenFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_OPEN_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_CREATE_FN GWEN_Crypt_Token_SetCreateFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_CREATE_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_CLOSE_FN GWEN_Crypt_Token_SetCloseFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_CLOSE_FN f);
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN GWEN_Crypt_Token_SetGetKeyIdListFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_GETKEYINFO_FN GWEN_Crypt_Token_SetGetKeyInfoFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_GETKEYINFO_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_SETKEYINFO_FN GWEN_Crypt_Token_SetSetKeyInfoFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_SETKEYINFO_FN f);
GWENHYWFAR_API
GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN GWEN_Crypt_Token_SetGetContextIdListFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_GETCONTEXT_FN GWEN_Crypt_Token_SetGetContextFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_GETCONTEXT_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_SETCONTEXT_FN GWEN_Crypt_Token_SetSetContextFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_SETCONTEXT_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_SIGN_FN GWEN_Crypt_Token_SetSignFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_SIGN_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_VERIFY_FN GWEN_Crypt_Token_SetVerifyFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_VERIFY_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_ENCIPHER_FN GWEN_Crypt_Token_SetEncipherFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_ENCIPHER_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_DECIPHER_FN GWEN_Crypt_Token_SetDecipherFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_DECIPHER_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_GENERATEKEY_FN GWEN_Crypt_Token_SetGenerateKeyFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_GENERATEKEY_FN f);
GWENHYWFAR_API GWEN_CRYPT_TOKEN_CHANGEPIN_FN GWEN_Crypt_Token_SetChangePinFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_CHANGEPIN_FN f);
GWEN_CRYPT_TOKEN_ACTIVATEKEY_FN GWEN_Crypt_Token_SetActivateKeyFn(GWEN_CRYPT_TOKEN *ct,
GWEN_CRYPT_TOKEN_ACTIVATEKEY_FN f);
/*@}*/
#endif
|