Latest 1.9
Homepage https://github.com/google/macops-molcodesignchecker
License Apache 2.0
Platforms osx 10.8
Dependencies MOLCertificate
Frameworks Security
Authors

Provides an easy way to do code signature validation in Objective-C

Usage

#import <MOLCertificate/MOLCertificate.h>
#import <MOLCodesignChecker/MOLCodesignChecker.h>

- (BOOL)validateMySignature {
  MOLCodesignChecker *csInfo = [[MOLCodesignChecker alloc] initWithSelf];
  if (csInfo) {
    // I'm signed! Check the certificate
    NSLog(@"%@, %@", csInfo.leafCertificate, csInfo.leafCertificate.SHA256);
    return YES;
  }
  return NO;
}

- (BOOL)validateFile:(NSString *)filePath {
  MOLCodesignChecker *csInfo = [[MOLCodesignChecker alloc] initWithBinaryPath:filePath];
  if (csInfo) {
    // I'm signed! Check the certificate
    NSLog(@"%@, %@", csInfo.leafCertificate, csInfo.leafCertificate.SHA256);
    return YES;
  }
  return NO;
}

Installation

Install using CocoaPods.

pod 'MOLCodesignChecker'

You can also import the project manually but this isn’t tested.

Documentation

Reference documentation is at CocoaDocs.org:

http://cocoadocs.org/docsets/MOLCodesignChecker

Contributing

Patches to this library are very much welcome. Please see the
CONTRIBUTING
file.

Latest podspec

{
    "name": "MOLCodesignChecker",
    "version": "1.9",
    "platforms": {
        "osx": "10.8"
    },
    "license": {
        "type": "Apache 2.0",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/google/macops-molcodesignchecker",
    "authors": {
        "Google Macops": "[email protected]"
    },
    "summary": "Perform codesign validation simply in Objective-C",
    "source": {
        "git": "https://github.com/google/macops-molcodesignchecker.git",
        "tag": "v1.9"
    },
    "source_files": "Source/MOLCodesignChecker/MOLCodesignChecker.{h,m}",
    "frameworks": "Security",
    "dependencies": {
        "MOLCertificate": [
            "~> 1.8"
        ]
    }
}

Pin It on Pinterest

Share This