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

« back to all changes in this revision

Viewing changes to g10/iso7816.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Mueller
  • Date: 2005-03-29 10:30:32 UTC
  • Revision ID: james.westby@ubuntu.com-20050329103032-sj42n2ain3ipx310
Tags: upstream-1.9.15
ImportĀ upstreamĀ versionĀ 1.9.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* iso7816.h - ISO 7816 commands
 
2
 *      Copyright (C) 2003 Free Software Foundation, Inc.
 
3
 *
 
4
 * This file is part of GnuPG.
 
5
 *
 
6
 * GnuPG is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * GnuPG is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
19
 *
 
20
 * $Id: iso7816.h,v 1.2.2.5 2004/10/14 09:12:36 werner Exp $
 
21
 */
 
22
 
 
23
#ifndef ISO7816_H
 
24
#define ISO7816_H
 
25
 
 
26
#if GNUPG_MAJOR_VERSION == 1
 
27
#include "cardglue.h"
 
28
#endif
 
29
 
 
30
gpg_error_t iso7816_map_sw (int sw);
 
31
 
 
32
gpg_error_t iso7816_select_application (int slot,
 
33
                                        const char *aid, size_t aidlen);
 
34
gpg_error_t iso7816_select_file (int slot, int tag, int is_dir,
 
35
                                 unsigned char **result, size_t *resultlen);
 
36
gpg_error_t iso7816_list_directory (int slot, int list_dirs,
 
37
                                    unsigned char **result, size_t *resultlen);
 
38
gpg_error_t iso7816_verify (int slot,
 
39
                            int chvno, const char *chv, size_t chvlen);
 
40
gpg_error_t iso7816_change_reference_data (int slot, int chvno,
 
41
                               const char *oldchv, size_t oldchvlen,
 
42
                               const char *newchv, size_t newchvlen);
 
43
gpg_error_t iso7816_reset_retry_counter (int slot, int chvno,
 
44
                                         const char *newchv, size_t newchvlen);
 
45
gpg_error_t iso7816_get_data (int slot, int tag,
 
46
                              unsigned char **result, size_t *resultlen);
 
47
gpg_error_t iso7816_put_data (int slot, int tag,
 
48
                              const unsigned char *data, size_t datalen);
 
49
gpg_error_t iso7816_manage_security_env (int slot, int p1, int p2,
 
50
                                         const unsigned char *data,
 
51
                                         size_t datalen);
 
52
gpg_error_t iso7816_compute_ds (int slot,
 
53
                                const unsigned char *data, size_t datalen,
 
54
                                unsigned char **result, size_t *resultlen);
 
55
gpg_error_t iso7816_decipher (int slot,
 
56
                              const unsigned char *data, size_t datalen,
 
57
                              int padind,
 
58
                              unsigned char **result, size_t *resultlen);
 
59
gpg_error_t iso7816_internal_authenticate (int slot,
 
60
                                   const unsigned char *data, size_t datalen,
 
61
                                   unsigned char **result, size_t *resultlen);
 
62
gpg_error_t iso7816_generate_keypair (int slot,
 
63
                                   const unsigned char *data, size_t datalen,
 
64
                                   unsigned char **result, size_t *resultlen);
 
65
gpg_error_t iso7816_read_public_key (int slot,
 
66
                                   const unsigned char *data, size_t datalen,
 
67
                                   unsigned char **result, size_t *resultlen);
 
68
gpg_error_t iso7816_get_challenge (int slot,
 
69
                                   int length, unsigned char *buffer);
 
70
 
 
71
gpg_error_t iso7816_read_binary (int slot, size_t offset, size_t nmax,
 
72
                                 unsigned char **result, size_t *resultlen);
 
73
gpg_error_t iso7816_read_record (int slot, int recno, int reccount,
 
74
                                 int short_ef,
 
75
                                 unsigned char **result, size_t *resultlen);
 
76
 
 
77
#endif /*ISO7816_H*/