#ifndef CMS_CERTINFO_H_INCLUDED
#define  CMS_CERTINFO_H_INCLUDED

#include "cms/icert_info.h"
#include "common.h"

class CertInfo : public ICertInfo {
public:
    CertInfo();
    CertInfo(PCERT_INFO pinfo, DWORD dwSize);
    ~CertInfo();

    //properties
    long getVersion();
    Handle<std::string> getSerialNumber();
    Handle<std::string> getNotBefore();
    Handle<std::string> getNotAfter();
    Handle<std::string> getIssuerFriendlyName();
    Handle<std::string> getIssuerName();
    Handle<std::string> getSubjectFriendlyName();
    Handle<std::string> getSubjectName();
    Handle<std::string> getThumbprint();
    Handle<std::string> getPublicKeyAlgorithm();
    Handle<std::string> getSignatureAlgorithm();
    Handle<std::string> getSignatureDigestAlgorithm();
    Handle<std::string> getOrganizationName();
    Handle<std::string> getSubjectKeyIdentifier();

private:
    PCERT_INFO m_pCertInfo;

};

#endif  //!CMS_CERTINFO_H_INCLUDED
