git-svn-id: trunk@49156 -
@@ -657,14 +657,16 @@ var
begin
Result:='';
S:=PeerSubject;
- P:=Pos(S,'/CN=');
+ P:=Pos('/CN=', S);
if (P>0) then
Delete(S,1,P+3);
P:=Pos('/',S);
- Result:=Copy(S,1,P-1);
- end;
+ Result:=Copy(S,1,P-1)
+ else
+ Result := S;
+ end
end;
function TSSL.PeerNameHash: cardinal;