Fixes for SSL/TLS support using GNUTLS under MinGW. Use send/recv

rather than read/write in TLS push/pull functions (works with winsock
and unix) and perform mappings between winsock error codes and
unix/gnutls error codes so that we correctly repeat operations whe they
fail in non-blockign mode.
This commit is contained in:
Richard Frith-Macdonald 2021-02-13 11:08:06 +00:00
parent 5c562c546f
commit b45feeb8d7
3 changed files with 70 additions and 11 deletions

View file

@ -1629,8 +1629,8 @@ debugWrite(GSHTTPURLHandle *handle, NSData *data)
if (sslClass == 0)
{
[self backgroundLoadDidFailWithReason:
@"https not supported ... needs SSL bundle"];
[self backgroundLoadDidFailWithReason: @"https not supported"
@" ... needs gnustep-base built with GNUTLS"];
return;
}
sock = [sslClass fileHandleAsClientInBackgroundAtAddress: host
@ -1675,8 +1675,8 @@ debugWrite(GSHTTPURLHandle *handle, NSData *data)
{
if (sslClass == 0)
{
[self backgroundLoadDidFailWithReason:
@"https not supported ... needs SSL bundle"];
[self backgroundLoadDidFailWithReason: @"https not supported"
@" ... needs gnustep-base built with GNUTLS"];
return;
}
host = [request objectForKey: GSHTTPPropertyProxyHostKey];