/*
 * =====================================================================================
 *
 *  Filename:  kg_x509.h
 *
 *  Description:  kg x509 module for certificate verification and parsing
 *
 *  Version:  1.0
 *  Created:  03/17/2020 10:21:00 AM
 *  Revision:  none
 *  Compiler:  gcc
 *
 *  Company:  Samsung Electronics
 *  Copyright (c) 2020 by Samsung Electronics, All rights reserved.
 *
 * =====================================================================================
 */

#ifndef __KG_x509_H__
#define __KG_x509_H__

#include <stdint.h>
#include "kg_openssl.h"
#include "kg_defs.h"
#include "kg_log.h"
#include "tee_internal_api.h"

X509 *parse_pem_cert(char *pem_string, BIO *cert_Bio);
EVP_PKEY *get_public_key(const char *pem_cert);
uint32_t extract_public_keybytes(const char *pem_cert, uint8_t *pub_mod, uint32_t *pub_mod_len, uint8_t *pub_exp, uint32_t *pub_exp_len);

#endif /* __KG_x509_H__ */

