FreeRDP
|
#include <openssl/objects.h>
#include <openssl/x509v3.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <freerdp/config.h>
#include <winpr/crt.h>
#include <winpr/string.h>
#include <winpr/assert.h>
#include <freerdp/log.h>
#include "x509_utils.h"
Macros | |
#define | TAG FREERDP_TAG("crypto") |
#define | GEN_ALL (-1) |
Typedefs | |
typedef int(* | general_name_mapper_pr) (GENERAL_NAME *name, void *data, int index, int count) |
Functions | |
BYTE * | x509_utils_get_hash (const X509 *xcert, const char *hash, size_t *length) |
static char * | crypto_print_name (const X509_NAME *name) |
char * | x509_utils_get_subject (const X509 *xcert) |
static const char * | general_name_type_label (int general_name_type) |
static void | map_subject_alt_name (const X509 *x509, int general_name_type, general_name_mapper_pr mapper, void *data) |
static void | string_list_initialize (string_list *list) |
static void | string_list_allocate (string_list *list, int allocate_count) |
static void | string_list_free (string_list *list) |
static int | extract_string (GENERAL_NAME *name, void *data, int index, int count) |
static void | object_list_initialize (object_list *list) |
static void | object_list_allocate (object_list *list, int allocate_count) |
static char * | object_string (ASN1_TYPE *object) |
static void | object_list_free (object_list *list) |
static int | extract_othername_object_as_string (GENERAL_NAME *name, void *data, int index, int count) |
char * | x509_utils_get_email (const X509 *x509) |
char * | x509_utils_get_upn (const X509 *x509) |
char * | x509_utils_get_date (const X509 *x509, BOOL startDate) |
void | x509_utils_dns_names_free (size_t count, size_t *lengths, char **dns_names) |
char ** | x509_utils_get_dns_names (const X509 *x509, size_t *count, size_t **lengths) |
char * | x509_utils_get_issuer (const X509 *xcert) |
BOOL | x509_utils_check_eku (const X509 *xcert, int nid) |
void | x509_utils_print_info (const X509 *xcert) |
static BYTE * | x509_utils_get_pem (const X509 *xcert, const STACK_OF(X509) *chain, size_t *plength) |
X509 * | x509_utils_from_pem (const char *data, size_t len, BOOL fromFile) |
static WINPR_MD_TYPE | hash_nid_to_winpr (int hash_nid) |
static WINPR_MD_TYPE | get_rsa_pss_digest (const X509_ALGOR *alg) |
WINPR_MD_TYPE | x509_utils_get_signature_alg (const X509 *xcert) |
char * | x509_utils_get_common_name (const X509 *xcert, size_t *plength) |
static int | verify_cb (int ok, X509_STORE_CTX *csc) |
BOOL | x509_utils_verify (X509 *xcert, STACK_OF(X509) *chain, const char *certificate_store_path) |
Variables | |
static const char * | general_name_type_labels [] |
#define GEN_ALL (-1) |
#define TAG FREERDP_TAG("crypto") |
FreeRDP: A Remote Desktop Protocol Implementation Cryptographic Abstraction Layer
Copyright 2011-2012 Marc-Andre Moreau marca Copyright 2023 Armin Novak ndre .more au@g mail. comanova Copyright 2023 Thincast Technologies GmbH k@th incas t.co m
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.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
BOOL x509_utils_check_eku | ( | const X509 * | xcert, |
int | nid | ||
) |
void x509_utils_dns_names_free | ( | size_t | count, |
size_t * | lengths, | ||
char ** | dns_names | ||
) |
X509* x509_utils_from_pem | ( | const char * | data, |
size_t | len, | ||
BOOL | fromFile | ||
) |
char* x509_utils_get_common_name | ( | const X509 * | xcert, |
size_t * | plength | ||
) |
char* x509_utils_get_date | ( | const X509 * | x509, |
BOOL | startDate | ||
) |
char** x509_utils_get_dns_names | ( | const X509 * | x509, |
size_t * | count, | ||
size_t ** | lengths | ||
) |
char* x509_utils_get_email | ( | const X509 * | x509 | ) |
BYTE* x509_utils_get_hash | ( | const X509 * | xcert, |
const char * | hash, | ||
size_t * | length | ||
) |
char* x509_utils_get_issuer | ( | const X509 * | xcert | ) |
|
static |
Don't manage certificates internally, leave it up entirely to the external client implementation
WINPR_MD_TYPE x509_utils_get_signature_alg | ( | const X509 * | xcert | ) |
FreeRDP: A Remote Desktop Protocol Implementation Cryptographic Abstraction Layer
Copyright 2011-2012 Marc-Andre Moreau marca Copyright 2023 Armin Novak ndre .more au@g mail. comanova Copyright 2023 Thincast Technologies GmbH k@th incas t.co m
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.
char* x509_utils_get_subject | ( | const X509 * | xcert | ) |
char* x509_utils_get_upn | ( | const X509 * | x509 | ) |
void x509_utils_print_info | ( | const X509 * | xcert | ) |
BOOL x509_utils_verify | ( | X509 * | xcert, |
STACK_OF(X509) * | chain, | ||
const char * | certificate_store_path | ||
) |
|
static |