var
...
icm: TIdCookieManager;
You don't really need to create a
TIdCookieManager manually in most situations, unless you want to share a single
TIdCookieManager amongst multiple
TIdHTTPs. Otherwise,
TIdHTTP will create a
TIdCookieManager internally for itself as long as its
AllowCookies property is true.
ihssl.SSLOptions.Method := sslvSSLv23;
ihssl.SSLOptions.SSLVersions := [sslvSSLv23];
Don't do this. The
Method and
SSLVersions properties are mutually exclusive, setting one updates the other. But
Method is deprecated, use only
SSLVersions. But don't set
SSLVersions to
sslvSSLv23, as that will enable every SSL/TLS version supported, from SSL v2.0 up to TLS v1.2. Never enable the SSL's, as they are no longer secure and nobody uses them anymore. Only enable the TLS's.
ihssl.SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2];
Memo1.Lines.Add(icm.CookieCollection.Cookies[i].CookieText);
The
TIdCookie.CookieText property is deprecated, use the
TIdCookie.ServerCookie property instead.