mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Do no accidentally discard ssl options
This commit is contained in:
parent
b3f5a3440d
commit
169a5036e3
2 changed files with 19 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
2019-09-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSTLS.m: Re-order code to avoid setting session priority
|
||||
twice (avoids bug where server downgrades from TLS1.3 to TLS1.2).
|
||||
twice.
|
||||
* Source/NSFileHandle.m: Fux so that setting certificate information
|
||||
does not discard any other options already set.
|
||||
|
||||
2019-09-16 Alan Jenkins <alan.christopher.jenkins@gmail.com>
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ static Class NSFileHandle_ssl_class = nil;
|
|||
}
|
||||
- (void) sslDisconnect;
|
||||
- (BOOL) sslHandshakeEstablished: (BOOL*)result outgoing: (BOOL)isOutgoing;
|
||||
- (NSDictionary*) sslOptions;
|
||||
- (NSString*) sslSetOptions: (NSDictionary*)options;
|
||||
@end
|
||||
#endif
|
||||
|
@ -853,6 +854,11 @@ NSString * const NSFileHandleOperationException
|
|||
return nil;
|
||||
}
|
||||
|
||||
- (NSDictionary*) sslOptions
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString*) sslOwner
|
||||
{
|
||||
return nil;
|
||||
|
@ -865,7 +871,11 @@ NSString * const NSFileHandleOperationException
|
|||
NSMutableDictionary *opts;
|
||||
NSString *err;
|
||||
|
||||
opts = [NSMutableDictionary dictionaryWithCapacity: 3];
|
||||
opts = AUTORELEASE([[self sslOptions] mutableCopy]);
|
||||
if (nil == opts)
|
||||
{
|
||||
opts = [NSMutableDictionary dictionaryWithCapacity: 3];
|
||||
}
|
||||
if (nil != certFile)
|
||||
{
|
||||
[opts setObject: certFile forKey: GSTLSCertificateFile];
|
||||
|
@ -1074,6 +1084,11 @@ GSTLSHandlePush(gnutls_transport_ptr_t handle, const void *buffer, size_t len)
|
|||
return [session issuer];
|
||||
}
|
||||
|
||||
- (NSDictionary*) sslOptions
|
||||
{
|
||||
return opts;
|
||||
}
|
||||
|
||||
- (NSString*) sslOwner
|
||||
{
|
||||
return [session owner];
|
||||
|
|
Loading…
Reference in a new issue