Impleemned gpgsm's IMPORT --re-import feature.
[gnupg.git] / common / openpgpdefs.h
blobe8121b12ac37e7a8b0ab114016f3f11bba986dff
1 /* openpgpdefs.h - Constants from the OpenPGP standard (rfc2440)
2 * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3 * 2006 Free Software Foundation, Inc.
5 * This file is part of GnuPG.
7 * GnuPG is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * GnuPG is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef GNUPG_COMMON_OPENPGPDEFS_H
22 #define GNUPG_COMMON_OPENPGPDEFS_H
24 typedef enum
26 PKT_NONE = 0,
27 PKT_PUBKEY_ENC = 1, /* Public key encrypted packet. */
28 PKT_SIGNATURE = 2, /* Secret key encrypted packet. */
29 PKT_SYMKEY_ENC = 3, /* Session key packet. */
30 PKT_ONEPASS_SIG = 4, /* One pass sig packet. */
31 PKT_SECRET_KEY = 5, /* Secret key. */
32 PKT_PUBLIC_KEY = 6, /* Public key. */
33 PKT_SECRET_SUBKEY = 7, /* Secret subkey. */
34 PKT_COMPRESSED = 8, /* Compressed data packet. */
35 PKT_ENCRYPTED = 9, /* Conventional encrypted data. */
36 PKT_MARKER = 10, /* Marker packet. */
37 PKT_PLAINTEXT = 11, /* Literal data packet. */
38 PKT_RING_TRUST = 12, /* Keyring trust packet. */
39 PKT_USER_ID = 13, /* User id packet. */
40 PKT_PUBLIC_SUBKEY = 14, /* Public subkey. */
41 PKT_OLD_COMMENT = 16, /* Comment packet from an OpenPGP draft. */
42 PKT_ATTRIBUTE = 17, /* PGP's attribute packet. */
43 PKT_ENCRYPTED_MDC = 18, /* Integrity protected encrypted data. */
44 PKT_MDC = 19, /* Manipulation detection code packet. */
45 PKT_COMMENT = 61, /* new comment packet (GnuPG specific). */
46 PKT_GPG_CONTROL = 63 /* internal control packet (GnuPG specific). */
48 pkttype_t;
51 typedef enum
53 SIGSUBPKT_TEST_CRITICAL = -3,
54 SIGSUBPKT_LIST_UNHASHED = -2,
55 SIGSUBPKT_LIST_HASHED = -1,
56 SIGSUBPKT_NONE = 0,
57 SIGSUBPKT_SIG_CREATED = 2, /* Signature creation time. */
58 SIGSUBPKT_SIG_EXPIRE = 3, /* Signature expiration time. */
59 SIGSUBPKT_EXPORTABLE = 4, /* Exportable. */
60 SIGSUBPKT_TRUST = 5, /* Trust signature. */
61 SIGSUBPKT_REGEXP = 6, /* Regular expression. */
62 SIGSUBPKT_REVOCABLE = 7, /* Revocable. */
63 SIGSUBPKT_KEY_EXPIRE = 9, /* Key expiration time. */
64 SIGSUBPKT_ARR = 10, /* Additional recipient request. */
65 SIGSUBPKT_PREF_SYM = 11, /* Preferred symmetric algorithms. */
66 SIGSUBPKT_REV_KEY = 12, /* Revocation key. */
67 SIGSUBPKT_ISSUER = 16, /* Issuer key ID. */
68 SIGSUBPKT_NOTATION = 20, /* Notation data. */
69 SIGSUBPKT_PREF_HASH = 21, /* Preferred hash algorithms. */
70 SIGSUBPKT_PREF_COMPR = 22, /* Preferred compression algorithms. */
71 SIGSUBPKT_KS_FLAGS = 23, /* Key server preferences. */
72 SIGSUBPKT_PREF_KS = 24, /* Preferred key server. */
73 SIGSUBPKT_PRIMARY_UID = 25, /* Primary user id. */
74 SIGSUBPKT_POLICY = 26, /* Policy URL. */
75 SIGSUBPKT_KEY_FLAGS = 27, /* Key flags. */
76 SIGSUBPKT_SIGNERS_UID = 28, /* Signer's user id. */
77 SIGSUBPKT_REVOC_REASON = 29, /* Reason for revocation. */
78 SIGSUBPKT_FEATURES = 30, /* Feature flags. */
80 SIGSUBPKT_SIGNATURE = 32, /* Embedded signature. */
82 SIGSUBPKT_FLAG_CRITICAL = 128
84 sigsubpkttype_t;
87 #endif /*GNUPG_COMMON_OPENPGPDEFS_H*/