Replace BOOL with bool.

This commit is contained in:
Jonathan Schleifer 2013-03-04 18:37:09 +01:00
parent 8eeb6a72d1
commit 89c705d9ed
5 changed files with 33 additions and 33 deletions

View file

@ -74,6 +74,6 @@
- (OFString*)reason
{
OF_GETTER(_reason, NO)
OF_GETTER(_reason, false)
}
@end

View file

@ -31,12 +31,12 @@
{
SSL *_SSL;
OFString *_privateKeyFile, *_certificateFile;
BOOL _requestsClientCertificates;
bool _requestsClientCertificates;
}
#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *privateKeyFile, *certificateFile;
@property BOOL requestsClientCertificates;
@property bool requestsClientCertificates;
#endif
- initWithSocket: (OFTCPSocket*)socket;
@ -49,8 +49,8 @@
- (OFString*)privateKeyFile;
- (void)setCertificateFile: (OFString*)file;
- (OFString*)certificateFile;
- (void)setRequestsClientCertificates: (BOOL)enabled;
- (BOOL)requestsClientCertificates;
- (void)setRequestsClientCertificates: (bool)enabled;
- (bool)requestsClientCertificates;
- (OFDataArray*)channelBindingDataWithType: (OFString*)type;
- (X509Certificate*)peerCertificate;
- (void)verifyPeerCertificate;

View file

@ -288,7 +288,7 @@ locking_callback(int mode, int n, const char *file, int line)
}
if (ret == 0)
_atEndOfStream = YES;
_atEndOfStream = true;
return ret;
}
@ -335,30 +335,30 @@ locking_callback(int mode, int n, const char *file, int line)
- (void)setPrivateKeyFile: (OFString*)privateKeyFile
{
OF_SETTER(_privateKeyFile, privateKeyFile, YES, YES)
OF_SETTER(_privateKeyFile, privateKeyFile, true, 1)
}
- (OFString*)privateKeyFile
{
OF_GETTER(_privateKeyFile, YES)
OF_GETTER(_privateKeyFile, true)
}
- (void)setCertificateFile: (OFString*)certificateFile
{
OF_SETTER(_certificateFile, certificateFile, YES, YES)
OF_SETTER(_certificateFile, certificateFile, true, 1)
}
- (OFString*)certificateFile
{
OF_GETTER(_certificateFile, YES)
OF_GETTER(_certificateFile, true)
}
- (void)setRequestsClientCertificates: (BOOL)enabled
- (void)setRequestsClientCertificates: (bool)enabled
{
_requestsClientCertificates = enabled;
}
- (BOOL)requestsClientCertificates
- (bool)requestsClientCertificates
{
return _requestsClientCertificates;
}

View file

@ -66,11 +66,11 @@
- (OFDictionary*)issuer;
- (OFDictionary*)subject;
- (OFDictionary*)subjectAlternativeName;
- (BOOL)hasCommonNameMatchingDomain: (OFString*)domain;
- (BOOL)hasDNSNameMatchingDomain: (OFString*)domain;
- (BOOL)hasSRVNameMatchingDomain: (OFString*)domain
- (bool)hasCommonNameMatchingDomain: (OFString*)domain;
- (bool)hasDNSNameMatchingDomain: (OFString*)domain;
- (bool)hasSRVNameMatchingDomain: (OFString*)domain
service: (OFString*)service;
- (BOOL)X509_isAssertedDomain: (OFString*)asserted
- (bool)X509_isAssertedDomain: (OFString*)asserted
equalDomain: (OFString*)domain;
- (OFDictionary*)X509_dictionaryFromX509Name: (X509_NAME*)name;
- (X509OID*)X509_stringFromASN1Object: (ASN1_OBJECT*)obj;

View file

@ -254,7 +254,7 @@
return ret;
}
- (BOOL)hasCommonNameMatchingDomain: (OFString*)domain
- (bool)hasCommonNameMatchingDomain: (OFString*)domain
{
OFString *name;
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
@ -265,15 +265,15 @@
if ([self X509_isAssertedDomain: name
equalDomain: domain]) {
[pool release];
return YES;
return true;
}
}
[pool release];
return NO;
return false;
}
- (BOOL)hasDNSNameMatchingDomain: (OFString*)domain
- (bool)hasDNSNameMatchingDomain: (OFString*)domain
{
OFString *name;
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
@ -285,15 +285,15 @@
if ([self X509_isAssertedDomain: name
equalDomain: domain]) {
[pool release];
return YES;
return true;
}
}
[pool release];
return NO;
return false;
}
- (BOOL)hasSRVNameMatchingDomain: (OFString*)domain
- (bool)hasSRVNameMatchingDomain: (OFString*)domain
service: (OFString*)service
{
size_t serviceLength;
@ -318,16 +318,16 @@
if ([self X509_isAssertedDomain: asserted
equalDomain: domain]) {
[pool release];
return YES;
return true;
}
}
}
[pool release];
return NO;
return false;
}
- (BOOL)X509_isAssertedDomain: (OFString*)asserted
- (bool)X509_isAssertedDomain: (OFString*)asserted
equalDomain: (OFString*)domain
{
/*
@ -340,25 +340,25 @@
size_t firstDot;
if ([asserted caseInsensitiveCompare: domain] == OF_ORDERED_SAME)
return YES;
return true;
if (![asserted hasPrefix: @"*."])
return NO;
return false;
asserted = [asserted substringWithRange:
of_range(2, [asserted length] - 2)];
firstDot = [domain rangeOfString: @"."].location;
if (firstDot == OF_NOT_FOUND)
return NO;
return false;
domain = [domain substringWithRange:
of_range(firstDot + 1, [domain length] - firstDot - 1)];
if (![asserted caseInsensitiveCompare: domain])
return YES;
return true;
return NO;
return false;
}
- (OFDictionary*)X509_dictionaryFromX509Name: (X509_NAME*)name
@ -462,7 +462,7 @@
return [OFString stringWithUTF8String: tmp];
}
- (BOOL)isEqual: (id)object
- (bool)isEqual: (id)object
{
if ([object isKindOfClass: [X509OID class]]) {
X509OID *OID = object;
@ -473,7 +473,7 @@
if ([object isKindOfClass: [OFString class]])
return [_string isEqual: object];
return NO;
return false;
}
- (uint32_t)hash