151
151
/* Symmetric algorithms */
152
152
#define SC_ALGORITHM_DES 64
153
153
#define SC_ALGORITHM_3DES 65
154
#define SC_ALGORITHM_GOST 66
155
156
/* Hash algorithms */
156
157
#define SC_ALGORITHM_MD5 128
157
158
#define SC_ALGORITHM_SHA1 129
159
#define SC_ALGORITHM_GOSTHASH 130
159
161
/* Key derivation algorithms */
160
162
#define SC_ALGORITHM_PBKDF2 192
188
190
#define SC_ALGORITHM_RSA_HASH_SHA224 0x00001000
189
191
#define SC_ALGORITHM_RSA_HASHES 0x00001FE0
193
#define SC_ALGORITHM_GOST_CRYPT_PZ 0x0
194
#define SC_ALGORITHM_GOST_CRYPT_GAMM 0x1
195
#define SC_ALGORITHM_GOST_CRYPT_GAMMOS 0x2
191
197
/* Event masks for sc_wait_for_event() */
192
198
#define SC_EVENT_CARD_INSERTED 0x0001
193
199
#define SC_EVENT_CARD_REMOVED 0x0002
367
373
/* Called when the driver is being unloaded. finish() has to
368
374
* deallocate the private data and any resources. */
369
375
int (*finish)(struct sc_context *ctx, void *priv_data);
376
/* Called when library wish to detect new readers
377
* should add only new readers. */
378
int (*detect_readers)(struct sc_context *ctx, void *priv_data);
370
379
/* Called when releasing a reader. release() has to
371
380
* deallocate the private data. Other fields will be
372
381
* freed by OpenSC. */
446
455
/* The card supports 2048 bit RSA keys */
447
456
#define SC_CARD_CAP_RSA_2048 0x00000020
458
/* D-TRUST CardOS cards special flags */
459
#define SC_CARD_CAP_ONLY_RAW_HASH 0x00000040
460
#define SC_CARD_CAP_ONLY_RAW_HASH_STRIPPED 0x00000080
449
462
typedef struct sc_card {
450
463
struct sc_context *ctx;
451
464
struct sc_reader *reader;
717
730
int sc_release_context(sc_context_t *ctx);
733
* Detect new readers available on system.
734
* @param ctx OpenSC context
735
* @return SC_SUCCESS on success and an error code otherwise.
737
int sc_ctx_detect_readers(sc_context_t *ctx);
720
740
* Returns a pointer to the specified sc_reader_t object
721
741
* @param ctx OpenSC context
722
742
* @param i number of the reader structure to return (starting with 0)
1150
1170
return drv_version; \
1153
extern struct sc_reader_driver *sc_get_pcsc_driver(void);
1154
extern struct sc_reader_driver *sc_get_ctapi_driver(void);
1155
extern struct sc_reader_driver *sc_get_openct_driver(void);
1157
extern sc_card_driver_t *sc_get_default_driver(void);
1158
extern sc_card_driver_t *sc_get_emv_driver(void);
1159
extern sc_card_driver_t *sc_get_cardos_driver(void);
1160
extern sc_card_driver_t *sc_get_cryptoflex_driver(void);
1161
extern sc_card_driver_t *sc_get_cyberflex_driver(void);
1162
extern sc_card_driver_t *sc_get_gpk_driver(void);
1163
1173
extern sc_card_driver_t *sc_get_iso7816_driver(void);
1164
extern sc_card_driver_t *sc_get_miocos_driver(void);
1165
extern sc_card_driver_t *sc_get_mcrd_driver(void);
1166
extern sc_card_driver_t *sc_get_setcos_driver(void);
1167
extern sc_card_driver_t *sc_get_starcos_driver(void);
1168
extern sc_card_driver_t *sc_get_tcos_driver(void);
1169
extern sc_card_driver_t *sc_get_openpgp_driver(void);
1170
extern sc_card_driver_t *sc_get_jcop_driver(void);
1171
extern sc_card_driver_t *sc_get_oberthur_driver(void);
1172
extern sc_card_driver_t *sc_get_belpic_driver(void);
1173
extern sc_card_driver_t *sc_get_atrust_acos_driver(void);
1174
extern sc_card_driver_t *sc_get_incrypto34_driver(void);
1175
extern sc_card_driver_t *sc_get_piv_driver(void);
1176
extern sc_card_driver_t *sc_get_muscle_driver(void);
1177
extern sc_card_driver_t *sc_get_acos5_driver(void);
1178
extern sc_card_driver_t *sc_get_asepcos_driver(void);
1179
extern sc_card_driver_t *sc_get_akis_driver(void);
1181
1175
#ifdef __cplusplus