AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Umstellung LDAP auf SSL/TLS

Ein Thema von Blup · begonnen am 17. Mai 2024 · letzter Beitrag vom 21. Mai 2024
Antwort Antwort
Seite 2 von 2     12   
rabatscher

Registriert seit: 13. Dez 2007
Ort: Bruck an der Mur
68 Beiträge
 
#11

AW: Umstellung LDAP auf SSL/TLS

  Alt 21. Mai 2024, 13:45
Die Abfrage von LDAP_OPT_SSL liefert LDAP_LOCAL_ERROR.
Ob die Variable als NativeUInt, CARDINAL oder Pointer deklariert ist, spielt keine Rolle, die sind bei mir alle 32Bit.

Ich vermute, TLS is bereits aktiviert und deshalb steht die Option SSL nicht zur Verfügung.
Das bedeutet für mich, die Anleitung von MS ist nicht mehr aktuell oder unvollständig.

Im Quelltext "LDAPAdmin" wird die Option LDAP_OPT_SSL nicht benutzt und LDAP_LOCAL_ERROR an einer Stelle ignoriert:
Delphi-Quellcode:
  if ldapSSL then
    ldappld := ldap_sslinit(PChar(ldapServer), ldapPort,1)
  else
    ldappld := ldap_init(PChar(ldapServer), ldapPort);
  if Assigned(pld) then
  try
    LdapCheck(ldap_set_option(pld,LDAP_OPT_PROTOCOL_VERSION,@ldapVersion));
    if ldapSSL or ldapTLS then
    begin
      res := ldap_set_option(pld, LDAP_OPT_SERVER_CERTIFICATE, @VerifyCert);
      if (res <> LDAP_SUCCESS) and (res <> LDAP_LOCAL_ERROR) then
        LdapCheck(res);
      CertServerName := PChar(ldapServer);
    end;
    CertUserAbort := false;
    if ldapTLS then
    begin
      res := ldap_start_tls_s(ldappld, nil, nil, nil, nil);
      if CertUserAbort then
        Abort;
      LdapCheck(res);
    end;
    case ldapAuthMethod of
Ich versuch diese Variante...

Der Handler SetTLS der LDAPAdmin TLDAPSession Klasse setzt den Wert:

Code:
procedure TLDAPSession.SetTLS(Value: Boolean);
begin
  if Connected and (Value <> ldapTLS) then
  begin
    if Value then
      LdapCheck(ldap_start_tls_s(ldappld, nil, nil, nil, nil))
    else
    if not ldap_stop_tls_s(ldappld) then
    begin
      //MessageDlg(stStopTLSError, mtError, [mbOk], 0);
      Disconnect;
    end;
  end;
  ldapTLS := Value;
end;
So.. bevor das Werkl startet wird die TLS session gestartet. Dann wird natürlich kein ssl init aufgerufen...
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:53 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz