Tizen 2.0 Release
[external/libgnutls26.git] / lib / opencdk / packet.h
1 /* packet.h
2  * Copyright (C) 2002, 2003, 2007, 2008, 2010 Free Software Foundation,
3  * Inc.
4  *
5  * Author: Timo Schulz
6  *
7  * This file is part of OpenCDK.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1 of
12  * the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22  * 02110-1301 USA
23  *
24  */
25 #ifndef CDK_PACKET_H
26 #define CDK_PACKET_H
27
28 struct cdk_kbnode_s
29 {
30   struct cdk_kbnode_s *next;
31   cdk_packet_t pkt;
32   unsigned int is_deleted:1;
33   unsigned int is_cloned:1;
34 };
35
36 /*-- new-packet.c --*/
37 void _cdk_free_mpibuf (size_t n, bigint_t * array);
38 void _cdk_free_userid (cdk_pkt_userid_t uid);
39 void _cdk_free_signature (cdk_pkt_signature_t sig);
40 cdk_prefitem_t _cdk_copy_prefs (const cdk_prefitem_t prefs);
41 cdk_error_t _cdk_copy_userid (cdk_pkt_userid_t * dst, cdk_pkt_userid_t src);
42 cdk_error_t _cdk_copy_pubkey (cdk_pkt_pubkey_t * dst, cdk_pkt_pubkey_t src);
43 cdk_error_t _cdk_copy_seckey (cdk_pkt_seckey_t * dst, cdk_pkt_seckey_t src);
44 cdk_error_t _cdk_copy_pk_to_sk (cdk_pkt_pubkey_t pk, cdk_pkt_seckey_t sk);
45 cdk_error_t _cdk_copy_signature (cdk_pkt_signature_t * dst,
46                                  cdk_pkt_signature_t src);
47 cdk_error_t _cdk_pubkey_compare (cdk_pkt_pubkey_t a, cdk_pkt_pubkey_t b);
48
49 #endif /* CDK_PACKET_H */