~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to scd/app-common.h

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-03-08 22:46:47 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090308224647-gq17gatcl71lrc2k
Tags: 2.0.11-1
* New upstream release. (Closes: #496663)
* debian/control: Make the description a little more distinctive than
  gnupg v1's. Thanks Jari Aalto. (Closes: #496323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* app-common.h - Common declarations for all card applications
2
 
 *      Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 
2
 * Copyright (C) 2003, 2005, 2008 Free Software Foundation, Inc.
3
3
 *
4
4
 * This file is part of GnuPG.
5
5
 *
16
16
 * You should have received a copy of the GNU General Public License
17
17
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18
18
 *
19
 
 * $Id: app-common.h 4531 2007-07-05 16:58:19Z wk $
 
19
 * $Id: app-common.h 4934 2009-02-27 14:36:59Z wk $
20
20
 */
21
21
 
22
22
#ifndef GNUPG_SCD_APP_COMMON_H
31
31
#endif
32
32
 
33
33
 
 
34
#define APP_CHANGE_FLAG_RESET    1
 
35
#define APP_CHANGE_FLAG_NULLPIN  2
 
36
 
 
37
 
34
38
struct app_local_s;  /* Defined by all app-*.c.  */
35
39
 
36
40
struct app_ctx_s {
37
 
  int initialized;  /* The application has been initialied and the
38
 
                       function pointers may be used.  Note that for
39
 
                       unsupported operations the particular
40
 
                       function pointer is set to NULL */
41
 
 
42
 
  int ref_count;    /* Number of connections currently using this
43
 
                       application context.  fixme: We might want to
44
 
                       merg this witghn INITIALIZED above. */
 
41
  unsigned int ref_count;  /* Number of connections currently using
 
42
                              this application context.  If this is
 
43
                              not 0 the application has been
 
44
                              initialized and the function pointers
 
45
                              may be used.  Note that for unsupported
 
46
                              operations the particular function
 
47
                              pointer is set to NULL */
45
48
 
46
49
  int slot;         /* Used reader. */
47
50
 
90
93
                     void *pincb_arg,
91
94
                     const void *indata, size_t indatalen,
92
95
                     unsigned char **outdata, size_t *outdatalen);
 
96
    gpg_error_t (*writecert) (app_t app, ctrl_t ctrl,
 
97
                              const char *certid,
 
98
                              gpg_error_t (*pincb)(void*,const char *,char **),
 
99
                              void *pincb_arg,
 
100
                              const unsigned char *data, size_t datalen);
93
101
    gpg_error_t (*writekey) (app_t app, ctrl_t ctrl,
94
 
                             const char *certid, unsigned int flags,
 
102
                             const char *keyid, unsigned int flags,
95
103
                             gpg_error_t (*pincb)(void*,const char *,char **),
96
104
                             void *pincb_arg,
97
105
                             const unsigned char *pk, size_t pklen);
101
109
                           gpg_error_t (*pincb)(void*, const char *, char **),
102
110
                           void *pincb_arg);
103
111
    gpg_error_t (*change_pin) (app_t app, ctrl_t ctrl,
104
 
                       const char *chvnostr, int reset_mode,
 
112
                       const char *chvnostr, unsigned int flags,
105
113
                       gpg_error_t (*pincb)(void*, const char *, char **),
106
114
                       void *pincb_arg);
107
115
    gpg_error_t (*check_pin) (app_t app, const char *keyidstr,
129
137
 
130
138
/*-- app.c --*/
131
139
void app_dump_state (void);
132
 
void application_notify_card_removed (int slot);
 
140
void application_notify_card_reset (int slot);
133
141
gpg_error_t check_application_conflict (ctrl_t ctrl, const char *name);
134
142
gpg_error_t select_application (ctrl_t ctrl, int slot, const char *name,
135
143
                                app_t *r_app);
 
144
char *get_supported_applications (void);
136
145
void release_application (app_t app);
137
146
gpg_error_t app_munge_serialno (app_t app);
138
147
gpg_error_t app_get_serial_and_stamp (app_t app, char **serial, time_t *stamp);
161
170
                  void *pincb_arg,
162
171
                  const void *indata, size_t indatalen,
163
172
                  unsigned char **outdata, size_t *outdatalen );
 
173
gpg_error_t app_writecert (app_t app, ctrl_t ctrl,
 
174
                           const char *certidstr,
 
175
                           gpg_error_t (*pincb)(void*, const char *, char **),
 
176
                           void *pincb_arg,
 
177
                           const unsigned char *keydata, size_t keydatalen);
164
178
gpg_error_t app_writekey (app_t app, ctrl_t ctrl,
165
179
                          const char *keyidstr, unsigned int flags,
166
180
                          gpg_error_t (*pincb)(void*, const char *, char **),
194
208
/*-- app-p15.c --*/
195
209
gpg_error_t app_select_p15 (app_t app);
196
210
 
 
211
/*-- app-geldkarte.c --*/
 
212
gpg_error_t app_select_geldkarte (app_t app);
 
213
 
197
214
 
198
215
#endif
199
216