X509Certificate.h

00001 #ifndef _X509_CERTIFICATE
00002 #define _X509_CERTIFICATE
00003 
00004 #include "PivObject.h"
00005 #include "PublicKey.h"
00006 #include "PrivateKey.h"
00007 #include "KeyContainer.h"
00008 
00009 #include <openssl/x509.h>
00010 
00011 class Token;
00012 class Session;
00013 
00018 class X509Certificate : public PivObject
00019 {
00020   public:
00024     virtual ~X509Certificate(void);
00031     X509Certificate(unsigned char* dataToSearch,int dataLen);
00036     X509Certificate(const char* certPath);
00037     
00038     string getOid();
00039     string getIssuer();
00044     string getSerialNumber();
00045     
00050     virtual const char* getDescription() = 0;
00056     virtual CK_OBJECT_CLASS getClass();
00057     
00058     
00059   protected:
00069     X509Certificate(const char* oid,const char* desc,Token* thisToken,Session* session);
00073     static CK_KEY_TYPE CERT_TYPE;
00077     static CK_OBJECT_CLASS CLASS;  
00081     Key* privKey;
00085     X509* myData; 
00093     static int _CKA_ID;
00097     int cka_id; 
00098         
00099   private:
00100     const char* oid;
00106     void addAttributes(X509* myStruct);
00114     static X509* findCert(unsigned char* dataToSearch,unsigned long dataLen);
00118     Key* pubKey;
00124     const char* desc;
00125 
00126 };
00127 #endif
00128 

Generated on Fri Jan 12 15:48:41 2007 for NIST_PKCS11 by doxygen 1.3.1 using KingsTools