Debian Codegraph @

src/ber-decoder.h

raw
1 /* ber-decoder.h - Definitions for the Basic Encoding Rules Decoder
2 * Copyright (C) 2001, 2012 g10 Code GmbH
3 *
4 * This file is part of KSBA.
5 *
6 * KSBA is free software; you can redistribute it and/or modify
7 * it under the terms of either
8 *
9 * - the GNU Lesser General Public License as published by the Free
10 * Software Foundation; either version 3 of the License, or (at
11 * your option) any later version.
12 *
13 * or
14 *
15 * - the GNU General Public License as published by the Free
16 * Software Foundation; either version 2 of the License, or (at
17 * your option) any later version.
18 *
19 * or both in parallel, as here.
20 *
21 * KSBA is distributed in the hope that it will be useful, but WITHOUT
22 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
24 * License for more details.
25 *
26 * You should have received a copies of the GNU General Public License
27 * and the GNU Lesser General Public License along with this program;
28 * if not, see <http://www.gnu.org/licenses/>.
29 */
30
31 #ifndef BER_DECODER_H
32 #define BER_DECODER_H 1
33
34 #include "asn1-func.h"
35
36 struct ber_decoder_s;
37 typedef struct ber_decoder_s *BerDecoder;
38
39 BerDecoder _ksba_ber_decoder_new (void);
40 void _ksba_ber_decoder_release (BerDecoder d);
41
42 gpg_error_t _ksba_ber_decoder_set_module (BerDecoder d, ksba_asn_tree_t module);
43 gpg_error_t _ksba_ber_decoder_set_reader (BerDecoder d, ksba_reader_t r);
44
45 gpg_error_t _ksba_ber_decoder_dump (BerDecoder d, FILE *fp);
46 gpg_error_t _ksba_ber_decoder_decode (BerDecoder d, const char *start_name,
47 unsigned int flags,
48 AsnNode *r_root,
49 unsigned char **r_image,
50 size_t *r_imagelen);
51
52 #define BER_DECODER_FLAG_FAST_STOP 1
53
54
55 #endif /*BER_DECODER_H*/