Debian Codegraph @

src/keyinfo.h

raw
1 /* keyinfo.h - Parse and build a keyInfo structure
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 KEYINFO_H
32 #define KEYINFO_H
33
34 #include "asn1-func.h"
35
36
37 gpg_error_t
38 _ksba_parse_algorithm_identifier (const unsigned char *der,
39 size_t derlen,
40 size_t *r_nread,
41 char **r_oid);
42 gpg_error_t
43 _ksba_parse_algorithm_identifier2 (const unsigned char *der, size_t derlen,
44 size_t *r_nread, char **r_oid,
45 char **r_parm, size_t *r_parmlen);
46
47 gpg_error_t
48 _ksba_parse_algorithm_identifier3 (const unsigned char *der, size_t derlen,
49 int firsttag,
50 size_t *r_nread, char **r_oid,
51 char **r_parm, size_t *r_parmlen,
52 int *r_parmtype);
53
54
55 gpg_error_t _ksba_keyinfo_to_sexp (const unsigned char *der, size_t derlen,
56 ksba_sexp_t *r_string)
57 _KSBA_VISIBILITY_DEFAULT;
58
59 gpg_error_t _ksba_keyinfo_from_sexp (ksba_const_sexp_t sexp, int algoinfomode,
60 unsigned char **r_der, size_t *r_derlen)
61 _KSBA_VISIBILITY_DEFAULT;
62
63 gpg_error_t _ksba_algoinfo_from_sexp (ksba_const_sexp_t sexp,
64 unsigned char **r_der, size_t *r_derlen);
65
66 gpg_error_t _ksba_keyinfo_get_pss_info (const unsigned char *der,
67 size_t derlen,
68 char **r_psshash,
69 unsigned int *r_saltlen);
70
71 gpg_error_t _ksba_sigval_to_sexp (const unsigned char *der, size_t derlen,
72 ksba_sexp_t *r_string);
73 gpg_error_t _ksba_encval_to_sexp (const unsigned char *der, size_t derlen,
74 ksba_sexp_t *r_string);
75 gpg_error_t _ksba_encval_kari_to_sexp (const unsigned char *der, size_t derlen,
76 const char *keyencralgo,
77 const char *keywrapalgo,
78 const void *enckey, size_t enckeylen,
79 ksba_sexp_t *r_string);
80
81 int _ksba_node_with_oid_to_digest_algo (const unsigned char *image,
82 AsnNode node);
83
84
85
86 #endif /*KEYINFO_H*/