281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
#ifdef OF_HAVE_PLUGINS
+ (void)initialize
{
if (self != [OFHTTP class])
return;
/* Opportunistically try loading ObjOpenSSL and ignore any errors. */
OFDlOpen(@LIB_PREFIX @"objopenssl" @LIB_SUFFIX, OF_RTLD_LAZY);
}
#endif
- (instancetype)init
{
self = [super init];
|
|
|
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
#ifdef OF_HAVE_PLUGINS
+ (void)initialize
{
if (self != [OFHTTP class])
return;
/* Opportunistically try loading ObjOpenSSL and ignore any errors. */
OFDLOpen(@LIB_PREFIX @"objopenssl" @LIB_SUFFIX, OFDLOpenFlagLazy);
}
#endif
- (instancetype)init
{
self = [super init];
|
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
|
[OFApplication terminateWithStatus: 1];
break;
}
}
#ifdef OF_HAVE_SANDBOX
[sandbox unveilPath: (outputPath != nil
? outputPath : OF_PATH_CURRENT_DIRECTORY)
permissions: (_continue ? @"rwc" : @"wc")];
/* In case we use ObjOpenSSL for https later */
[sandbox unveilPath: @"/etc/ssl" permissions: @"r"];
sandbox.allowsUnveil = false;
[OFApplication of_activateSandbox: sandbox];
#endif
|
>
|
>
>
>
|
|
>
|
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
|
[OFApplication terminateWithStatus: 1];
break;
}
}
#ifdef OF_HAVE_SANDBOX
if (outputPath != nil)
[sandbox unveilPath: outputPath
permissions: (_continue ? @"rwc" : @"wc")];
else
[sandbox unveilPath: [[OFFileManger defaultManager]
currentDirectoryPath]
permissions: (_continue ? @"rwc" : @"wc")];
/* In case we use ObjOpenSSL for https later */
[sandbox unveilPath: @"/etc/ssl" permissions: @"r"];
sandbox.allowsUnveil = false;
[OFApplication of_activateSandbox: sandbox];
#endif
|