Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit c428df9

Browse files
committed
Adjust to recent ObjFW changes
1 parent d11fe7a commit c428df9

8 files changed

Lines changed: 77 additions & 77 deletions

src/SSLConnectionFailedException.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@
3333
@property (readonly) unsigned long SSLError;
3434
@property (readonly) long verifyResult;
3535

36-
+ (instancetype)exceptionWithHost: (OFString*)host
36+
+ (instancetype)exceptionWithHost: (OFString *)host
3737
port: (uint16_t)port
38-
socket: (SSLSocket*)socket
38+
socket: (SSLSocket *)socket
3939
SSLError: (unsigned long)SSLError;
40-
+ (instancetype)exceptionWithHost: (OFString*)host
40+
+ (instancetype)exceptionWithHost: (OFString *)host
4141
port: (uint16_t)port
42-
socket: (SSLSocket*)socket
42+
socket: (SSLSocket *)socket
4343
SSLError: (unsigned long)SSLError
4444
verifyResult: (long)verifyResult;
45-
- initWithHost: (OFString*)host
45+
- initWithHost: (OFString *)host
4646
port: (uint16_t)port
47-
socket: (SSLSocket*)socket
47+
socket: (SSLSocket *)socket
4848
SSLError: (unsigned long)SSLError;
49-
- initWithHost: (OFString*)host
49+
- initWithHost: (OFString *)host
5050
port: (uint16_t)port
51-
socket: (SSLSocket*)socket
51+
socket: (SSLSocket *)socket
5252
SSLError: (unsigned long)SSLError
5353
verifyResult: (long)verifyResult;
5454
@end

src/SSLConnectionFailedException.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
@implementation SSLConnectionFailedException
4343
@synthesize SSLError = _SSLError, verifyResult = _verifyResult;
4444

45-
+ (instancetype)exceptionWithHost: (OFString*)host
45+
+ (instancetype)exceptionWithHost: (OFString *)host
4646
port: (uint16_t)port
47-
socket: (SSLSocket*)socket
47+
socket: (SSLSocket *)socket
4848
SSLError: (unsigned long)SSLError
4949
{
5050
return [[[self alloc] initWithHost: host
@@ -54,9 +54,9 @@ + (instancetype)exceptionWithHost: (OFString*)host
5454
}
5555

5656

57-
+ (instancetype)exceptionWithHost: (OFString*)host
57+
+ (instancetype)exceptionWithHost: (OFString *)host
5858
port: (uint16_t)port
59-
socket: (SSLSocket*)socket
59+
socket: (SSLSocket *)socket
6060
SSLError: (unsigned long)SSLError
6161
verifyResult: (long)verifyResult
6262
{
@@ -67,9 +67,9 @@ + (instancetype)exceptionWithHost: (OFString*)host
6767
verifyResult: verifyResult] autorelease];
6868
}
6969

70-
- initWithHost: (OFString*)host
70+
- initWithHost: (OFString *)host
7171
port: (uint16_t)port
72-
socket: (SSLSocket*)socket
72+
socket: (SSLSocket *)socket
7373
SSLError: (unsigned long)SSLError
7474
{
7575
self = [super initWithHost: host
@@ -81,9 +81,9 @@ + (instancetype)exceptionWithHost: (OFString*)host
8181
return self;
8282
}
8383

84-
- initWithHost: (OFString*)host
84+
- initWithHost: (OFString *)host
8585
port: (uint16_t)port
86-
socket: (SSLSocket*)socket
86+
socket: (SSLSocket *)socket
8787
SSLError: (unsigned long)SSLError
8888
verifyResult: (long)verifyResult
8989
{
@@ -97,7 +97,7 @@ + (instancetype)exceptionWithHost: (OFString*)host
9797
return self;
9898
}
9999

100-
- (OFString*)description
100+
- (OFString *)description
101101
{
102102
if (_SSLError != SSL_ERROR_NONE) {
103103
char error[512];

src/SSLInvalidCertificateException.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
OFString *_reason;
3030
}
3131

32-
@property (readonly, copy) OFString *reason;
32+
@property (readonly, nonatomic) OFString *reason;
3333

34-
+ exceptionWithReason: (OFString*)reason;
35-
- initWithReason: (OFString*)reason;
34+
+ exceptionWithReason: (OFString *)reason;
35+
- initWithReason: (OFString *)reason;
3636
@end

src/SSLInvalidCertificateException.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
@implementation SSLInvalidCertificateException
3131
@synthesize reason = _reason;
3232

33-
+ exceptionWithReason: (OFString*)reason
33+
+ exceptionWithReason: (OFString *)reason
3434
{
3535
return [[[self alloc] initWithReason: reason] autorelease];
3636
}
@@ -47,7 +47,7 @@ @implementation SSLInvalidCertificateException
4747
abort();
4848
}
4949

50-
- initWithReason: (OFString*)reason
50+
- initWithReason: (OFString *)reason
5151
{
5252
self = [super init];
5353

@@ -68,7 +68,7 @@ - (void)dealloc
6868
[super dealloc];
6969
}
7070

71-
- (OFString*)description
71+
- (OFString *)description
7272
{
7373
return [OFString stringWithFormat:
7474
@"Invalid certificate! Reason: %@", _reason];

src/SSLSocket.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
@property (getter=isRequestClientCertificatesEnabled)
4141
bool requestClientCertificatesEnabled;
4242

43-
- initWithSocket: (OFTCPSocket*)socket;
43+
- initWithSocket: (OFTCPSocket *)socket;
4444
- (void)SSL_super_close;
45-
- (OFDataArray*)channelBindingDataWithType: (OFString*)type;
46-
- (X509Certificate*)peerCertificate;
45+
- (OFDataArray *)channelBindingDataWithType: (OFString *)type;
46+
- (X509Certificate *)peerCertificate;
4747
- (void)verifyPeerCertificate;
4848
@end

src/SSLSocket.m

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ + (void)initialize
144144
return self;
145145
}
146146

147-
- initWithSocket: (OFTCPSocket*)socket
147+
- initWithSocket: (OFTCPSocket *)socket
148148
{
149149
self = [self init];
150150

@@ -172,7 +172,7 @@ - (void)dealloc
172172
SSL_free(SSL_);
173173
}
174174

175-
- (void)SSL_startTLSWithExpectedHost: (OFString*)host
175+
- (void)SSL_startTLSWithExpectedHost: (OFString *)host
176176
port: (uint16_t)port
177177
{
178178
of_string_encoding_t encoding;
@@ -254,13 +254,13 @@ - (void)SSL_startTLSWithExpectedHost: (OFString*)host
254254
}
255255
}
256256

257-
- (void)startTLSWithExpectedHost: (OFString*)host
257+
- (void)startTLSWithExpectedHost: (OFString *)host
258258
{
259259
[self SSL_startTLSWithExpectedHost: host
260260
port: 0];
261261
}
262262

263-
- (void)connectToHost: (OFString*)host
263+
- (void)connectToHost: (OFString *)host
264264
port: (uint16_t)port
265265
{
266266
[super connectToHost: host
@@ -272,7 +272,7 @@ - (void)connectToHost: (OFString*)host
272272

273273
- (instancetype)accept
274274
{
275-
SSLSocket *client = (SSLSocket*)[super accept];
275+
SSLSocket *client = (SSLSocket *)[super accept];
276276
of_string_encoding_t encoding;
277277

278278
if ((client->_SSL = SSL_new(ctx)) == NULL ||
@@ -317,7 +317,7 @@ - (void)SSL_super_close
317317
[super close];
318318
}
319319

320-
- (size_t)lowlevelReadIntoBuffer: (void*)buffer
320+
- (size_t)lowlevelReadIntoBuffer: (void *)buffer
321321
length: (size_t)length
322322
{
323323
ssize_t ret;
@@ -347,7 +347,7 @@ - (size_t)lowlevelReadIntoBuffer: (void*)buffer
347347
return ret;
348348
}
349349

350-
- (void)lowlevelWriteBuffer: (const void*)buffer
350+
- (void)lowlevelWriteBuffer: (const void *)buffer
351351
length: (size_t)length
352352
{
353353
if (length > INT_MAX)
@@ -374,46 +374,46 @@ - (bool)hasDataInReadBuffer
374374
return [super hasDataInReadBuffer];
375375
}
376376

377-
- (void)setCertificateFile: (OFString*)certificateFile
378-
forSNIHost: (OFString*)SNIHost
377+
- (void)setCertificateFile: (OFString *)certificateFile
378+
forSNIHost: (OFString *)SNIHost
379379
{
380380
/* TODO */
381381
OF_UNRECOGNIZED_SELECTOR
382382
}
383383

384-
- (OFString*)certificateFileForSNIHost: (OFString*)SNIHost
384+
- (OFString *)certificateFileForSNIHost: (OFString *)SNIHost
385385
{
386386
/* TODO */
387387
OF_UNRECOGNIZED_SELECTOR
388388
}
389389

390-
- (void)setPrivateKeyFile: (OFString*)privateKeyFile
391-
forSNIHost: (OFString*)SNIHost
390+
- (void)setPrivateKeyFile: (OFString *)privateKeyFile
391+
forSNIHost: (OFString *)SNIHost
392392
{
393393
/* TODO */
394394
OF_UNRECOGNIZED_SELECTOR
395395
}
396396

397-
- (OFString*)privateKeyFileForSNIHost: (OFString*)SNIHost
397+
- (OFString *)privateKeyFileForSNIHost: (OFString *)SNIHost
398398
{
399399
/* TODO */
400400
OF_UNRECOGNIZED_SELECTOR
401401
}
402402

403-
- (void)setPrivateKeyPassphrase: (const char*)privateKeyPassphrase
404-
forSNIHost: (OFString*)SNIHost
403+
- (void)setPrivateKeyPassphrase: (const char *)privateKeyPassphrase
404+
forSNIHost: (OFString *)SNIHost
405405
{
406406
/* TODO */
407407
OF_UNRECOGNIZED_SELECTOR
408408
}
409409

410-
- (const char*)privateKeyPassphraseForSNIHost: (OFString*)SNIHost
410+
- (const char *)privateKeyPassphraseForSNIHost: (OFString *)SNIHost
411411
{
412412
/* TODO */
413413
OF_UNRECOGNIZED_SELECTOR
414414
}
415415

416-
- (OFDataArray*)channelBindingDataWithType: (OFString*)type
416+
- (OFDataArray *)channelBindingDataWithType: (OFString *)type
417417
{
418418
size_t length;
419419
char buffer[64];
@@ -440,7 +440,7 @@ - (OFDataArray*)channelBindingDataWithType: (OFString*)type
440440
return data;
441441
}
442442

443-
- (X509Certificate*)peerCertificate
443+
- (X509Certificate *)peerCertificate
444444
{
445445
X509 *certificate = SSL_get_peer_certificate(_SSL);
446446

src/X509Certificate.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
OFString *_string;
4747
}
4848

49-
- initWithUTF8String: (const char*)string;
49+
- initWithUTF8String: (const char *)string;
5050
@end
5151

5252
@interface X509Certificate: OFObject
@@ -57,18 +57,18 @@
5757
OFDictionary *_subjectAlternativeName;
5858
}
5959

60-
- initWithFile: (OFString*)file;
61-
- initWithX509Struct: (X509*)cert;
62-
- (OFDictionary*)issuer;
63-
- (OFDictionary*)subject;
64-
- (OFDictionary*)subjectAlternativeName;
65-
- (bool)hasCommonNameMatchingDomain: (OFString*)domain;
66-
- (bool)hasDNSNameMatchingDomain: (OFString*)domain;
67-
- (bool)hasSRVNameMatchingDomain: (OFString*)domain
68-
service: (OFString*)service;
69-
- (bool)X509_isAssertedDomain: (OFString*)asserted
70-
equalDomain: (OFString*)domain;
71-
- (OFDictionary*)X509_dictionaryFromX509Name: (X509_NAME*)name;
72-
- (X509OID*)X509_stringFromASN1Object: (ASN1_OBJECT*)obj;
73-
- (OFString*)X509_stringFromASN1String: (ASN1_STRING*)str;
60+
- initWithFile: (OFString *)file;
61+
- initWithX509Struct: (X509 *)cert;
62+
- (OFDictionary *)issuer;
63+
- (OFDictionary *)subject;
64+
- (OFDictionary *)subjectAlternativeName;
65+
- (bool)hasCommonNameMatchingDomain: (OFString *)domain;
66+
- (bool)hasDNSNameMatchingDomain: (OFString *)domain;
67+
- (bool)hasSRVNameMatchingDomain: (OFString *)domain
68+
service: (OFString *)service;
69+
- (bool)X509_isAssertedDomain: (OFString *)asserted
70+
equalDomain: (OFString *)domain;
71+
- (OFDictionary *)X509_dictionaryFromX509Name: (X509_NAME *)name;
72+
- (X509OID *)X509_stringFromASN1Object: (ASN1_OBJECT *)obj;
73+
- (OFString *)X509_stringFromASN1String: (ASN1_STRING *)str;
7474
@end

0 commit comments

Comments
 (0)