@@ -142,11 +142,11 @@ _certificateVerificationEnabled = true; return self; } -- initWithSocket: (OFTCPSocket*)socket +- initWithSocket: (OFTCPSocket *)socket { self = [self init]; @try { if ((_socket = dup(socket->_socket)) < 0) @@ -170,11 +170,11 @@ if (SSL_ != NULL) SSL_free(SSL_); } -- (void)SSL_startTLSWithExpectedHost: (OFString*)host +- (void)SSL_startTLSWithExpectedHost: (OFString *)host port: (uint16_t)port { of_string_encoding_t encoding; if ((_SSL = SSL_new(ctx)) == NULL || SSL_set_fd(_SSL, _socket) != 1) { @@ -252,17 +252,17 @@ socket: self SSLError: error]; } } -- (void)startTLSWithExpectedHost: (OFString*)host +- (void)startTLSWithExpectedHost: (OFString *)host { [self SSL_startTLSWithExpectedHost: host port: 0]; } -- (void)connectToHost: (OFString*)host +- (void)connectToHost: (OFString *)host port: (uint16_t)port { [super connectToHost: host port: port]; @@ -270,11 +270,11 @@ port: port]; } - (instancetype)accept { - SSLSocket *client = (SSLSocket*)[super accept]; + SSLSocket *client = (SSLSocket *)[super accept]; of_string_encoding_t encoding; if ((client->_SSL = SSL_new(ctx)) == NULL || !SSL_set_fd(client->_SSL, client->_socket)) { [client SSL_super_close]; @@ -315,11 +315,11 @@ - (void)SSL_super_close { [super close]; } -- (size_t)lowlevelReadIntoBuffer: (void*)buffer +- (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length { ssize_t ret; if (length > INT_MAX) @@ -345,11 +345,11 @@ _atEndOfStream = true; return ret; } -- (void)lowlevelWriteBuffer: (const void*)buffer +- (void)lowlevelWriteBuffer: (const void *)buffer length: (size_t)length { if (length > INT_MAX) @throw [OFOutOfRangeException exception]; @@ -372,50 +372,50 @@ return true; return [super hasDataInReadBuffer]; } -- (void)setCertificateFile: (OFString*)certificateFile - forSNIHost: (OFString*)SNIHost -{ - /* TODO */ - OF_UNRECOGNIZED_SELECTOR -} - -- (OFString*)certificateFileForSNIHost: (OFString*)SNIHost -{ - /* TODO */ - OF_UNRECOGNIZED_SELECTOR -} - -- (void)setPrivateKeyFile: (OFString*)privateKeyFile - forSNIHost: (OFString*)SNIHost -{ - /* TODO */ - OF_UNRECOGNIZED_SELECTOR -} - -- (OFString*)privateKeyFileForSNIHost: (OFString*)SNIHost -{ - /* TODO */ - OF_UNRECOGNIZED_SELECTOR -} - -- (void)setPrivateKeyPassphrase: (const char*)privateKeyPassphrase - forSNIHost: (OFString*)SNIHost -{ - /* TODO */ - OF_UNRECOGNIZED_SELECTOR -} - -- (const char*)privateKeyPassphraseForSNIHost: (OFString*)SNIHost -{ - /* TODO */ - OF_UNRECOGNIZED_SELECTOR -} - -- (OFDataArray*)channelBindingDataWithType: (OFString*)type +- (void)setCertificateFile: (OFString *)certificateFile + forSNIHost: (OFString *)SNIHost +{ + /* TODO */ + OF_UNRECOGNIZED_SELECTOR +} + +- (OFString *)certificateFileForSNIHost: (OFString *)SNIHost +{ + /* TODO */ + OF_UNRECOGNIZED_SELECTOR +} + +- (void)setPrivateKeyFile: (OFString *)privateKeyFile + forSNIHost: (OFString *)SNIHost +{ + /* TODO */ + OF_UNRECOGNIZED_SELECTOR +} + +- (OFString *)privateKeyFileForSNIHost: (OFString *)SNIHost +{ + /* TODO */ + OF_UNRECOGNIZED_SELECTOR +} + +- (void)setPrivateKeyPassphrase: (const char *)privateKeyPassphrase + forSNIHost: (OFString *)SNIHost +{ + /* TODO */ + OF_UNRECOGNIZED_SELECTOR +} + +- (const char *)privateKeyPassphraseForSNIHost: (OFString *)SNIHost +{ + /* TODO */ + OF_UNRECOGNIZED_SELECTOR +} + +- (OFDataArray *)channelBindingDataWithType: (OFString *)type { size_t length; char buffer[64]; OFDataArray *data; @@ -438,11 +438,11 @@ count: length]; return data; } -- (X509Certificate*)peerCertificate +- (X509Certificate *)peerCertificate { X509 *certificate = SSL_get_peer_certificate(_SSL); if (!certificate) return nil;