libchipcard  5.1.0beta
starcos.h
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Mon Mar 01 2004
3  copyright : (C) 2004-2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * Please see toplevel file COPYING for license details *
8  ***************************************************************************/
9 
10 
11 #ifndef CHIPCARD_CARD_STARCOS_H
12 #define CHIPCARD_CARD_STARCOS_H
13 
14 #include <chipcard/card.h>
15 #include <chipcard/cards/starcos_keydescr.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 
22 #define LC_STARCOS_KEY_STATUS_ACTIVE 0x10
23 #define LC_STARCOS_KEY_STATUS_INACTIVE_CERT 0x0a
24 #define LC_STARCOS_KEY_STATUS_INACTIVE_FREE 0x08
25 #define LC_STARCOS_KEY_STATUS_INACTIVE_NEW 0x07
26 #define LC_STARCOS_KEY_STATUS_ACTIVE_NEW 0x02
27 #define LC_STARCOS_KEY_STATUS_ACTIVE_INCOMPLETE 0x01
28 #define LC_STARCOS_KEY_STATUS_ACTIVE_INILETTER 0x00
29 #define LC_STARCOS_KEY_STATUS_INTERNAL_UNUSED 0xff
30 
31 
38 
39 
41 GWEN_DB_NODE *LC_Starcos_GetCardDataAsDb(const LC_CARD *card);
43 GWEN_BUFFER *LC_Starcos_GetCardDataAsBuffer(const LC_CARD *card);
44 
45 
46 
51 
52 
60  int kid,
61  int bits);
62 
65  int srcKid,
66  int dstKid,
67  const LC_STARCOS_KEYDESCR *descr);
68 
71  LC_STARCOS_KEYDESCR **pDescr);
72 
75  const LC_STARCOS_KEYDESCR *d);
76 
79  const uint8_t *pModulus,
80  uint32_t lModulus,
81  const uint8_t *pExponent,
82  uint32_t lExponent);
83 
86  GWEN_BUFFER *bModulus,
87  GWEN_BUFFER *bExponent);
88 
111  int idx,
112  GWEN_DB_NODE *dbData);
113 
116  int idx,
117  GWEN_DB_NODE *dbData);
128  uint32_t *pSeq);
129 
134 LC_CLIENT_RESULT LC_Starcos_GetChallenge(LC_CARD *card, GWEN_BUFFER *mbuf);
135 
136 
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif /* CHIPCARD_CARD_STARCOS_H */
144 
145 
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_ReadPublicKey(LC_CARD *card, int kid, GWEN_BUFFER *bModulus, GWEN_BUFFER *bExponent)
struct LC_STARCOS_KEYDESCR LC_STARCOS_KEYDESCR
Definition: starcos_keydescr.h:59
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_ReadSigCounter(LC_CARD *card, int kid, uint32_t *pSeq)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_GenerateKeyPair(LC_CARD *card, int kid, int bits)
#define CHIPCARD_API
Definition: chipcard.h:50
CHIPCARD_API int LC_Starcos_UnextendCard(LC_CARD *card)
LC_CLIENT_RESULT
Definition: client.h:40
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_ReadInstituteData(LC_CARD *card, int idx, GWEN_DB_NODE *dbData)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_WriteInstituteData(LC_CARD *card, int idx, GWEN_DB_NODE *dbData)
CHIPCARD_API int LC_Starcos_ExtendCard(LC_CARD *card)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_ActivateKeyPair(LC_CARD *card, int srcKid, int dstKid, const LC_STARCOS_KEYDESCR *descr)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_Reopen(LC_CARD *card)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_GetKeyDescr(LC_CARD *card, int kid, LC_STARCOS_KEYDESCR **pDescr)
CHIPCARD_API GWEN_DB_NODE * LC_Starcos_GetCardDataAsDb(const LC_CARD *card)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_WritePublicKey(LC_CARD *card, int kid, const uint8_t *pModulus, uint32_t lModulus, const uint8_t *pExponent, uint32_t lExponent)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_GetChallenge(LC_CARD *card, GWEN_BUFFER *mbuf)
CHIPCARD_API GWEN_BUFFER * LC_Starcos_GetCardDataAsBuffer(const LC_CARD *card)
CHIPCARD_API LC_CLIENT_RESULT LC_Starcos_SaveKeyDescr(LC_CARD *card, const LC_STARCOS_KEYDESCR *d)
struct LC_CARD LC_CARD
Definition: card.h:25