]> git.saurik.com Git - apple/security.git/blob - OSX/include/security_cdsa_utils/cuPrintCert.h
Security-57336.1.9.tar.gz
[apple/security.git] / OSX / include / security_cdsa_utils / cuPrintCert.h
1 /*
2 * Copyright (c) 2002,2011,2014 Apple Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License.
7 * Please obtain a copy of the License at http://www.apple.com/publicsource
8 * and read it before using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
12 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
13 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
15 * Please see the License for the specific language governing rights
16 * and limitations under the License.
17 */
18
19 /*
20 * cuPrintCert.h - text-based cert/CRL parser using CL
21 */
22
23 #ifndef _PRINT_CERT_H_
24 #define _PRINT_CERT_H_
25
26 #include <Security/cssmtype.h>
27 #include <security_cdsa_utils/cuOidParser.h>
28 #include <Security/x509defs.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /* print one field */
35 void printCertField(
36 const CSSM_FIELD &field,
37 OidParser &parser,
38 CSSM_BOOL verbose);
39
40 /* parse cert & print it */
41 int printCert(
42 const unsigned char *certData,
43 unsigned certLen,
44 CSSM_BOOL verbose);
45
46 /* print parsed CRL */
47 void printCrlFields(
48 const CSSM_X509_SIGNED_CRL *signedCrl,
49 OidParser &parser);
50
51 /* parse CRL & print it */
52 int printCrl(
53 const unsigned char *crlData,
54 unsigned crlLen,
55 CSSM_BOOL verbose);
56
57
58 void printCertShutdown();
59
60 #ifdef __cplusplus
61 }
62 #endif
63
64 #endif /* _PRINT_CERT_H_ */