Mocana nanoSSL Certificate API#

NetSecure_CA_CertIntall()#

Description#

Installs the certificate authority's certificate.

Files#

net_secure_mocana.h/net_secure_mocana.c

Prototype#

CPU_BOOLEAN  NetSecure_CA_CertIntall (const  void                 *p_ca_cert,
                                             CPU_INT32U            ca_cert_len,
                                             NET_SECURE_CERT_FMT   fmt,
                                             RTOS_ERR             *p_err)

Arguments#

p_ca_cert

Pointer to CA certificate.

ca_cert_len

Certificate length.

fmt

Certificate format:

  • NET_SOCK_SECURE_CERT_KEY_FMT_PEM

  • NET_SOCK_SECURE_CERT_KEY_FMT_DER

p_err

Pointer to variable that will receive the return error code from this function :

  • RTOS_ERR_NONE

  • RTOS_ERR_FAIL

  • RTOS_ERR_INVALID_TYPE

Returned Value#

  • DEF_OK, if certificate was installed successfully.

  • DEF_FAIL, otherwise.

Notes / Warnings#

None.

NetSecure_Log()#

Description#

Logs the given string.

Files#

net_secure_mocana.h/net_secure_mocana.c

Prototype#

void  NetSecure_Log (CPU_CHAR  *p_str)

Arguments#

p_str

Pointer to string to log.

Returned Value#

None.

Notes / Warnings#

None.