diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-30 16:42:58 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-30 16:42:58 +0200 |
commit | f0d14229706eca615198c888bd8d3b95b663cfb4 (patch) | |
tree | dfcb7fb092091b69a80b3b362adf862f80ba1ba0 /src/mbedTLS++/X509Cert.cpp | |
parent | Initial zombies (diff) | |
parent | Merge pull request #3969 from peterbell10/cuboid (diff) | |
download | cuberite-f0d14229706eca615198c888bd8d3b95b663cfb4.tar cuberite-f0d14229706eca615198c888bd8d3b95b663cfb4.tar.gz cuberite-f0d14229706eca615198c888bd8d3b95b663cfb4.tar.bz2 cuberite-f0d14229706eca615198c888bd8d3b95b663cfb4.tar.lz cuberite-f0d14229706eca615198c888bd8d3b95b663cfb4.tar.xz cuberite-f0d14229706eca615198c888bd8d3b95b663cfb4.tar.zst cuberite-f0d14229706eca615198c888bd8d3b95b663cfb4.zip |
Diffstat (limited to 'src/mbedTLS++/X509Cert.cpp')
-rw-r--r-- | src/mbedTLS++/X509Cert.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/mbedTLS++/X509Cert.cpp b/src/mbedTLS++/X509Cert.cpp new file mode 100644 index 000000000..1e51dd2b7 --- /dev/null +++ b/src/mbedTLS++/X509Cert.cpp @@ -0,0 +1,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); +} + + + + |