Debian Codegraph @

src/convert.h

raw
1 /* convert.h
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 CONVERT_H
32 #define CONVERT_H
33
34 #include "asn1-func.h"
35
36 /*-- time.c --*/
37 gpg_error_t _ksba_asntime_to_iso (const char *buffer, size_t length,
38 int is_utctime, ksba_isotime_t timebuf);
39 gpg_error_t _ksba_assert_time_format (const ksba_isotime_t atime);
40 void _ksba_copy_time (ksba_isotime_t d, const ksba_isotime_t s);
41 int _ksba_cmp_time (const ksba_isotime_t a, const ksba_isotime_t b);
42 int _ksba_current_time (ksba_isotime_t timebuf);
43
44
45 /*-- dn.c --*/
46 gpg_error_t _ksba_dn_to_str (const unsigned char *image, AsnNode node,
47 char **r_string);
48 gpg_error_t _ksba_derdn_to_str (const unsigned char *der, size_t derlen,
49 char **r_string);
50 gpg_error_t _ksba_dn_from_str (const char *string, char **rbuf, size_t *rlength);
51
52 /*-- oid.c --*/
53 char *_ksba_oid_node_to_str (const unsigned char *image, AsnNode node);
54 gpg_error_t _ksba_oid_from_buf (const void *buffer, size_t buflen,
55 unsigned char **rbuf, size_t *rlength);
56
57
58 /*-- name.c --*/
59 gpg_error_t _ksba_name_new_from_der (ksba_name_t *r_name,
60 const unsigned char *image,
61 size_t imagelen);
62
63
64 #endif /*CONVERT_H*/