From 979665441a5363f46e8b9c518fdb749eb69ec9ea Mon Sep 17 00:00:00 2001 From: geby Date: Sun, 15 May 2022 13:06:53 +0000 Subject: [PATCH] SSL.GetPeerFingerprint - bugfix - result must be ansistring for compatibility with Unicode Delphi. (Result is binary nonprintable string) Need to change it in some SSL plugins too! git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@262 7c85be65-684b-0410-a082-b2ed4fbef004 --- blcksock.pas | 6 +++--- ssl_openssl.pas | 4 ++-- ssl_openssl11.pas | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/blcksock.pas b/blcksock.pas index 51a4e91..b2b2fe5 100644 --- a/blcksock.pas +++ b/blcksock.pas @@ -1338,8 +1338,8 @@ type for fast remote side authentication.} function GetPeerNameHash: cardinal; virtual; - {:Return fingerprint of remote SSL peer.} - function GetPeerFingerprint: string; virtual; + {:Return fingerprint of remote SSL peer. (As binary nonprintable string!)} + function GetPeerFingerprint: AnsiString; virtual; {:Return all detailed information about certificate from remote side of SSL/TLS connection. Result string can be multilined! Each plugin can return @@ -4328,7 +4328,7 @@ begin Result := ''; end; -function TCustomSSL.GetPeerFingerprint: string; +function TCustomSSL.GetPeerFingerprint: AnsiString; begin Result := ''; end; diff --git a/ssl_openssl.pas b/ssl_openssl.pas index 7015851..8fcfcaa 100644 --- a/ssl_openssl.pas +++ b/ssl_openssl.pas @@ -155,7 +155,7 @@ type {:See @inherited} function GetPeerNameHash: cardinal; override; {pf} {:See @inherited} - function GetPeerFingerprint: string; override; + function GetPeerFingerprint: ansistring; override; {:See @inherited} function GetCertInfo: string; override; {:See @inherited} @@ -819,7 +819,7 @@ begin X509Free(cert); end; -function TSSLOpenSSL.GetPeerFingerprint: string; +function TSSLOpenSSL.GetPeerFingerprint: ansistring; var cert: PX509; x: integer; diff --git a/ssl_openssl11.pas b/ssl_openssl11.pas index a8a8145..69e094b 100644 --- a/ssl_openssl11.pas +++ b/ssl_openssl11.pas @@ -142,7 +142,7 @@ type {:See @inherited} function GetPeerNameHash: cardinal; override; {pf} {:See @inherited} - function GetPeerFingerprint: string; override; + function GetPeerFingerprint: ansistring; override; {:See @inherited} function GetCertInfo: string; override; {:See @inherited} @@ -743,7 +743,7 @@ begin X509Free(cert); end; -function TSSLOpenSSL.GetPeerFingerprint: string; +function TSSLOpenSSL.GetPeerFingerprint: ansistring; var cert: PX509; x: integer;