1 /*
2  * pgpdump.h
3  */
4 
5 #ifndef _PGP_DUMP_H_
6 #define _PGP_DUMP_H_
7 
8 #include "config.h"
9 
10 #include <stdio.h>
11 #include <string.h>
12 #include <stdlib.h>
13 #include <ctype.h>
14 #ifdef HAVE_UNISTD_H
15 # include <unistd.h>
16 #endif /* HAVE_UNISTD_H */
17 
18 #define public extern
19 #define private static
20 
21 typedef char * string;
22 typedef unsigned char byte;
23 
24 #define YES 1
25 #define NO  0
26 
27 #define NULL_VER -1
28 
29 /*
30  * Global
31  */
32 
33 public int aflag;
34 public int gflag;
35 public int iflag;
36 public int lflag;
37 public int mflag;
38 public int pflag;
39 public int uflag;
40 
41 /*
42  * pgpdump.c
43  */
44 
45 public void warning(const string, ...);
46 public void warn_exit(const string, ...);
47 public void skip(int);
48 public void dump(int);
49 public void pdump(int);
50 public void kdump(int);
51 public void gdump(int);
52 
53 /*
54  * buffer.c
55  */
56 
57 public void Compressed_Data_Packet(int);
58 
59 public void set_armor(void);
60 public void set_binary(void);
61 
62 public int Getc(void);
63 public int Getc1(void);
64 public int Getc_getlen(void);
65 public void Getc_resetlen(void);
66 
67 /*
68  *  packet.c
69  */
70 
71 public void parse_packet(void);
72 public void parse_signature_subpacket(string, int);
73 public void parse_userattr_subpacket(string, int);
74 
75 /*
76  * types.c
77  */
78 
79 public void pub_algs(unsigned int);
80 public void sym_algs(unsigned int);
81 public void sym_algs2(unsigned int);
82 public int  iv_len(unsigned int);
83 public void comp_algs(unsigned int);
84 public void hash_algs(unsigned int);
85 public void key_id(void);
86 public void fingerprint(void);
87 public void time4(string);
88 public void sig_creation_time4(string);
89 public void sig_expiration_time4(string);
90 public void key_creation_time4(string);
91 public void key_expiration_time4(string);
92 public void ver(int, int, int);
93 public int string_to_key(void);
94 public void multi_precision_integer(string);
95 
96 /*
97  * tagfunc.c
98  */
99 public void Reserved(int);
100 public void Public_Key_Encrypted_Session_Key_Packet(int);
101 public void Symmetric_Key_Encrypted_Session_Key_Packet(int);
102 public void Symmetrically_Encrypted_Data_Packet(int);
103 public void Marker_Packet(int);
104 public void Literal_Data_Packet(int);
105 public void Trust_Packet(int);
106 public void User_ID_Packet(int);
107 public void User_Attribute_Packet(int);
108 public void Symmetrically_Encrypted_and_MDC_Packet(int);
109 public void Modification_Detection_Code_Packet(int);
110 public void Private_Packet(int);
111 
112 /*
113  * keys.c
114  */
115 
116 public void Public_Key_Packet(int);
117 public void Public_Subkey_Packet(int);
118 public void Secret_Key_Packet(int);
119 public void Secret_Subkey_Packet(int);
120 
121 /*
122  * signature.c
123  */
124 
125 public void One_Pass_Signature_Packet(int);
126 public void Signature_Packet(int);
127 
128 /*
129  * subfunc.c
130  */
131 
132 public void signature_creation_time(int);
133 public void signature_expiration_time(int);
134 public void exportable_certification(int);
135 public void trust_signature(int);
136 public void regular_expression(int);
137 public void revocable(int);
138 public void key_expiration_time(int);
139 public void additional_decryption_key(int);
140 public void preferred_symmetric_algorithms(int);
141 public void revocation_key(int);
142 public void issuer_key_ID(int);
143 public void notation_data(int);
144 public void preferred_hash_algorithms(int);
145 public void preferred_compression_algorithms(int);
146 public void key_server_preferences(int);
147 public void preferred_key_server(int);
148 public void primary_user_id(int);
149 public void policy_URL(int);
150 public void key_flags(int);
151 public void signer_user_id(int);
152 public void reason_for_revocation(int);
153 public void features(int);
154 public void signature_target(int);
155 public void embedded_signature(int);
156 public void issuer_fingerprint(int);
157 
158 /*
159  * uatfunc.c
160  */
161 
162 public void image_attribute(int);
163 
164 #endif /* _PGP_DUMP_H_ */
165 
166 /*
167  * Copyright (C) 1998 Kazuhiko Yamamoto
168  * All rights reserved.
169  *
170  * Redistribution and use in source and binary forms, with or without
171  * modification, are permitted provided that the following conditions
172  * are met:
173  *
174  * 1. Redistributions of source code must retain the above copyright
175  *    notice, this list of conditions and the following disclaimer.
176  * 2. Redistributions in binary form must reproduce the above copyright
177  *    notice, this list of conditions and the following disclaimer in the
178  *    documentation and/or other materials provided with the distribution.
179  * 3. Neither the name of the author nor the names of its contributors
180  *    may be used to endorse or promote products derived from this software
181  *    without specific prior written permission.
182  *
183  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
184  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
185  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
186  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
187  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
188  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
189  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
190  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
191  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
192  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
193  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
194  */
195