FreeRDP
crypto/certificate.c File Reference
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <winpr/crypto.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/path.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>
#include <freerdp/log.h>
#include <freerdp/crypto/certificate.h>

Macros

#define TAG   FREERDP_TAG("crypto")
 

Functions

static BOOL certificate_split_line (char *line, char **host, UINT16 *port, char **subject, char **issuer, char **fingerprint)
 
static BOOL certificate_line_is_comment (const char *line, size_t length)
 
BOOL certificate_store_init (rdpCertificateStore *certificate_store)
 
static int certificate_data_match_legacy (rdpCertificateStore *certificate_store, rdpCertificateData *certificate_data)
 
static int certificate_data_match_raw (rdpCertificateStore *certificate_store, rdpCertificateData *certificate_data, char **psubject, char **pissuer, char **fprint)
 
BOOL certificate_get_stored_data (rdpCertificateStore *certificate_store, rdpCertificateData *certificate_data, char **subject, char **issuer, char **fingerprint)
 
int certificate_data_match (rdpCertificateStore *certificate_store, rdpCertificateData *certificate_data)
 
BOOL certificate_data_replace (rdpCertificateStore *certificate_store, rdpCertificateData *certificate_data)
 
BOOL certificate_data_print (rdpCertificateStore *certificate_store, rdpCertificateData *certificate_data)
 
rdpCertificateData * certificate_data_new (const char *hostname, UINT16 port, const char *subject, const char *issuer, const char *fingerprint)
 
void certificate_data_free (rdpCertificateData *certificate_data)
 
rdpCertificateStore * certificate_store_new (rdpSettings *settings)
 
void certificate_store_free (rdpCertificateStore *certstore)
 

Variables

static const char certificate_store_dir [] = "certs"
 
static const char certificate_server_dir [] = "server"
 
static const char certificate_known_hosts_file [] = "known_hosts2"
 
static const char certificate_legacy_hosts_file [] = "known_hosts"
 

Macro Definition Documentation

#define TAG   FREERDP_TAG("crypto")

Function Documentation

void certificate_data_free ( rdpCertificateData *  certificate_data)

Here is the caller graph for this function:

int certificate_data_match ( rdpCertificateStore *  certificate_store,
rdpCertificateData *  certificate_data 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static int certificate_data_match_legacy ( rdpCertificateStore *  certificate_store,
rdpCertificateData *  certificate_data 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int certificate_data_match_raw ( rdpCertificateStore *  certificate_store,
rdpCertificateData *  certificate_data,
char **  psubject,
char **  pissuer,
char **  fprint 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

rdpCertificateData* certificate_data_new ( const char *  hostname,
UINT16  port,
const char *  subject,
const char *  issuer,
const char *  fingerprint 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL certificate_data_print ( rdpCertificateStore *  certificate_store,
rdpCertificateData *  certificate_data 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL certificate_data_replace ( rdpCertificateStore *  certificate_store,
rdpCertificateData *  certificate_data 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL certificate_get_stored_data ( rdpCertificateStore *  certificate_store,
rdpCertificateData *  certificate_data,
char **  subject,
char **  issuer,
char **  fingerprint 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL certificate_line_is_comment ( const char *  line,
size_t  length 
)
static

Here is the caller graph for this function:

BOOL certificate_split_line ( char *  line,
char **  host,
UINT16 port,
char **  subject,
char **  issuer,
char **  fingerprint 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void certificate_store_free ( rdpCertificateStore *  certstore)

Here is the caller graph for this function:

BOOL certificate_store_init ( rdpCertificateStore *  certificate_store)

Here is the call graph for this function:

Here is the caller graph for this function:

rdpCertificateStore* certificate_store_new ( rdpSettings *  settings)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const char certificate_known_hosts_file[] = "known_hosts2"
static
const char certificate_legacy_hosts_file[] = "known_hosts"
static
const char certificate_server_dir[] = "server"
static
const char certificate_store_dir[] = "certs"
static

FreeRDP: A Remote Desktop Protocol Implementation Certificate Handling

Copyright 2011 Jiten Pathy Copyright 2011-2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.