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 15extern "C" { 16#endif 17 18void doIndent(void); 19void incrIndent(void); 20void decrIndent(void); 21void printHex(DERItem *item); 22void printBitString(DERItem *item); 23void printString(DERItem *item); 24void printHeader(const char *label); 25 26typedef enum { 27 IT_Leaf, // leaf; always print contents 28 IT_Branch // branch; print contents iff verbose 29} ItemType; 30 31void 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 39void printAlgId( 40 const DERItem *content, 41 int verbose); 42void printSubjPubKeyInfo( 43 const DERItem *content, 44 int verbose); 45 46/* decode one item and print it */ 47void 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_ */ 58