Cuberite
A lightweight, fast and extensible game server for Minecraft
X509Cert.h
Go to the documentation of this file.
1 
2 // X509Cert.h
3 
4 // Declares the cX509Cert class representing a wrapper over X509 certs in mbedTLS
5 
6 
7 
8 
9 
10 #pragma once
11 
12 #include "mbedtls/x509_crt.h"
13 
14 
15 
16 
17 
18 class cX509Cert
19 {
20  friend class cSslConfig;
21 
22 public:
23  cX509Cert(void);
24  ~cX509Cert(void);
25 
29  int Parse(const void * a_CertContents, size_t a_Size);
30 
31 protected:
32  mbedtls_x509_crt m_Cert;
33 
35  mbedtls_x509_crt * GetInternal(void) { return &m_Cert; }
36 } ;
37 
38 typedef std::shared_ptr<cX509Cert> cX509CertPtr;
39 
40 
41 
42 
std::shared_ptr< cX509Cert > cX509CertPtr
Definition: X509Cert.h:38
mbedtls_x509_crt * GetInternal(void)
Returns the internal cert ptr.
Definition: X509Cert.h:35
mbedtls_x509_crt m_Cert
Definition: X509Cert.h:32
int Parse(const void *a_CertContents, size_t a_Size)
Parses the certificate chain data into the context.
Definition: X509Cert.cpp:31
cX509Cert(void)
Definition: X509Cert.cpp:13
~cX509Cert(void)
Definition: X509Cert.cpp:22