This repository was archived by the owner on Dec 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ OF_ASSUME_NONNULL_BEGIN
4545 X509Certificate *peerCertificate;
4646
4747- initWithSocket : (OFTCPSocket *)socket ;
48- - (OFDataArray *)channelBindingDataWithType : (OFString *)type ;
48+ - (OFData *)channelBindingDataWithType : (OFString *)type ;
4949- (nullable X509Certificate *)peerCertificate ;
5050@end
5151
Original file line number Diff line number Diff line change 4343
4444#import < ObjFW/OFThread.h>
4545#import < ObjFW/OFHTTPRequest.h>
46- #import < ObjFW/OFDataArray .h>
46+ #import < ObjFW/OFData .h>
4747#import < ObjFW/OFLocalization.h>
4848
4949#import < ObjFW/OFAcceptFailedException.h>
@@ -423,11 +423,10 @@ - (const char *)privateKeyPassphraseForSNIHost: (OFString *)SNIHost
423423 OF_UNRECOGNIZED_SELECTOR
424424}
425425
426- - (OFDataArray *)channelBindingDataWithType : (OFString *)type
426+ - (OFData *)channelBindingDataWithType : (OFString *)type
427427{
428428 size_t length;
429429 char buffer[64 ];
430- OFDataArray *data;
431430
432431 if (![type isEqual: @" tls-unique" ])
433432 @throw [OFInvalidArgumentException exception ];
@@ -443,11 +442,8 @@ - (OFDataArray *)channelBindingDataWithType: (OFString *)type
443442 length = SSL_get_peer_finished (_SSL, buffer, 64 );
444443 }
445444
446- data = [OFDataArray dataArray ];
447- [data addItems: buffer
448- count: length];
449-
450- return data;
445+ return [OFData dataWithItems: buffer
446+ count: length];
451447}
452448
453449- (X509Certificate *)peerCertificate
Original file line number Diff line number Diff line change 3737
3838#import < ObjFW/OFAutoreleasePool.h>
3939#import < ObjFW/OFArray.h>
40- #import < ObjFW/OFDataArray .h>
40+ #import < ObjFW/OFData .h>
4141#import < ObjFW/OFDictionary.h>
4242#import < ObjFW/OFFile.h>
4343#import < ObjFW/OFInitializationFailedException.h>
@@ -72,11 +72,10 @@ @implementation X509Certificate
7272
7373 @try {
7474 OFAutoreleasePool *pool = [[OFAutoreleasePool alloc ] init ];
75- OFDataArray *data = [OFDataArray
76- dataArrayWithContentsOfFile: path];
77- const unsigned char *dataCArray = [data items ];
75+ OFData *data = [OFData dataWithContentsOfFile: path];
76+ const unsigned char *dataC = [data items ];
7877
79- _certificate = d2i_X509 (NULL , &dataCArray , [data count ]);
78+ _certificate = d2i_X509 (NULL , &dataC , [data count ]);
8079 if (_certificate == NULL )
8180 @throw [OFInitializationFailedException
8281 exceptionWithClass: [self class ]];
You can’t perform that action at this time.
0 commit comments