ObjOpenSSL  Diff

Differences From Artifact [ed578c75c6]:

To Artifact [753b8d7922]:


33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
33
34
35
36
37
38
39

40
41
42
43
44
45
46
47







-
+







# pragma clang diagnostic pop
#endif

#import "X509Certificate.h"

#import <ObjFW/OFAutoreleasePool.h>
#import <ObjFW/OFArray.h>
#import <ObjFW/OFDataArray.h>
#import <ObjFW/OFData.h>
#import <ObjFW/OFDictionary.h>
#import <ObjFW/OFFile.h>
#import <ObjFW/OFInitializationFailedException.h>
#import <ObjFW/OFInvalidEncodingException.h>
#import <ObjFW/OFList.h>
#import <ObjFW/OFMutableDictionary.h>
#import <ObjFW/OFString.h>
68
69
70
71
72
73
74
75
76
77


78
79

80
81
82
83
84
85
86
68
69
70
71
72
73
74



75
76
77

78
79
80
81
82
83
84
85







-
-
-
+
+

-
+








- initWithFile: (OFString *)path
{
	self = [super init];

	@try {
		OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
		OFDataArray *data = [OFDataArray
		    dataArrayWithContentsOfFile: path];
		const unsigned char *dataCArray = [data items];
		OFData *data = [OFData dataWithContentsOfFile: path];
		const unsigned char *dataC = [data items];

		_certificate = d2i_X509(NULL, &dataCArray, [data count]);
		_certificate = d2i_X509(NULL, &dataC, [data count]);
		if (_certificate == NULL)
			@throw [OFInitializationFailedException
			    exceptionWithClass: [self class]];

		[pool release];
	} @catch (id e) {
		[self release];