FreeRDP/include/freerdp/utils/certstore.h

44 lines
1.2 KiB
C
Raw Normal View History

2011-08-26 08:20:56 +04:00
#ifndef __CERTSTORE_UTILS_H
#define __CERTSTORE_UTILS_H
typedef struct rdp_cert_store rdpCertStore;
typedef struct rdp_cert_data rdpCertData;
2011-08-26 08:20:56 +04:00
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <freerdp/api.h>
#include <freerdp/freerdp.h>
#include <freerdp/utils/memory.h>
2011-08-29 00:46:36 +04:00
struct rdp_cert_data
2011-08-26 08:20:56 +04:00
{
char* hostname;
char* fingerprint;
2011-08-29 01:54:53 +04:00
};
struct rdp_cert_store
2011-08-26 08:20:56 +04:00
{
FILE* fp;
int match;
2011-08-26 08:20:56 +04:00
char* path;
char* file;
char* home_path;
rdpCertData* certdata;
2011-08-26 08:20:56 +04:00
};
2011-08-29 00:46:36 +04:00
FREERDP_API void certstore_create(rdpCertStore* certstore);
FREERDP_API void certstore_open(rdpCertStore* certstore);
FREERDP_API void certstore_load(rdpCertStore* certstore);
FREERDP_API void certstore_close(rdpCertStore* certstore);
FREERDP_API char* get_local_certloc();
FREERDP_API rdpCertData* certdata_new(char* hostname, char* fingerprint);
FREERDP_API void certdata_free(rdpCertData* certdata);
FREERDP_API void certstore_init(rdpCertStore* certstore);
FREERDP_API rdpCertStore* certstore_new(rdpCertData* certdata, char* home_path);
FREERDP_API void certstore_free(rdpCertStore* certstore);
FREERDP_API int cert_data_match(rdpCertStore* certstore);
FREERDP_API void cert_data_print(rdpCertStore* certstore);
2011-08-29 00:46:36 +04:00
#endif /* __CERTSTORE_UTILS_H */