00001 00009 #ifndef __BasicConstraints_H__ 00010 #define __BasicConstraints_H__ 00011 00012 #if _MSC_VER > 1000 00013 #pragma once 00014 #endif // _MSC_VER > 1000 00015 00016 00017 #include "PKIFdll.h" 00018 #define CAC_API_FACTORY 00019 00020 #include "X509Extension.h" 00021 00022 #include <iosfwd> 00023 00024 // forward declaration 00025 struct CPKIFBasicConstraintsImpl; 00026 00027 00046 class CAC_API CPKIFBasicConstraints : public CPKIFX509Extension 00047 { 00048 public: 00049 CPKIFBasicConstraints(); 00050 //CPKIFBasicConstraints(const CACX509V3Extension& ext); 00051 CPKIFBasicConstraints(const bool& criticality, const CPKIFBufferPtr& ext); 00052 virtual ~CPKIFBasicConstraints(); 00057 static char extOID[]; 00058 00059 const CPKIFOIDPtr oid() const; 00060 bool isCA() const; 00061 int pathLength() const; 00062 bool pathLengthPresent() const; 00063 CPKIFBufferPtr value() const; 00064 00065 void SetIsCA(bool b); 00066 void SetPathLength(int pl); 00067 00068 private: 00069 CPKIFBasicConstraints(const CPKIFBasicConstraints& ext); 00070 CPKIFBasicConstraints& operator=(const CPKIFBasicConstraints& rhs); //added 4/6/2004 00071 00072 struct CPKIFBasicConstraintsImpl *m_impl; 00073 }; 00074 DECLARE_SMART_POINTERS(CPKIFBasicConstraints); 00075 00076 00077 CAC_API std::ostream& operator<<(std::ostream & os, const CPKIFBasicConstraintsPtr & extension); 00078 CAC_API std::ostream& operator<<(std::ostream & os, const CPKIFBasicConstraints & extension); 00079 00080 #endif