22#ifndef FREERDP_LIB_X509_UTILS_H 
   23#define FREERDP_LIB_X509_UTILS_H 
   25#include <winpr/custom-crypto.h> 
   27#include <openssl/x509.h> 
   29#include <freerdp/api.h> 
   36  FREERDP_LOCAL WINPR_MD_TYPE x509_utils_get_signature_alg(
const X509* xcert);
 
   37  FREERDP_LOCAL BYTE* x509_utils_get_hash(
const X509* xcert, 
const char* hash, 
size_t* length);
 
   39  FREERDP_LOCAL BYTE* x509_utils_to_pem(
const X509* xcert, 
const STACK_OF(X509) * chain,
 
   41  FREERDP_LOCAL X509* x509_utils_from_pem(
const char* data, 
size_t length, BOOL fromFile);
 
   43  FREERDP_LOCAL 
char* x509_utils_get_subject(
const X509* xcert);
 
   44  FREERDP_LOCAL 
char* x509_utils_get_issuer(
const X509* xcert);
 
   45  FREERDP_LOCAL 
char* x509_utils_get_email(
const X509* x509);
 
   46  FREERDP_LOCAL 
char* x509_utils_get_upn(
const X509* x509);
 
   47  FREERDP_LOCAL 
char* x509_utils_get_date(
const X509* x509, BOOL startDate);
 
   49  FREERDP_LOCAL 
char* x509_utils_get_common_name(
const X509* xcert, 
size_t* plength);
 
   50  FREERDP_LOCAL 
char** x509_utils_get_dns_names(
const X509* xcert, 
size_t* count,
 
   53  FREERDP_LOCAL 
void x509_utils_dns_names_free(
size_t count, 
size_t* lengths, 
char** dns_names);
 
   55  FREERDP_LOCAL BOOL x509_utils_check_eku(
const X509* scert, 
int nid);
 
   56  FREERDP_LOCAL 
void x509_utils_print_info(
const X509* xcert);
 
   58  FREERDP_LOCAL BOOL x509_utils_verify(X509* xcert, STACK_OF(X509) * chain,
 
   59                                       const char* certificate_store_path);