m2m_ssl_api.h

/* M2M_SSL_SERVICE_SESSION: the M2M SSL service session is created by m2m_ssl_create_service_from_file(). Each client app needs it's own SSL service session. */

typedef INT32* M2M_SSL_SERVICE_SESSION;

 

/* M2M_SSL_CONNECTION_CONTEXT: M2M SSL connection context. Shall be created for each and every connection. This context shall be used for encode/decode  the specific connection. */

typedef INT32* M2M_SSL_CONNECTION_CONTEXT;

 

/* M2M_SSL_result_codes */

#define M2M_SSL_SUCCESS                              0          /* success */

#define M2M_SSL_REQUEST_SEND                                1          /* Not used */

#define M2M_SSL_REQUEST_RECV                                2          /* Not used */

 

/* Failure_return_codes MUST be < 0 */

#define M2M_SSL_FAILURE                                            -1         /* Generic failure */

#define M2M_SSL_ARG_FAIL                             -6         /* Failure due to bad function param */

#define M2M_SSL_PLATFORM_FAIL                                -7         /* Not used */

#define M2M_SSL_MEM_FAIL                             -8         /* Not used */

#define M2M_SSL_LIMIT_FAIL                           -9         /* Not used */

#define M2M_SSL_UNSUPPORTED_FAIL              -10       /* Not used */

#define M2M_SSL_PROTOCOL_FAIL                                -12       /* A protocol error occurred */

#define M2M_SSL_TIMEOUT_FAIL                                  -13       /* A timeout occurred and MAY be an error */

#define M2M_SSL_INTERRUPT_FAIL                               -14       /* An interrupt occurred and MAY be an error */

#define M2M_SSL_WRITE_ERROR                      -15       /* An error occured while encoding on socket */

#define M2M_SSL_READ_ERROR                        -16       /* An error occured while decoding from socket */

#define M2M_SSL_END_OF_FILE                        -17       /* Ther's no data to read in SSL */

#define M2M_SSL_CLOSE_NOTIFY                                 -18       /* SSL connection has been closed by remote host */

#define M2M_SSL_CERT_AUTH_FAIL                              -35       /* Authentication fails */

#define M2M_SSL_FULL                                     -50       /* Not used */

#define M2M_SSL_ALERT                                              -54       /* We've decoded an alert */

#define M2M_SSL_FILE_NOT_FOUND                              -55       /* File not found */

 

#define M2M_SSL_FALSE                                              0          /* FALSE */

#define M2M_SSL_TRUE                                    1          /* TRUE */

 

 

/* Public Key types for M2M_SSL_PUBLIC_KEY */

#define M2M_SSL_RSA                                     1          /* Not used */

#define M2M_SSL_ECC                                      2          /* Not used */

#define M2M_SSL_DH                                       3          /* Not used */