summaryrefslogtreecommitdiffstats
path: root/src/mbedTLS++/X509Cert.cpp
blob: 1e51dd2b7a71252a9f1a709ca0c49ab49b1cc333 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

// X509Cert.cpp

// Implements the cX509Cert class representing a wrapper over X509 certs in mbedTLS

#include "Globals.h"
#include "X509Cert.h"





cX509Cert::cX509Cert(void)
{
	mbedtls_x509_crt_init(&m_Cert);
}





cX509Cert::~cX509Cert()
{
	mbedtls_x509_crt_free(&m_Cert);
}





int cX509Cert::Parse(const void * a_CertContents, size_t a_Size)
{
	return mbedtls_x509_crt_parse(&m_Cert, reinterpret_cast<const unsigned char *>(a_CertContents), a_Size);
}