View Issue Details

IDProjectCategoryView StatusLast Update
0038677FPCPackagespublic2021-04-10 17:58
Reporterbald zhang Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindows, Linux 
Fixed in Version3.3.1 
Summary0038677: fpopenssl: TSSL.PeerName decode error.
DescriptionTSSL.PeerName always return empty string.
TagsNo tags attached.
Fixed in Revision49156
FPCOldBugId
FPCTarget4.0.0
Attached Files

Activities

bald zhang

2021-03-28 17:02

reporter   ~0129952

svn generated patch
fpopenssl.pp.patch (509 bytes)   
Index: fpopenssl.pp
===================================================================
--- fpopenssl.pp	(revision 48827)
+++ fpopenssl.pp	(working copy)
@@ -657,14 +657,16 @@
 begin
   Result:='';
   S:=PeerSubject;
-  P:=Pos(S,'/CN=');
+  P:=Pos('/CN=', S);
   if (P>0) then
     begin
     Delete(S,1,P+3);
     P:=Pos('/',S);
     if (P>0) then
-      Result:=Copy(S,1,P-1);
-    end;
+      Result:=Copy(S,1,P-1)
+    else
+      Result := S;
+    end
 end;
 
 function TSSL.PeerNameHash: cardinal;
fpopenssl.pp.patch (509 bytes)   

Michael Van Canneyt

2021-04-10 08:42

administrator   ~0130214

 Checked & applied. Thank you!

bald zhang

2021-04-10 17:58

reporter   ~0130240

hope it is not too late for 3.2.2 ;)

Issue History

Date Modified Username Field Change
2021-03-28 17:00 bald zhang New Issue
2021-03-28 17:02 bald zhang Note Added: 0129952
2021-03-28 17:02 bald zhang File Added: fpopenssl.pp.patch
2021-04-10 08:42 Michael Van Canneyt Assigned To => Michael Van Canneyt
2021-04-10 08:42 Michael Van Canneyt Status new => resolved
2021-04-10 08:42 Michael Van Canneyt Resolution open => fixed
2021-04-10 08:42 Michael Van Canneyt Fixed in Version => 3.3.1
2021-04-10 08:42 Michael Van Canneyt Fixed in Revision => 49156
2021-04-10 08:42 Michael Van Canneyt FPCTarget => 4.0.0
2021-04-10 08:42 Michael Van Canneyt Note Added: 0130214
2021-04-10 17:58 bald zhang Status resolved => closed
2021-04-10 17:58 bald zhang Note Added: 0130240