PKIFCertificateNodeEntry.h

Go to the documentation of this file.
00001 
00011 #ifndef __PKIFCERTIFICATENODEENTRY_H__
00012 #define __PKIFCERTIFICATENODEENTRY_H__
00013 
00014 #include "PKIFdll.h"
00015 #include "IPKIFPkiArtifact.h"
00016 #include <vector>
00017 
00018 FD_SMART_PTR(CPKIFCertificate);
00019 FD_SMART_PTR(CPKIFX509Extension);
00020 FD_SMART_PTR(CPKIFCertStatus);
00021 
00022 //The CPKIFCertificateNodeEntry and CPKIFCertStatus business is intended to support a style of validation
00023 //processing that is currently not implemented by the library.  Currently, the CPKIFPathValidator::ValidatePath
00024 //function (and functions it calls) will fail upon the first encountered failure.  These pieces could be 
00025 //rewritten such that failure information is collected but not returned until the entire path has been
00026 //fully processed.  CPKIFCertificateNodeEntry and CPKIFCertStatus are intended to support such processing.
00027 //Essentially, all certs in a path are wrapped with a CPKIFCertificateNodeEntry, which includes a CPKIFCertStatus.
00028 //Failure information can be stored, further processing performed, then the list of certs in the path walked
00029 //to determine if processing was successful and if not what the problem was.  This approach permits a finer
00030 //granularity for failure override.
00031 
00049 // forward declaration
00050 struct CPKIFCertificateNodeEntryImpl;
00051 
00052 class CAC_API CPKIFCertificateNodeEntry : public IPKIFPkiArtifact
00053 {
00054 public:
00055     CPKIFCertificateNodeEntry(void);
00056     CPKIFCertificateNodeEntry(CPKIFCertificatePtr& cert);
00057     virtual ~CPKIFCertificateNodeEntry(void);
00058 
00059     //function to get and set the cert wrapped by this node instance
00060     CPKIFCertificatePtr GetCert()const;
00061     void SetCert(const CPKIFCertificatePtr& cert);
00062 
00063     //functions to set, clear and get the ignore flag (used by builder)
00064     void SetIgnore();
00065     void ClearIgnore();
00066     bool GetIgnore() const;
00067 
00068     void SetNameIgnore();
00069     void ClearNameIgnore();
00070 
00071     //hard ignore is now nameIgnore && signatureIgnore && policyIgnore
00072     bool GetHardIgnore() const;
00073 
00074     //functions to flag processed extensions and to return an indication if any critical extensions
00075     //have not been processed
00076     void ClearProcessedExtensions();
00077     void MarkExtensionAsProcessed(CPKIFX509ExtensionPtr& ref);
00078     bool AreThereAnyUnprocessedCriticalExtensions();
00079 
00080     //function to get and set the status class associated with this node
00081     void SetStatus(CPKIFCertStatusPtr& status);
00082     void GetStatus(CPKIFCertStatusPtr& status) const;
00083     CPKIFCertStatusPtr GetStatus() const;
00084 
00085     //convenience function that keys off of the diagnostic code of the underlying status class
00086     bool GetProcessedSuccessfully() const;
00087 
00088     void ClearScore();
00089     void AddToScore(int add);
00090     int GetScore() const;
00091 
00092     PKIInfoSource GetSource() const;
00093     void SetSource(PKIInfoSource source);
00094 
00095     bool operator==(const CPKIFCertificateNodeEntry& rhs) const;
00096 
00097 private:
00099     CPKIFCertificateNodeEntry(const CPKIFCertificateNodeEntry& copy);
00101     CPKIFCertificateNodeEntry& operator=(const CPKIFCertificateNodeEntry& rhs); //added 4/6/2004
00102 
00103     struct CPKIFCertificateNodeEntryImpl *m_impl;
00104 };
00105 DECLARE_SMART_POINTERS(CPKIFCertificateNodeEntry);
00106 typedef std::vector<CPKIFCertificateNodeEntryPtr, PKIFAlloc<CPKIFCertificateNodeEntryPtr> > CPKIFCertificateNodeList;
00107 DECLARE_SMART_POINTERS(CPKIFCertificateNodeList);
00108 
00109 #endif

Generated on Mon Nov 15 11:15:54 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6