#ifndef PKI_EXT_H_INCLUDED
#define PKI_EXT_H_INCLUDED

#include "pki/iext.h"
#include "../common/common.h"
#include "pki.h"
#include "oid.h"

class Extension : public IExtension {
public:
	Extension();
	~Extension();
	Extension(Handle<IOID> oid, Handle<std::string> value);

	bool getCritical();
	void setCritical(bool critical);
	Handle<IOID> getTypeId();
	void setTypeId(Handle<IOID> oid);
	void setTypeId(std::string oid);

	Handle<IOID> getOID();
	unsigned long getKeyUsage();
	std::vector<std::string> getVectExtKeyUsage();
	std::string getStrValue();
	long long getIntValue();
private:
	OID m_oid;
	BOOL m_bIsCritical;
	DWORD m_dwFlagsUsage;	//for keyUsage
	std::vector<std::string> m_vectbExtKeyUsage;	//for extKeyUsage
	std::string strValue;
	long long intValue;
};

#endif //!PKI_EXT_H_INCLUDED
