{"id":13337970,"url":"https://github.com/tls-inspector/CertificateKit","last_synced_at":"2025-03-11T08:32:08.613Z","repository":{"id":110575347,"uuid":"55464400","full_name":"tls-inspector/CertificateKit","owner":"tls-inspector","description":"CertificateKit for iOS makes working with SSL/TLS certificates a pain-free endeavour!","archived":true,"fork":false,"pushed_at":"2017-06-14T22:45:13.000Z","size":22139,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-23T20:11:27.801Z","etag":null,"topics":["certificate","cryptography","framework","ios","ios-library","ssl","tls","x509"],"latest_commit_sha":null,"homepage":"https://tlsinspector.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tls-inspector.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-05T03:21:33.000Z","updated_at":"2023-01-28T18:57:56.000Z","dependencies_parsed_at":"2023-04-23T04:07:37.331Z","dependency_job_id":null,"html_url":"https://github.com/tls-inspector/CertificateKit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tls-inspector%2FCertificateKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tls-inspector%2FCertificateKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tls-inspector%2FCertificateKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tls-inspector%2FCertificateKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tls-inspector","download_url":"https://codeload.github.com/tls-inspector/CertificateKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243000833,"owners_count":20219751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["certificate","cryptography","framework","ios","ios-library","ssl","tls","x509"],"created_at":"2024-07-29T19:15:16.583Z","updated_at":"2025-03-11T08:32:08.605Z","avatar_url":"https://github.com/tls-inspector.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CertificateKit\n\nCertificateKit is an advanced iOS library for working with SSL/TLS X.509 certificates. It's primarily used within the [TLS Inspector iOS app](https://tlsinspector.com) but can be used in any iOS project.\n\nThe primary goal with CertificateKit is to provide an easy-to-use front-end to OpenSSLs X.509 APIs.\n\n[API Reference](https://tlsinspector.com/docs/index.html)\n\n## Installation\n\n**Due to the complex nature of CertificateKit, it cannot be installed using Cocoapods and must be installed manually.**\n\n 1. Download the Latest Release\n 2. Add the `CertificateKit.framework` file to your project by dragging and dropping it onto the Project Navigator in Xcode\n\n## Getting Started\n\nTo get a chain of certificates (Root, Intermediate, and Server) for a given URL:\n\n### Objective-C:\n\n```objc\nself.chain = [CKCertificateChain new];\n\n[self.chain\n certificateChainFromURL:[NSURL URLWithString:@\"https://tls-inspector.com\"]\n finished:^(NSError * _Nullable error, CKCertificateChain * _Nullable chain) {\n     if (error) {\n         // Do something\n     }\n\n     // Is the chain trusted\n     switch (chain.trusted) {\n         case CKCertificateChainTrustStatusTrusted:\n             // Trusted by system\n             break;\n         case CKCertificateChainTrustStatusUntrusted:\n             // Untrusted by system\n             break;\n     }\n\n     // Is the server certificate revoked\n     if (chain.server.revoked.isRevoked) {\n         // Print the reason why it was revoked\n         NSLog(@\"%@\", chain.server.revoked.reasonString);\n     }\n }];\n```\n\n### Swift:\n\n```swift\nlet chain: CKCertificateChain = CKCertificateChain()\n\nchain.certificateChain(from: URL(string: \"https://tls-inspector.com\")!) { (error, chain) in\n    if error != nil {\n        // Do something\n    }\n\n    // Is the chain trusted\n    if let trust: CKCertificateChainTrustStatus = chain?.trusted {\n        switch trust {\n            case .trusted:\n                // Trusted by system\n            break\n            case .untrusted:\n                // Untrusted by system\n            break\n        }\n    }\n\n    // Is the server certificate revoked\n    if chain?.server?.revoked.isRevoked ?? false {\n        let reasonString = chain?.server?.revoked.reasonString\n        print(reasonString)\n    }\n}\n```\n\nFor more information see the [API Reference](https://tlsinspector.com/docs/index.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftls-inspector%2FCertificateKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftls-inspector%2FCertificateKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftls-inspector%2FCertificateKit/lists"}