Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6gencerts.h
Go to the documentation of this file.
1 
11 #ifndef P6GENCERTS_H__
12 #define P6GENCERTS_H__ 1
13 
14 #include "p6cryptokey.h"
15 #include "p6cert.h"
16 
17 namespace P6R {
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
48 typedef enum
49 {
50  RDN_COUNTRY = 0x00,
51  RDN_STATE = 0x01,
52  RDN_LOCALITY = 0x02,
53  RDN_ORG = 0x03,
54  RDN_ORGUNIT = 0x04,
55  RDN_COMMONNAME = 0x05,
56  RDN_EMAIL = 0x06,
57  RDN_GIVENNAME = 0x07,
58  RDN_SURNAME = 0x08,
59  RDN_NAME = 0x09
60 } P6RDNTYPE;
61 
62 
74 typedef struct
75 {
78 } P6CERTRDN;
79 
93 struct extension
94 {
95  P6CHAR* name; // basicConstraints
96  P6CHAR* value; // CA:TRUE
97 };
98 typedef struct extension P6CERTEXTENSION;
99 typedef struct extension P6CRLEXTENSION;
100 
101 
110 static const P6GENCERTSFLAGS P6GENCERTS_NOFLAGS = 0x00000000;
111 
112 
118 #undef INTERFACE
119 #define INTERFACE p6IGenCerts
121 {
132  P6DECLCOMMETHOD(initialize)(P6THIS_ P6GENCERTSFLAGS flags ) P6PURE;
133 
176  P6DECLCOMMETHOD(genCertificate)(P6THIS_ P6CERTRDN* pDN,
177  P6UINT32 numDN,
178  p6ICryptoKey* pPublicKey,
179  p6ICryptoKey* pPrivateKey,
180  p6ICert* pCACertificate,
181  P6UINT32 secondsToExpire,
182  P6CERTEXTENSION* pExtensionSet,
183  P6UINT32 numExtension,
184  p6ICert** pCertificate ) P6PURE;
185 
202  P6DECLCOMMETHOD(verifyCertificate)(P6THIS_ p6ICert* pCertificate, p6ICert** pCertChain, P6UINT32 numChain, const P6WCHAR* pCrlFile ) P6PURE;
203 
253  P6DECLCOMMETHOD(newCrl)(P6THIS_ P6UINT32 nextInDays,
254  P6UINT32 nextInHours,
255  P6CERTEXTENSION* pExtensionSet,
256  P6UINT32 numExtension,
257  p6ICert* pCACertificate ) P6PURE;
258 
267  P6DECLCOMMETHOD(deleteCrl)(P6THIS) P6PURE;
268 
291  P6DECLCOMMETHOD(revokeCert)(P6THIS_ P6UINT32 serialNumber,
292  P6UINT16 onYear,
293  P6UINT8 onMonth,
294  P6UINT8 onDay,
295  P6UINT8 onHour,
296  P6UINT8 onMinute,
297  P6UINT8 onSecond ) P6PURE;
298 
319  P6DECLCOMMETHOD(genCrlFile)(P6THIS_ const P6WCHAR* pCrlFile, p6ICryptoKey* pCAPrivateKey ) P6PURE;
320 
336  P6DECLCOMMETHOD(printCrl)(P6THIS_ const P6WCHAR* pPrintToFile, const P6WCHAR* pCrlFile ) P6PURE;
337 };
338 
339 // {74B7789C-EA87-4c13-B9F3-345DC1E50345}
340 #define IF_p6IGenCerts {0x74b7789c,0xea87,0x4c13,{0xb9,0xf3,0x34,0x5d,0xc1,0xe5,0x3,0x45}}
341 
342 // {58BA3A0E-EA35-40d6-BD2C-F1592559AF5B}
343 #define COMP_p6GenCerts {0x58ba3a0e,0xea35,0x40d6,{0xbd,0x2c,0xf1,0x59,0x25,0x59,0xaf,0x5b}}
344 
345 
346 #ifdef __cplusplus
347 }
348 #endif
349 
350 } // namespace
351 
352 
353 #endif
This interface provides key metadata infrormation and key access.
Definition: p6cryptokey.h:1198
uint32_t P6UINT32
Definition: p6types.h:77
#define P6PURE
Definition: p6defs.h:192
unsigned char P6UINT8
Definition: p6types.h:71
P6UINT32 P6GENCERTSFLAGS
P6GENCERTFLAGS.
Definition: p6gencerts.h:109
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
P6WCHAR * pValue
Definition: p6gencerts.h:77
This interface provides the capabilities to generate certificates and certificate revocation lists...
Definition: p6gencerts.h:120
A distinguished name (DN) is comprised of one or more relative distinguished names (RDN)...
Definition: p6gencerts.h:74
Interface definition for X509 V3 Certificates.
P6RDNTYPE
Relative Distingushed Name (RDN) components:
Definition: p6gencerts.h:48
P6CHAR * value
Definition: p6gencerts.h:96
This interface allows the caller to access parts of an X509 V3 certificate for use in protocols and i...
Definition: p6cert.h:111
uint16_t P6UINT16
Definition: p6types.h:75
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
#define P6THIS_
Definition: p6defs.h:193
P6CHAR * name
Definition: p6gencerts.h:95
#define P6THIS
Definition: p6defs.h:194
P6RDNTYPE type
Definition: p6gencerts.h:76
char P6CHAR
Narrow character type.
Definition: p6types.h:105
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188
P6R Cryptographic key interface definitions.