46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
@try {
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFFile *fd = [OFFile fileWithPath: file
mode: @"r"];
OFDataArray *data = [fd readDataArrayTillEndOfStream];
[fd close];
const unsigned char *dataCArray = [data cArray];
crt = d2i_X509(NULL, &dataCArray, [data count]);
[pool release];
if (crt == NULL)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
} @catch (id e) {
[self release];
|
|
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
@try {
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFFile *fd = [OFFile fileWithPath: file
mode: @"r"];
OFDataArray *data = [fd readDataArrayTillEndOfStream];
[fd close];
const unsigned char *dataCArray = [data items];
crt = d2i_X509(NULL, &dataCArray, [data count]);
[pool release];
if (crt == NULL)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
} @catch (id e) {
[self release];
|