~ubuntu-branches/ubuntu/feisty/gnupg2/feisty

« back to all changes in this revision

Viewing changes to g10/packet.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-11-24 18:48:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061124184823-17ir9m46tl09n9k4
Tags: 2.0.0-4ubuntu1
* Synchronize to Debian, reapply remaining Ubuntu changes to pristine Debian
  version:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "../jnlib/strlist.h"
29
29
#include "cipher.h"
30
30
#include "filter.h"
 
31
#include "../common/openpgpdefs.h"
31
32
 
32
33
#define DEBUG_PARSE_PACKET 1
33
34
 
34
 
typedef enum {
35
 
        PKT_NONE           =0,
36
 
        PKT_PUBKEY_ENC     =1, /* public key encrypted packet */
37
 
        PKT_SIGNATURE      =2, /* secret key encrypted packet */
38
 
        PKT_SYMKEY_ENC     =3, /* session key packet (OpenPGP)*/
39
 
        PKT_ONEPASS_SIG    =4, /* one pass sig packet (OpenPGP)*/
40
 
        PKT_SECRET_KEY     =5, /* secret key */
41
 
        PKT_PUBLIC_KEY     =6, /* public key */
42
 
        PKT_SECRET_SUBKEY  =7, /* secret subkey (OpenPGP) */
43
 
        PKT_COMPRESSED     =8, /* compressed data packet */
44
 
        PKT_ENCRYPTED      =9, /* conventional encrypted data */
45
 
        PKT_MARKER        =10, /* marker packet (OpenPGP) */
46
 
        PKT_PLAINTEXT     =11, /* plaintext data with filename and mode */
47
 
        PKT_RING_TRUST    =12, /* keyring trust packet */
48
 
        PKT_USER_ID       =13, /* user id packet */
49
 
        PKT_PUBLIC_SUBKEY =14, /* public subkey (OpenPGP) */
50
 
        PKT_OLD_COMMENT   =16, /* comment packet from an OpenPGP draft */
51
 
        PKT_ATTRIBUTE     =17, /* PGP's attribute packet */
52
 
        PKT_ENCRYPTED_MDC =18, /* integrity protected encrypted data */
53
 
        PKT_MDC           =19, /* manipulation detection code packet */
54
 
        PKT_COMMENT       =61, /* new comment packet (private) */
55
 
        PKT_GPG_CONTROL   =63  /* internal control packet */
56
 
} pkttype_t;
57
35
 
58
36
typedef struct packet_struct PACKET;
59
37
 
373
351
                            (a)->pkt.generic = NULL;    \
374
352
                       } while(0)
375
353
 
376
 
typedef enum {
377
 
    SIGSUBPKT_TEST_CRITICAL=-3,
378
 
    SIGSUBPKT_LIST_UNHASHED=-2,
379
 
    SIGSUBPKT_LIST_HASHED  =-1,
380
 
    SIGSUBPKT_NONE         = 0,
381
 
    SIGSUBPKT_SIG_CREATED  = 2, /* signature creation time */
382
 
    SIGSUBPKT_SIG_EXPIRE   = 3, /* signature expiration time */
383
 
    SIGSUBPKT_EXPORTABLE   = 4, /* exportable */
384
 
    SIGSUBPKT_TRUST        = 5, /* trust signature */
385
 
    SIGSUBPKT_REGEXP       = 6, /* regular expression */
386
 
    SIGSUBPKT_REVOCABLE    = 7, /* revocable */
387
 
    SIGSUBPKT_KEY_EXPIRE   = 9, /* key expiration time */
388
 
    SIGSUBPKT_ARR          =10, /* additional recipient request */
389
 
    SIGSUBPKT_PREF_SYM     =11, /* preferred symmetric algorithms */
390
 
    SIGSUBPKT_REV_KEY      =12, /* revocation key */
391
 
    SIGSUBPKT_ISSUER       =16, /* issuer key ID */
392
 
    SIGSUBPKT_NOTATION     =20, /* notation data */
393
 
    SIGSUBPKT_PREF_HASH    =21, /* preferred hash algorithms */
394
 
    SIGSUBPKT_PREF_COMPR   =22, /* preferred compression algorithms */
395
 
    SIGSUBPKT_KS_FLAGS     =23, /* key server preferences */
396
 
    SIGSUBPKT_PREF_KS      =24, /* preferred key server */
397
 
    SIGSUBPKT_PRIMARY_UID  =25, /* primary user id */
398
 
    SIGSUBPKT_POLICY       =26, /* policy URL */
399
 
    SIGSUBPKT_KEY_FLAGS    =27, /* key flags */
400
 
    SIGSUBPKT_SIGNERS_UID  =28, /* signer's user id */
401
 
    SIGSUBPKT_REVOC_REASON =29, /* reason for revocation */
402
 
    SIGSUBPKT_FEATURES     =30, /* feature flags */
403
 
 
404
 
    SIGSUBPKT_SIGNATURE    =32, /* embedded signature */
405
 
 
406
 
    SIGSUBPKT_FLAG_CRITICAL=128
407
 
} sigsubpkttype_t;
408
354
 
409
355
struct notation
410
356
{
424
370
/*-- mainproc.c --*/
425
371
int proc_packets( void *ctx, iobuf_t a );
426
372
int proc_signature_packets( void *ctx, iobuf_t a,
427
 
                            STRLIST signedfiles, const char *sigfile );
 
373
                            strlist_t signedfiles, const char *sigfile );
428
374
int proc_encryption_packets( void *ctx, iobuf_t a );
429
375
int list_packets( iobuf_t a );
430
376