blob: 8438a44b0f3997b2b26766fc7c6d6f20abf6936a [file] [log] [blame]
#ifndef __CERT_VERIFY_H__
#define __CERT_VERIFY_H__
#include "kal_public_defs.h"
#include "custom_sec_key.h"
#include "kal_public_api.h"
#include "kal_general_types.h"
#include "x509.h"
#include "dhl_trace.h"
extern const CUST_SEC_CERT_ST g_ROOT_CERT;
kal_uint8 *CertChain_Get_RCert(TYPE_CUST_CHL_RCERT CERT_ID, kal_uint32 *root_cert_len);
int Convert_Cert(kal_uint8 *BinaryCert, X509_CTX **FormatCert, int der_len, int *x509_len, kal_bool isPEM);
int CertChain_Verify_SubCert(X509_CTX *ParentCert_X509, X509_CTX *SubCert_X509, kal_uint32 parent_len, kal_uint32 sub_len);
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);
#endif