#ifndef _NETOS_CERTS__H
#define _NETOS_CERTS_H

#ifdef __cplusplus
extern "C"
{
#endif

int NaLoadWpaCertificates(void);


/* These defines specify the file system volume (mounted by the    */
/* BSP) and root directory used by the FTP server                  */
#define FS_VOLUME1                  "FLASH0"
#define FS_VOLUME1_DIR              FS_VOLUME1 "/certs/"

/* These defines specify the file name and full path of the CA     */
/* certificate file. Client can this to verify server certificate  */
#define CA_CERTICATE_FILEPATH       FS_VOLUME1_DIR CA_CERTICATE_FILE

/* We support multiple certificates */
#define CA_CERTICATE_FILE           "cacert.pem"
#define CA_CERTICATE_FILE2          "cacert2.pem"
#define CA_CERTICATE_FILE3          "cacert3.pem"

/* These defines specify the file name and full path of the CA     */
/* certificate file. Client can this to verify server certificate  */
#define CA_CERTICATE_FILEPATH       FS_VOLUME1_DIR CA_CERTICATE_FILE
#define CA_CERTICATE_FILEPATH2      FS_VOLUME1_DIR CA_CERTICATE_FILE2
#define CA_CERTICATE_FILEPATH3      FS_VOLUME1_DIR CA_CERTICATE_FILE3

/* These defines specify the file name and full path name of the    */
/* client certificate file. Client sends this to server if server   */
/* asks for it                                                      */
#define CLNT_CERTICATE_FILE         "client_cert.pem"
#define CLNT_CERTICATE_FILEPATH     FS_VOLUME1_DIR CLNT_CERTICATE_FILE

/* These defines specify the file name and full path name of the    */
/* client private key.                                              */
#define CLNT_KEY_FILE               "client_key.pem"
#define CLNT_KEY_FILEPATH           FS_VOLUME1_DIR CLNT_KEY_FILE

/* These defines specify the file name and full path name of the    */
/* password.                                              */
#define PASSWORD_FILE               "password.txt"
#define PASSWORD_FILEPATH           FS_VOLUME1_DIR PASSWORD_FILE

/* These defines specify the maxium size (in bytes) of the buffers */
/* to store the CA certificate and key data                        */
#define MAX_SSL_CERTIFICATE_LEN     8 * 1024
#define MAX_SSL_KEY_LEN             2 * 1024

#define MAX_PASSWORD_LEN            128 

/*ad*
 * This enum defines the possible return values for NaLoadWpaCertificates.
 *
 * @external
 * @category BSP:Device_Drivers:wireless:WPA_Certificates 
 * @since 7.5
 *
 * @param   CERT_SUCCESS      The function completed successfully.
 * @param   CERT_ERR_OPEN     File open error 
 * @param   CERT_ERR_READ     File read error 
 * @param   CERT_ERR_WRITE    File write error 
 * @param   CERT_ERR_MEMORY   Out of memory 
 * @param   CERT_ERR_FORMAT   Bad format or password 
 * @param   CERT_ERR_NO_FS    C Library file system not enabled  
*ad*/
typedef enum {
    CERT_SUCCESS = 0,       
    CERT_ERR_OPEN = -10,    
    CERT_ERR_READ,         
    CERT_ERR_WRITE,         
    CERT_ERR_MEMORY,        
    CERT_ERR_FORMAT,        
    CERT_ERR_NO_FS,         
} NaLoadWpaCertReturnCodes_t;

#ifdef __cplusplus
}
#endif

#endif // _NETOS_CERTS_H

