yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | #ifndef __CERT_VERIFY_H__ |
| 2 | #define __CERT_VERIFY_H__ |
| 3 | |
| 4 | #include "kal_public_defs.h" |
| 5 | #include "custom_sec_key.h" |
| 6 | #include "kal_public_api.h" |
| 7 | #include "kal_general_types.h" |
| 8 | #include "x509.h" |
| 9 | #include "dhl_trace.h" |
| 10 | |
| 11 | extern const CUST_SEC_CERT_ST g_ROOT_CERT; |
| 12 | |
| 13 | kal_uint8 *CertChain_Get_RCert(TYPE_CUST_CHL_RCERT CERT_ID, kal_uint32 *root_cert_len); |
| 14 | |
| 15 | int Convert_Cert(kal_uint8 *BinaryCert, X509_CTX **FormatCert, int der_len, int *x509_len, kal_bool isPEM); |
| 16 | |
| 17 | int CertChain_Verify_SubCert(X509_CTX *ParentCert_X509, X509_CTX *SubCert_X509, kal_uint32 parent_len, kal_uint32 sub_len); |
| 18 | |
| 19 | int CertChain_Verify_Data(X509_CTX *SubCert_X509, kal_uint8 * data, kal_uint32 data_len, kal_uint8 * signature, kal_uint32 signature_len, kal_uint32 sig_type); |
| 20 | |
| 21 | #endif |