Make it possible to require TLS.
This commit is contained in:
parent
7c35be965c
commit
616aa8b9cd
2 changed files with 28 additions and 1 deletions
|
@ -329,6 +329,16 @@
|
|||
return [[sock retain] autorelease];
|
||||
}
|
||||
|
||||
- (BOOL)encryptionRequired
|
||||
{
|
||||
return encryptionRequired;
|
||||
}
|
||||
|
||||
- (void)setEncryptionRequired: (BOOL)required
|
||||
{
|
||||
encryptionRequired = required;
|
||||
}
|
||||
|
||||
- (BOOL)encrypted
|
||||
{
|
||||
return encrypted;
|
||||
|
@ -711,6 +721,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (encryptionRequired && !encrypted)
|
||||
/* TODO: Find/create an exception to throw here */
|
||||
@throw [OFException newWithClass: isa];
|
||||
|
||||
if (mechs != nil) {
|
||||
OFEnumerator *enumerator;
|
||||
OFXMLElement *mech;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue