- (BOOL)IsMobileConfigInstalled {
NSString *certPath = [[NSBundle mainBundle] pathForResource:@"cert" ofType:@"der"];
NSData *certData = [NSData dataWithContentsOfFile:certPath];
SecCertificateRef cert = NULL;
if ([certData length]) {
cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef) certData);
if (cert != NULL) {
CFStringRef certSummary = SecCertificateCopySubjectSummary(cert);
NSString *summaryString = [[NSString alloc] initWithString:(__bridge NSString *) certSummary];
CFRelease(certSummary);
}
}
SecPolicyRef policy = SecPolicyCreateBasicX509();
SecTrustRef trust;
OSStatus err = SecTrustCreateWithCertificates((__bridge CFArrayRef) @[
(__bridge id) cert
], policy, &trust);
SecTrustResultType trustResult = (SecTrustResultType) -1;
err = SecTrustEvaluate(trust, &trustResult);
CFRelease(trust);
CFRelease(policy);
CFRelease(cert);
NSString *ver = [[UIDevice currentDevice] systemVersion];
float ver_float = [ver floatValue];
if (ver_float >= 11)
return kSecTrustResultProceed == trustResult;
return kSecTrustResultUnspecified == trustResult;
}
Jun 2 10:55:16 fibro-desktop kernel: [ 2045.454910] ata3: lost interrupt (Status 0x50)
Jun 2 10:55:16 fibro-desktop kernel: [ 2045.454926] ata3: exception Emask 0x50 SAct 0x0 SErr 0x40d0802 action 0xf
Jun 2 10:55:16 fibro-desktop kernel: [ 2045.454930] ata3: SError: { RecovComm HostInt PHYRdyChg CommWake 10B8B DevExch }
Jun 2 10:55:16 fibro-desktop kernel: [ 2045.454937] ata3: hard resetting link
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.363650] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.403886] ata3.00: configured for UDMA/133
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.403899] ata3: EH complete
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.504492] end_request: I/O error, dev sdb, sector 3905173186
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.504568] Aborting journal on device sdb1-8.
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.504881] EXT4-fs (sdb1): delayed block allocation failed for inode 160956702 at logical offset 0 with max blocks 2048 with error -30
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.504885] This should not happen!! Data will be lost
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.504977] EXT4-fs error (device sdb1) in ext4_reserve_inode_write: Journal has aborted
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.505728] EXT4-fs error (device sdb1) in ext4_da_writepages: Journal has aborted
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.522587] EXT4-fs error (device sdb1): ext4_journal_start_sb: Detected aborted journal
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.522591] EXT4-fs (sdb1): Remounting filesystem read-only
Jun 2 10:55:17 fibro-desktop kernel: [ 2046.581630] EXT4-fs (sdb1): ext4_da_writepages: jbd2_start: 7355 pages, ino 160956702; err -30