Monday, 30 January 2023
  3 Replies
  570 Visits
  Subscribe
I set files about SSL On TsgcWebSocketServer.

function TfMAIN.RunWSServer( nPort: Integer): Boolean;
begin
Result := True;
if( sgcWebSocketServer.Active = False )then
begin
With sgcWebSocketServer.Bindings.Add do
begin
IP := '127.0.0.1';
Port := 80;
end;
With sgcWebSocketServer.Bindings.Add do
begin
IP := '127.0.0.1';
Port := 443;
end;

sgcWebSocketServer.Port := 80;
sgcWebSocketServer.SSL := true;
sgcWebSocketServer.SSLOptions.CertFile := 'C:\localhost.hpms.kro.kr\certificate.crt';
sgcWebSocketServer.SSLOptions.KeyFile := 'C:\localhost.hpms.kro.kr\private.key';
sgcWebSocketServer.SSLOptions.RootCertFile := 'C:\localhost.hpms.kro.kr\ca_bundle.crt';
sgcWebSocketServer.SSLOptions.Port := 443;

sgcWebSocketServer.Active := True;
end
else
begin
Assert( False, '** 이미 서버.실행중' );
Result := False;
end;
end;


The Protocal Information from TMS Web Core Client on TsgcWebSocketServer.


uMAIN.pas: Line: 1248, ** (+) WSS_SSLALPNSelect
uMAIN.pas: Line: 1252, http/1.1


Error Message On TsgcWebSocketServer.


---------------------------
GExperts Debugger Exception Notification
---------------------------
Project HpmsManager.exe raised exception class EIdOSSLUnderlyingCryptoError with message 'Error accepting connection with SSL.
error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown'.
---------------------------
[&Filter ...] [Ignore &All this Session] [Break] [Additional &Info] [Continue]
---------------------------
ThreadId=8388
ProcessId=11
ThreadName="Scheduler User"
ExceptionMessage="Error accepting connection with SSL.
error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown"
ExceptionName="EIdOSSLUnderlyingCryptoError"
ExceptionDisplayName="EIdOSSLUnderlyingCryptoError"
ExceptionAddress=75E4F192
FileName=<not available>
LineNumber=<not available>
ExceptionObject=08E75A18
Classes=[EIdOSSLUnderlyingCryptoError,EIdOpenSSLAPICryptoError,EIdOpenSSLError,EIdException,Exception,TObject]

---------------------------

Error Message On Work page(client) of TMS Web Core.

JINRYO.js:1 WebSocket connection to 'wss://localhost.hpms.kro.kr/JINRYO/JINRYO.html' failed: