FreeRDP
Loading...
Searching...
No Matches
cert_common.h
1
21#ifndef FREERDP_LIB_CORE_CERT_COMMON_H
22#define FREERDP_LIB_CORE_CERT_COMMON_H
23
24#include <freerdp/crypto/ber.h>
25#include <freerdp/crypto/crypto.h>
26
27#include <freerdp/settings.h>
28#include <freerdp/log.h>
29#include <freerdp/api.h>
30
31#include "opensslcompat.h"
32
33#ifdef __cplusplus
34extern "C"
35{
36#endif
37
38 FREERDP_LOCAL BOOL cert_info_create(rdpCertInfo* dst, const BIGNUM* rsa, const BIGNUM* rsa_e);
39 FREERDP_LOCAL void cert_info_free(rdpCertInfo* info);
40
41 FREERDP_LOCAL BOOL cert_info_clone(rdpCertInfo* dst, const rdpCertInfo* src);
42 FREERDP_LOCAL BOOL cert_info_read_modulus(rdpCertInfo* info, size_t size, wStream* s);
43 FREERDP_LOCAL BOOL cert_info_read_exponent(rdpCertInfo* info, size_t size, wStream* s);
44
45 FREERDP_LOCAL BOOL read_bignum(BYTE** dst, DWORD* length, const BIGNUM* num, BOOL alloc);
46
47#if !defined(OPENSSL_VERSION_MAJOR) || (OPENSSL_VERSION_MAJOR < 3)
48 FREERDP_LOCAL X509* x509_from_rsa(const RSA* rsa);
49#endif
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif /* FREERDP_LIB_CORE_CERT_COMMON_H */