@@ -41,11 +41,11 @@ # pragma clang diagnostic pop #endif #import #import -#import +#import #import #import #import #import @@ -421,15 +421,14 @@ { /* TODO */ OF_UNRECOGNIZED_SELECTOR } -- (OFDataArray *)channelBindingDataWithType: (OFString *)type +- (OFData *)channelBindingDataWithType: (OFString *)type { size_t length; char buffer[64]; - OFDataArray *data; if (![type isEqual: @"tls-unique"]) @throw [OFInvalidArgumentException exception]; if (SSL_session_reused(_SSL) ^ !_listening) { @@ -441,15 +440,12 @@ } else { /* peer sent the finished message */ length = SSL_get_peer_finished(_SSL, buffer, 64); } - data = [OFDataArray dataArray]; - [data addItems: buffer - count: length]; - - return data; + return [OFData dataWithItems: buffer + count: length]; } - (X509Certificate *)peerCertificate { X509 *certificate = SSL_get_peer_certificate(_SSL);