~ubuntu-branches/ubuntu/jaunty/gnupg2/jaunty-updates

« back to all changes in this revision

Viewing changes to scd/tlv.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Urlichs
  • Date: 2005-12-08 22:13:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208221321-4rvs2vu835iam5wv
Tags: 1.9.19-2
* Convert debian/changelog to UTF-8.
* Put gnupg-agent and gpgsm lintian overrides in the respectively
  right package.  Closes: #335066
* Added debhelper tokens to maintainer scripts.
* xsession fixes:
  o Added host name to gpg-agent PID file name.  Closes: #312717
  o Fixed xsession script to be able to run under zsh.  Closes: #308516
  o Don't run gpg-agent if one is already running.  Closes: #336480
* debian/control:
  o Fixed package description of gpgsm package.  Closes: #299842
  o Added mention of gpg-agent to description of gnupg-agent package.
    Closes: #304355
* Thanks to Peter Eisentraut <petere@debian.org> for all of the above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
};
63
63
 
64
64
 
 
65
/* Locate a TLV encoded data object in BUFFER of LENGTH and return a
 
66
   pointer to value as well as its length in NBYTES.  Return NULL if
 
67
   it was not found or if the object does not fit into the buffer. */
 
68
const unsigned char *find_tlv (const unsigned char *buffer, size_t length,
 
69
                               int tag, size_t *nbytes);
 
70
 
65
71
 
66
72
/* Locate a TLV encoded data object in BUFFER of LENGTH and return a
67
73
   pointer to value as well as its length in NBYTES.  Return NULL if
68
74
   it was not found.  Note, that the function does not check whether
69
75
   the value fits into the provided buffer.*/
70
 
const unsigned char *find_tlv (const unsigned char *buffer, size_t length,
71
 
                               int tag, size_t *nbytes);
 
76
const unsigned char *find_tlv_unchecked (const unsigned char *buffer,
 
77
                                         size_t length,
 
78
                                         int tag, size_t *nbytes);
72
79
 
73
80
 
74
81
/* ASN.1 BER parser: Parse BUFFER of length SIZE and return the tag
81
88
 
82
89
 
83
90
 
 
91
/* Return the next token of an canconical encoded S-expression.  BUF
 
92
   is the pointer to the S-expression and BUFLEN is a pointer to the
 
93
   length of this S-expression (used to validate the syntax).  Both
 
94
   are updated to reflect the new position.  The token itself is
 
95
   returned as a pointer into the orginal buffer at TOK and TOKLEN.
 
96
   If a parentheses is the next token, TOK will be set to NULL.
 
97
   TOKLEN is checked to be within the bounds.  On error a error code
 
98
   is returned and all pointers should are not guaranteed to point to
 
99
   a meanigful value. DEPTH should be initialized to 0 and will
 
100
   reflect on return the actual depth of the tree. To detect the end
 
101
   of the S-expression it is advisable to check DEPTH after a
 
102
   successful return. */
 
103
gpg_error_t parse_sexp (unsigned char const **buf, size_t *buflen,
 
104
                        int *depth, unsigned char const **tok, size_t *toklen);
 
105
 
 
106
 
 
107
 
84
108
#endif /* SCD_TLV_H */