~ubuntu-branches/ubuntu/karmic/gnupg2/karmic-security

« back to all changes in this revision

Viewing changes to common/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-08-04 12:27:49 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20090804122749-q0j52zp6xmzvyall
Tags: 2.0.12-0ubuntu1
* New upstream release.
* Add 01-scd-pw2.patch, 03-opgp-writekey.patch, and 06-opgp-sign3072.patch
  from https://bugs.g10code.com/gnupg/issue1094 to make OpenPGP 2.0
  smartcards work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* util.h - Utility functions for GnuPG
2
 
 * Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
2
 * Copyright (C) 2001, 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
3
3
 *
4
4
 * This file is part of GnuPG.
5
5
 *
119
119
gpg_error_t add_seconds_to_isotime (gnupg_isotime_t atime, int nseconds);
120
120
gpg_error_t add_days_to_isotime (gnupg_isotime_t atime, int ndays);
121
121
gpg_error_t check_isotime (const gnupg_isotime_t atime);
 
122
void dump_isotime (const gnupg_isotime_t atime);
122
123
 
123
124
/* Copy one ISO date to another, this is inline so that we can do a
124
125
   minimal sanity check.  A null date (empty string) is allowed.  */
183
184
 
184
185
 
185
186
/*-- sexputil.c */
 
187
gpg_error_t make_canon_sexp (gcry_sexp_t sexp,
 
188
                             unsigned char **r_buffer, size_t *r_buflen);
186
189
gpg_error_t keygrip_from_canon_sexp (const unsigned char *key, size_t keylen,
187
190
                                     unsigned char *grip);
188
191
int cmp_simple_canon_sexp (const unsigned char *a, const unsigned char *b);
189
192
unsigned char *make_simple_sexp_from_hexstr (const char *line,
190
193
                                             size_t *nscanned);
191
194
int hash_algo_from_sigval (const unsigned char *sigval);
 
195
unsigned char *make_canon_sexp_from_rsa_pk (const void *m, size_t mlen,
 
196
                                            const void *e, size_t elen,
 
197
                                            size_t *r_len);
 
198
gpg_error_t get_rsa_pk_from_canon_sexp (const unsigned char *keydata,
 
199
                                        size_t keydatalen,
 
200
                                        unsigned char const **r_n, 
 
201
                                        size_t *r_nlen,
 
202
                                        unsigned char const **r_e, 
 
203
                                        size_t *r_elen);
192
204
 
193
205
/*-- convert.c --*/
194
206
int hex2bin (const char *string, void *buffer, size_t length);
201
213
 
202
214
/*-- percent.c --*/
203
215
char *percent_plus_escape (const char *string);
 
216
char *percent_plus_unescape (const char *string, int nulrepl);
 
217
char *percent_unescape (const char *string, int nulrepl);
 
218
 
 
219
size_t percent_plus_unescape_inplace (char *string, int nulrepl);
 
220
size_t percent_unescape_inplace (char *string, int nulrepl);
204
221
 
205
222
 
206
223
/*-- homedir.c --*/