#ifndef _X509_H
#define _X509_H


#define	BEGIN_CERTIFICATE       "-----BEGIN CERTIFICATE-----"
#define	END_CERTIFICATE       	"-----END CERTIFICATE-----"


#define	FILENAME_SM2_KEY_0			"/app/data/sm2key0.bin"
#define	FILENAME_SM2_KEY_1			"/app/data/sm2key1.bin"
#define	FILENAME_SM2_KEY_2			"/app/data/sm2key2.bin"
#define	FILENAME_SM2_KEY_3			"/app/data/sm2key3.bin"

#define	FILENAME_X509_CER_0			"/app/data/sysm2_0.cer"
#define	FILENAME_X509_CER_1			"/app/data/sysm2_1.cer"
#define	FILENAME_X509_CER_2			"/app/data/sysm2_2.cer"
#define	FILENAME_X509_CER_3			"/app/data/sysm2_3.cer"

#define	FILENAME_X509_CER_TMP_0		"/tmp/sysm2_0.cer"
#define	FILENAME_X509_CER_TMP_1		"/tmp/sysm2_1.cer"
#define	FILENAME_X509_CER_TMP_2		"/tmp/sysm2_2.cer"
#define	FILENAME_X509_CER_TMP_3		"/tmp/sysm2_3.cer"

#define	FILENAME_X509_TIME0			"/app/data/x509_time0"
#define	FILENAME_X509_TIME1			"/app/data/x509_time1"
#define	FILENAME_X509_TIME2			"/app/data/x509_time2"
#define	FILENAME_X509_TIME3			"/app/data/x509_time3"

#define	FILENAME_X509_TMP				"/tmp/sysm2.tmp"
#define	FILENAME_USERID				"/app/data/userid.bin"



void x509_proc(void);

int x509_init(void);
int  x509_show_all(void);

int x509_time_init(void);
int x509_isvalid_time(int no,  uint32_t locat_time);

#endif
