ARM Shanghai IoT Team (Internal) / newMiniTLS-GPL

Fork of MiniTLS-GPL by Donatien Garnier

Embed: (wiki syntax)

« Back to documentation index

MiniTLS Class Reference

MiniTLS Class Reference

MiniTLS library. More...

#include <MiniTLS.h>

Public Member Functions

 MiniTLS ()
 Create MiniTLS instance.
void init ()
 Initialize MiniTLS library This function will initialize the Pseudo Random Number Generator and the MiniTLS library.
void feedPRNG (uint8_t *buffer, size_t length)
 Feed the Pseudo Random Number Generator with random seed data.
minitls_err_t addCertificate (const uint8_t *cert, size_t certSize, const uint8_t *pubKey, size_t pubKeySize)
 Add a public certificate The certificate must be x509-formatted The key must be x963-formatted (ECC) or PKCS1-formatted (RSA)

Friends

class TLSSocket

Detailed Description

MiniTLS library.

Definition at line 39 of file MiniTLS.h.


Constructor & Destructor Documentation

MiniTLS (  )

Create MiniTLS instance.

Definition at line 43 of file MiniTLS.cpp.


Member Function Documentation

minitls_err_t addCertificate ( const uint8_t *  cert,
size_t  certSize,
const uint8_t *  pubKey,
size_t  pubKeySize 
)

Add a public certificate The certificate must be x509-formatted The key must be x963-formatted (ECC) or PKCS1-formatted (RSA)

Parameters:
certcertificate
certSizesize of the certificate in bytes
pubKeypublic key (can point within the certificate)
pubKeySizepublic key's size
Returns:
MINITLS_OK on success, MINITLS_ERR_* error code otherwise
Note:
only one certificate supported at the moment

Definition at line 81 of file MiniTLS.cpp.

void feedPRNG ( uint8_t *  buffer,
size_t  length 
)

Feed the Pseudo Random Number Generator with random seed data.

Parameters:
bufferdata to feed
lengththe buffer's length

Definition at line 66 of file MiniTLS.cpp.

void init (  )

Initialize MiniTLS library This function will initialize the Pseudo Random Number Generator and the MiniTLS library.

Definition at line 56 of file MiniTLS.cpp.