Skip to content

Commit 3ce6e09

Browse files
committed
Ensure that UseSystemRootCertificateStore property only applies to Windows environments
1 parent b902494 commit 3ce6e09

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/IdSSLOpenSSLSocket.pas

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -717,14 +717,12 @@ procedure TIdSSLContext.InitContext(CtxMode: TIdSSLCtxMode);
717717
SSL_CTX_set_default_passwd_cb_userdata(fContext, Self);
718718
// end;
719719

720+
{$IFDEF USE_WINDOWS_CERT_STORE}
720721
if fUseSystemRootCertificateStore then
721-
begin
722-
{$IFDEF USE_WINDOWS_CERT_STORE}
723-
LoadWindowsCertStore;
724-
{$ELSE}
725-
SSL_CTX_set_default_verify_paths(fContext);
726-
{$ENDIF}
727-
end;
722+
LoadWindowsCertStore
723+
else
724+
{$ENDIF}
725+
SSL_CTX_set_default_verify_paths(fContext);
728726
// load key and certificate files
729727
if (RootCertFile <> '') or (VerifyDirs <> '') then begin {Do not Localize}
730728
if not LoadRootCert then begin

0 commit comments

Comments
 (0)