ReactOS 0.4.16-dev-2284-g3529151
CCert Class Reference

#include <CCert.hpp>

Collaboration diagram for CCert:

Public Member Functions

 CCert (_In_ PCCERT_CONTEXT certContext)
 
 ~CCert ()
 
const CAtlStringW & GetSubjectName () const
 
const CAtlStringW & GetIssuerName () const
 
FILETIME GetNotAfter () const
 
const CAtlStringW & GetFriendlyName () const
 
const PCCERT_CONTEXT GetCertContext () const
 
void Init ()
 

Private Member Functions

void GetNameString (DWORD dwFlags, CAtlStringW &out)
 

Private Attributes

PCCERT_CONTEXT m_CertContext = NULL
 
CAtlStringW m_SubjectName
 
CAtlStringW m_IssuerName
 
CAtlStringW m_FriendlyName
 

Detailed Description

Definition at line 8 of file CCert.hpp.

Constructor & Destructor Documentation

◆ CCert()

CCert::CCert ( _In_ PCCERT_CONTEXT  certContext)
inlineexplicit

Definition at line 29 of file CCert.hpp.

30 {
32 Init();
33 }
void Init()
Definition: CCert.hpp:73
PCCERT_CONTEXT m_CertContext
Definition: CCert.hpp:11
PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(PCCERT_CONTEXT pCertContext)
Definition: cert.c:360

◆ ~CCert()

CCert::~CCert ( )
inline

Definition at line 34 of file CCert.hpp.

35 {
36 if (m_CertContext)
37 {
39 }
40 }
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
Definition: cert.c:371

Member Function Documentation

◆ GetCertContext()

const PCCERT_CONTEXT CCert::GetCertContext ( ) const
inline

Definition at line 67 of file CCert.hpp.

68 {
69 return m_CertContext;
70 }

◆ GetFriendlyName()

const CAtlStringW & CCert::GetFriendlyName ( ) const
inline

Definition at line 61 of file CCert.hpp.

62 {
63 return m_FriendlyName;
64 }
CAtlStringW m_FriendlyName
Definition: CCert.hpp:14

◆ GetIssuerName()

const CAtlStringW & CCert::GetIssuerName ( ) const
inline

Definition at line 49 of file CCert.hpp.

50 {
51 return m_IssuerName;
52 }
CAtlStringW m_IssuerName
Definition: CCert.hpp:13

◆ GetNameString()

void CCert::GetNameString ( DWORD  dwFlags,
CAtlStringW &  out 
)
inlineprivate

Definition at line 17 of file CCert.hpp.

18 {
20 if (length > 1)
21 {
22 WCHAR *buffer = out.GetBuffer(length);
24 out.ReleaseBuffer();
25 }
26 }
#define NULL
Definition: types.h:112
DWORD WINAPI CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags, void *pvTypePara, LPWSTR pszNameString, DWORD cchNameString)
Definition: str.c:1220
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint buffer
Definition: glext.h:5915
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define CERT_NAME_SIMPLE_DISPLAY_TYPE
Definition: wincrypt.h:3658
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by Init().

◆ GetNotAfter()

FILETIME CCert::GetNotAfter ( ) const
inline

Definition at line 55 of file CCert.hpp.

56 {
58 }
PCERT_INFO pCertInfo
Definition: wincrypt.h:491
FILETIME NotAfter
Definition: wincrypt.h:255

◆ GetSubjectName()

const CAtlStringW & CCert::GetSubjectName ( ) const
inline

Definition at line 43 of file CCert.hpp.

44 {
45 return m_SubjectName;
46 }
CAtlStringW m_SubjectName
Definition: CCert.hpp:12

◆ Init()

void CCert::Init ( )
inline

Definition at line 73 of file CCert.hpp.

74 {
77 DWORD length = 0;
79 {
80 WCHAR *buffer = m_FriendlyName.GetBuffer(length / sizeof(WCHAR));
82 m_FriendlyName.ReleaseBuffer();
83 }
84 }
void GetNameString(DWORD dwFlags, CAtlStringW &out)
Definition: CCert.hpp:17
BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext, DWORD dwPropId, void *pvData, DWORD *pcbData)
Definition: cert.c:551
#define CERT_FRIENDLY_NAME_PROP_ID
Definition: wincrypt.h:2844
#define CERT_NAME_ISSUER_FLAG
Definition: wincrypt.h:3664

Referenced by CCert().

Member Data Documentation

◆ m_CertContext

PCCERT_CONTEXT CCert::m_CertContext = NULL
private

Definition at line 11 of file CCert.hpp.

Referenced by CCert(), GetCertContext(), GetNameString(), GetNotAfter(), Init(), and ~CCert().

◆ m_FriendlyName

CAtlStringW CCert::m_FriendlyName
private

Definition at line 14 of file CCert.hpp.

Referenced by GetFriendlyName(), and Init().

◆ m_IssuerName

CAtlStringW CCert::m_IssuerName
private

Definition at line 13 of file CCert.hpp.

Referenced by GetIssuerName(), and Init().

◆ m_SubjectName

CAtlStringW CCert::m_SubjectName
private

Definition at line 12 of file CCert.hpp.

Referenced by GetSubjectName(), and Init().


The documentation for this class was generated from the following file: