![]() |
WE310F5
39.00.000
|
This section describes the M2MB APIs for ssl certificate management. More...
This section describes the M2MB APIs for ssl certificate management.
This module describes about apis to use for ssl certificate store,delete and get info.
#define M2MB_SSL_MAX_CA_LIST 10 |
Macro for maximum number of CA certs
Definition at line 57 of file m2mb_ssl_cert.h.
#define M2MB_SSL_MAX_CERT_NAME_LEN 64 |
Macro for maximum certificate name length
Definition at line 58 of file m2mb_ssl_cert.h.
typedef struct M2MB_SSL_CA_INFO_T M2MB_SSL_CA_INFO_T |
SSL certificate authority list information.
typedef struct M2MB_SSL_CA_LIST_T M2MB_SSL_CA_LIST_T |
SSL certificate authority information for conversion and storage.
typedef enum M2MB_SSL_CERT_FMT_E M2MB_SSL_CERT_FMT_E |
SSL certificate format enum.
typedef struct M2MB_SSL_CERT_LIST_T M2MB_SSL_CERT_LIST_T |
SSL Cert list structure.
typedef struct M2MB_SSL_CERT_T M2MB_SSL_CERT_T |
SSL certificate information for conversion and storage.
typedef enum M2MB_SSL_CERT_TYPE_E M2MB_SSL_CERT_TYPE_E |
SSL certificate type enum.
typedef enum M2MB_SSL_PEMCERT_TYPE_E M2MB_SSL_PEMCERT_TYPE_E |
SSL certificate type enum.
enum M2MB_SSL_CERT_FMT_E |
SSL certificate format enum.
Enumerator | |
---|---|
M2MB_SSL_DER | |
M2MB_SSL_PEM | DER format certificate or key |
Definition at line 80 of file m2mb_ssl_cert.h.
enum M2MB_SSL_CERT_TYPE_E |
SSL certificate type enum.
Enumerator | |
---|---|
M2MB_SSL_CACERT | root CA certificate to authenticate the server |
M2MB_SSL_CERT | client certificate in case of client authentication |
Definition at line 61 of file m2mb_ssl_cert.h.
SSL certificate type enum.
Definition at line 69 of file m2mb_ssl_cert.h.
M2MB_STATUS_T m2mb_ssl_cert_delete | ( | M2MB_SSL_CERT_TYPE_E | sslCertType, |
CHAR * | name | ||
) |
Delete certificates.
Delete CA list or client certificate and key or PSK table depending on first parameter(SSL cert type)
[in] | sslCertType | Specifies the type of certificate to be deleted |
[in] | name | Specifies name of the SSL certificate to be deleted |
Example
INT32 m2mb_ssl_cert_get | ( | M2MB_SSL_CERT_TYPE_E | sslCertType, |
M2MB_SSL_CERT_LIST_T * | sslCertList | ||
) |
It gets the list of the certificates stored.
This command is used to get the list of the certificates.
[in] | sslCertType | |
[in] | sslCertList |
Example
M2MB_STATUS_T m2mb_ssl_cert_search | ( | M2MB_SSL_CERT_TYPE_E | sslCertType, |
CHAR * | certName | ||
) |
Search for the given certificate in the system.
This command is used to find the certificate from the list of the certificates stored in the system.
[in] | sslCertType | |
[in] | certName |
Example
M2MB_STATUS_T m2mb_ssl_cert_store | ( | M2MB_SSL_CERT_TYPE_E | sslCertType, |
M2MB_SSL_SEC_INFO_U | sslSecInfo, | ||
CHAR * | name, | ||
M2MB_SSL_CERT_FMT_E | format | ||
) |
Store certificates from buffer.
Store CA list or client certificate and key or PSK table depending on the first parameter(SSL cert type)
[in] | sslCertType | Specifies the SSL certificate type |
[in] | sslSecInfo | Specifies the SSL certificate(CA list or client certificate and key or PSK table depending on first parameter) |
[in] | name | Specifies name of the SSL certificate |
[in] | format | Specifies the ssl certificate format |
Example