From 63d00f6f81bced0f42a7ef338d1581194bfa10ff Mon Sep 17 00:00:00 2001 From: "Pascal J. Bourguignon" Date: Mon, 27 Aug 2018 13:51:30 +0200 Subject: [PATCH] Corrected the compatibility function names: crypto_cert_subject_alt_name and crypto_cert_subject_alt_name_free. --- include/freerdp/crypto/crypto.h | 11 ++++++----- libfreerdp/crypto/crypto.c | 9 ++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/freerdp/crypto/crypto.h b/include/freerdp/crypto/crypto.h index 029310c07..c2be8b6e5 100644 --- a/include/freerdp/crypto/crypto.h +++ b/include/freerdp/crypto/crypto.h @@ -65,13 +65,14 @@ FREERDP_API void crypto_cert_print_info(X509* xcert); FREERDP_API void crypto_cert_free(CryptoCert cert); /* -Deprecated function names; use crypto_cert_get_dns_names and crypto_cert_dns_names_free instead. -Kept for now for compatibility of FREERDP_API; -Note: email and upn amongst others are also alt_names; +Deprecated function names: crypto_cert_subject_alt_name and crypto_cert_subject_alt_name_free. +Use crypto_cert_get_dns_names and crypto_cert_dns_names_free instead. +(old names kept for now for compatibility of FREERDP_API). +Note: email and upn amongst others are also alt_names, but the old crypto_cert_get_alt_names returned only the dns_names */ -FREERDP_API char** crypto_cert_get_alt_names(X509* xcert, int* count, int** lengths); -FREERDP_API void crypto_cert_alt_names_free(int count, int* lengths, char** alt_names); +FREERDP_API char** crypto_cert_subject_alt_name(X509* xcert, int* count, int** lengths); +FREERDP_API void crypto_cert_subject_alt_name_free(int count, int *lengths, char** alt_names); FREERDP_API BOOL x509_verify_certificate(CryptoCert cert, char* certificate_store_path); FREERDP_API rdpCertificateData* crypto_get_certificate_data(X509* xcert, char* hostname, diff --git a/libfreerdp/crypto/crypto.c b/libfreerdp/crypto/crypto.c index 1016a5f00..25f0eb72d 100644 --- a/libfreerdp/crypto/crypto.c +++ b/libfreerdp/crypto/crypto.c @@ -674,7 +674,9 @@ char* crypto_cert_get_upn(X509* x509) return result; } -void crypto_cert_alt_names_free(int count, int* lengths, char** alt_names) + +/* Deprecated name.*/ +void crypto_cert_subject_alt_name_free(int count, int *lengths, char** alt_names) { crypto_cert_dns_names_free(count, lengths, alt_names); } @@ -700,9 +702,10 @@ void crypto_cert_dns_names_free(int count, int* lengths, } } -char** crypto_cert_get_alt_names(X509* x509, int* count, int** lengths) +/* Deprecated name.*/ +char** crypto_cert_subject_alt_name(X509* xcert, int* count, int** lengths) { - return crypto_cert_get_dns_names(x509, count, lengths); + return crypto_cert_get_dns_names(xcert, count, lengths); } char** crypto_cert_get_dns_names(X509* x509, int* count, int** lengths)