Derzeit unterstützt Indy nur OpenSSL 1.0.2 und mehrere Kunden haben uns nach Unterstützung für OpenSSL 1.1 gefragt. OpenSSL 1.0.2 ist aktuell noch nutzbar, weil es TLS 1.2 unterstützt – die Standard-Protokollversion. Allerdings wird das OpenSSL-Team den Support für die 1.0-API Ende dieses Jahres einstellen: keine Updates und keine Fixes mehr für diese Bibliotheken – das sind schlechte Nachrichten für die Indy-Bibliothek.
Nach viel interner Arbeit haben wir eine neue Version der sgcWebSockets-Bibliothek mit Unterstützung für die OpenSSL-1.1-API veröffentlicht.
unterstützt ab sgcWebSockets 4.3.2
Aktuell gibt es also 2 Versionen:
- Default-Version: identisch zu früheren Versionen und setzt voraus, dass Indy in deiner IDE installiert ist.
- Indy-Version: eine angepasste Indy-Version mit Unterstützung für die OpenSSL-1.1-API, die keine installierte Indy-Bibliothek voraussetzt. Die Indy-Dateien wurden umbenannt, sodass du deine eigene Indy-Bibliothek behalten kannst, während sgcWebSockets mit unseren angepassten Indy-Quellen kompiliert wird.
Um OpenSSL 1.1 zu aktivieren, öffne einfach OpenSSL_Options und wähle die gewünschte API: oslAPI_1_0 oder oslAPI_1_1. Beispiel für den Client:
oClient := TsgcWebSocketClient.Create(nil); oClient.Host := '127.0.0.1'; oclient.Port := 443; oClient.TLS := True; oClient.TLSOptions.OpenSSL_Options.APIVersion := oslAPI_1_1; oClient.Active := True;
Anschließend kannst du deine OpenSSL-1.1-Bibliotheken anstelle des von Indy standardmäßig verwendeten OpenSSL 1.0.2 ausliefern. Je nach Betriebssystem musst du openSSL-Bibliotheken mitliefern oder nicht.
| Plattform | API 1.0 | API 1.1 | Statisches / dynamisches Linken |
| Windows (32-Bit und 64-Bit) | libeay32.dll and ssleay32.dll | libcrypto-1_1.dll and libssl-1_1.dll | Dynamisch |
| OSX | libcrypto.dylib, libssl.dylib | libcrypto.1.1.dylib, libssl.1.1.dylib | Dynamisch |
| iOS-Gerät (32-Bit und 64-Bit) | libcrypto.a and libssl.a | libcrypto.a and libssl.a | Statisch |
| iOS-Simulator | libcrypto.dylib, libssl.dylib | libcrypto.1.1.dylib, libssl.1.1.dylib | Dynamisch |
| Android-Gerät | libcrypto.so, libssl.so | libcrypto.so, libssl.so | Dynamisch |
