]> git.saurik.com Git - apple/security.git/blob - libsecurity_keychain/libDER/libDERUtils/printFields.h
Security-55163.44.tar.gz
[apple/security.git] / libsecurity_keychain / libDER / libDERUtils / printFields.h
1 /* Copyright (c) 2005-2007 Apple Inc. All Rights Reserved. */
2
3 /*
4 * printFeilds.h - print various DER objects
5 *
6 * Created Nov. 9 2005 by dmitch
7 */
8
9 #ifndef _PRINT_FIELDS_H_
10 #define _PRINT_FIELDS_H_
11
12 #include <libDER/libDER.h>
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 void doIndent();
19 void incrIndent();
20 void decrIndent();
21 void printHex(DERItem *item);
22 void printBitString(DERItem *item);
23 void printString(DERItem *item);
24 void printHeader(const char *label);
25
26 typedef enum {
27 IT_Leaf, // leaf; always print contents
28 IT_Branch // branch; print contents iff verbose
29 } ItemType;
30
31 void printItem(
32 const char *label,
33 ItemType itemType,
34 int verbose,
35 DERTag tag, // maybe from decoding, maybe the real tag underlying
36 // an implicitly tagged item
37 DERItem *item); // content
38
39 void printAlgId(
40 const DERItem *content,
41 int verbose);
42 void printSubjPubKeyInfo(
43 const DERItem *content,
44 int verbose);
45
46 /* decode one item and print it */
47 void decodePrintItem(
48 const char *label,
49 ItemType itemType,
50 int verbose,
51 DERItem *derItem);
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif /* _PRINT_FIELDS_H_ */