├── CertificateKit ├── build │ ├── curl.want │ ├── openssl.want │ ├── build-curl.sh │ └── build-openssl.sh ├── Extensions │ ├── NSDate+ASN1_TIME.h │ └── NSDate+ASN1_TIME.m ├── validate.sh ├── README.md ├── Info.plist ├── CertificateKit.m ├── CKResolvedAddress.m ├── Revocation │ ├── CKOCSPResponse.m │ ├── CKCRLResponse.m │ ├── CKCRLManager.h │ ├── CKOCSPManager.h │ ├── CKCRLResponse.h │ ├── CKRevoked.h │ ├── CKRevoked.m │ └── CKOCSPResponse.h ├── CKAlternateNameObject.m ├── Getters │ ├── CKCertificateChainGetter.h │ ├── CKCertificateChainGetter.m │ ├── CKServerInfoGetter.h │ ├── CKGetterTask.m │ ├── CKOpenSSLCertificateChainGetter.h │ ├── CKSecureTransportCertificateChainGetter.h │ ├── CKNetworkCertificateChainGetter.h │ └── CKGetterTask.h ├── CKCurlCommon.h ├── CKEVOIDList.h ├── CKTypes.h ├── CKAlternateNameObject.h ├── CKResolvedAddress.h ├── CKResolver.h ├── CKSocketUtils.h ├── CKServerInfo.h ├── CertificateKit_PrefixHeader.pch ├── CKCurlCommon.m ├── CKCertificatePublicKey.h ├── CKGetterParameters.h ├── CKRegex.h ├── CKCertificatePublicKey.m ├── CKNameObject.h ├── CKRegex.m ├── CKLogging.h ├── CertificateKit.h ├── CKServerInfo.m ├── CKInspectParameters.h ├── CKSocketUtils.m ├── CKGetter.h └── CKNameObject.m ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── CONTRIBUTING.md ├── SECURITY.md └── CODE_OF_CONDUCT.md ├── TLS Inspector ├── Assets.xcassets │ ├── Contents.json │ ├── Bug.imageset │ │ ├── Bug.png │ │ ├── Bug@2x.png │ │ ├── Bug@3x.png │ │ └── Contents.json │ ├── Info.imageset │ │ ├── Info.png │ │ ├── Info@2x.png │ │ ├── Info@3x.png │ │ └── Contents.json │ ├── Menu.imageset │ │ ├── Menu.png │ │ ├── Menu@2x.png │ │ ├── Menu@3x.png │ │ └── Contents.json │ ├── Options.imageset │ │ ├── Options.png │ │ ├── Options@2x.png │ │ ├── Options@3x.png │ │ └── Contents.json │ ├── Twitter.imageset │ │ ├── Twitter.png │ │ ├── Twitter@2x.png │ │ ├── Twitter@3x.png │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Icon Dark.png │ │ ├── Icon Dark-1.png │ │ ├── Icon Dark-2.png │ │ ├── Icon Dark-3.png │ │ ├── Icon Dark-4.png │ │ ├── Icon Dark@2x-1.png │ │ ├── Icon Dark@2x-2.png │ │ ├── Icon Dark@2x-3.png │ │ ├── Icon Dark@2x-4.png │ │ ├── Icon Dark@2x.png │ │ ├── ItunesArtwork@2x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ ├── ArrowRight.imageset │ │ ├── ArrowRight.png │ │ ├── ArrowRight@2x.png │ │ ├── ArrowRight@3x.png │ │ └── Contents.json │ ├── LaunchLock.imageset │ │ ├── LaunchLock.png │ │ ├── LaunchLock@2x.png │ │ ├── LaunchLock@3x.png │ │ └── Contents.json │ └── Lock Circle.imageset │ │ ├── LockCircle.pdf │ │ └── Contents.json ├── Supporting Files │ ├── Icons.sketch │ ├── OffensiveWords │ │ ├── README │ │ └── offensive_words.plist │ ├── QuoteList.plist │ └── DomainList.plist ├── External │ ├── FontAwesome │ │ ├── fa-solid.ttf │ │ └── fa-regular.ttf │ ├── AppState.swift │ ├── ChainGetterViewController.swift │ └── Array+AppendIfNotNil.swift ├── README.md ├── Features │ ├── AppOnlyGlobals.swift │ ├── UIAccessabilityHints.swift │ ├── URL+Encode.swift │ ├── AppInfo.swift │ ├── RandomDomainName.swift │ ├── Date+DurationString.swift │ ├── UserOptions+CKOptions.swift │ ├── Globals.swift │ ├── AtomicInt.swift │ ├── SupportType.swift │ ├── CertificateReminder.swift │ └── RecentLookups.swift ├── User Interface │ ├── TableViewSection.swift │ ├── UIView+RoundedCorners.swift │ ├── OptionsButton.swift │ ├── ActionTipTarget.swift │ ├── GradientView.swift │ ├── InputTableViewCell.swift │ ├── TitleValueTableViewCell.swift │ └── UIHelper.swift ├── .swiftlint.yml ├── View Controllers │ ├── MoreTableViewController.swift │ ├── SplitViewController.swift │ ├── NoticeViewController.swift │ ├── GetterErrorTableViewController.swift │ ├── HTTPHeadersTableViewController.swift │ └── SANListTableViewController.swift ├── TLS Inspector.entitlements ├── Localization │ ├── README.md │ ├── Lang.swift │ └── UI Elements │ │ └── UIObject+Lang.swift ├── Settings.bundle │ ├── Root.plist │ └── idnacocoa.plist ├── AppDelegate.swift ├── SceneDelegate.swift └── Info.plist ├── Inspect Website ├── ExtensionAssets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ ├── Icon.png │ │ ├── Extension Icon1024.png │ │ ├── Extension Icon128.png │ │ ├── Extension Icon16.png │ │ ├── Extension Icon256.png │ │ ├── Extension Icon32-1.png │ │ ├── Extension Icon32.png │ │ ├── Extension Icon512.png │ │ ├── Extension Icon64.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Extension Icon256-1.png │ │ ├── Extension Icon512-1.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ └── Contents.json ├── .swiftlint.yaml ├── README.md ├── Show Certificate.entitlements └── Info.plist ├── .gitmodules ├── CertificateKitTests └── Info.plist ├── KNOWN_BUGS.md ├── lang.py ├── validate.sh ├── README.md ├── .gitignore ├── BUILDING.md └── TLS Inspector.xcodeproj └── xcshareddata └── xcschemes ├── CertificateKitTests.xcscheme ├── CertificateKit.xcscheme ├── TLS Inspector.xcscheme └── TLS Inspector (Release).xcscheme /CertificateKit/build/curl.want: -------------------------------------------------------------------------------- 1 | VERSION=7.79.1 -------------------------------------------------------------------------------- /CertificateKit/build/openssl.want: -------------------------------------------------------------------------------- 1 | VERSION=3.0.1 -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ecnepsnai] 4 | -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /TLS Inspector/Supporting Files/Icons.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Supporting Files/Icons.sketch -------------------------------------------------------------------------------- /TLS Inspector/External/FontAwesome/fa-solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/External/FontAwesome/fa-solid.ttf -------------------------------------------------------------------------------- /TLS Inspector/External/FontAwesome/fa-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/External/FontAwesome/fa-regular.ttf -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Bug.imageset/Bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Bug.imageset/Bug.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Info.imageset/Info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Info.imageset/Info.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Menu.imageset/Menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Menu.imageset/Menu.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Bug.imageset/Bug@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Bug.imageset/Bug@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Bug.imageset/Bug@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Bug.imageset/Bug@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Info.imageset/Info@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Info.imageset/Info@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Info.imageset/Info@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Info.imageset/Info@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Menu.imageset/Menu@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Menu.imageset/Menu@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Menu.imageset/Menu@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Menu.imageset/Menu@3x.png -------------------------------------------------------------------------------- /TLS Inspector/External/AppState.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class AppState { 4 | public static var getterViewController: ChainGetterViewController? 5 | } 6 | -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Options.imageset/Options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Options.imageset/Options.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Twitter.imageset/Twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Twitter.imageset/Twitter.png -------------------------------------------------------------------------------- /TLS Inspector/External/ChainGetterViewController.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | protocol ChainGetterViewController { 4 | func reloadWithQuery(query: String) 5 | } 6 | -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Options.imageset/Options@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Options.imageset/Options@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Options.imageset/Options@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Options.imageset/Options@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Twitter.imageset/Twitter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Twitter.imageset/Twitter@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Twitter.imageset/Twitter@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Twitter.imageset/Twitter@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-1.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-2.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-3.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark-4.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/ArrowRight.imageset/ArrowRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/ArrowRight.imageset/ArrowRight.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/LaunchLock.imageset/LaunchLock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/LaunchLock.imageset/LaunchLock.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-1.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-2.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-3.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x-4.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon Dark@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/ArrowRight.imageset/ArrowRight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/ArrowRight.imageset/ArrowRight@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/ArrowRight.imageset/ArrowRight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/ArrowRight.imageset/ArrowRight@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/LaunchLock.imageset/LaunchLock@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/LaunchLock.imageset/LaunchLock@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/LaunchLock.imageset/LaunchLock@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/LaunchLock.imageset/LaunchLock@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Lock Circle.imageset/LockCircle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/Lock Circle.imageset/LockCircle.pdf -------------------------------------------------------------------------------- /CertificateKit/Extensions/NSDate+ASN1_TIME.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSDate (ASN1_TIME) 4 | 5 | + (NSDate *) fromASN1_TIME:(const void *)asn; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/TLS Inspector/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon1024.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon128.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon16.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon256.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon32-1.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon32.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon512.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon64.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon256-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon256-1.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon512-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Extension Icon512-1.png -------------------------------------------------------------------------------- /Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dc/TLS-Inspector/master/Inspect Website/ExtensionAssets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /TLS Inspector/README.md: -------------------------------------------------------------------------------- 1 | # TLS Inspector 2 | 3 | This is the source for the main iOS application, TLS Inspector. 4 | 5 | TLS Inspector is a modern, Swift-based iOS app written with performance, size, and privacy in mind. 6 | -------------------------------------------------------------------------------- /TLS Inspector/External/Array+AppendIfNotNil.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension Array { 4 | mutating func maybeAppend(_ object: Element?) { 5 | if let o = object { 6 | self.append(o) 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /TLS Inspector/Features/AppOnlyGlobals.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | func OpenURLInSafari(_ urlString: String) { 4 | guard let url = URL(string: urlString) else { 5 | return 6 | } 7 | 8 | UIApplication.shared.openURL(url) 9 | } 10 | -------------------------------------------------------------------------------- /TLS Inspector/User Interface/TableViewSection.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class TableViewSection { 4 | public var title: String = "" 5 | public var footer: String = "" 6 | public var cells: [UITableViewCell] = [] 7 | public var tag: Int = 0 8 | } 9 | -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Lock Circle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LockCircle.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "CertificateKit/build/openssl-ios"] 2 | path = CertificateKit/build/openssl-ios 3 | url = https://github.com/tls-inspector/openssl-ios.git 4 | [submodule "CertificateKit/build/tiny-curl-ios"] 5 | path = CertificateKit/build/tiny-curl-ios 6 | url = https://github.com/tls-inspector/tiny-curl-ios 7 | -------------------------------------------------------------------------------- /TLS Inspector/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - identifier_name 3 | - trailing_comma 4 | - colon 5 | - type_body_length 6 | - function_body_length 7 | - opening_brace 8 | - line_length 9 | - file_length 10 | excluded: 11 | - 'AppDelegate.swift' 12 | - 'SceneDelegate.swift' 13 | - 'External/' 14 | -------------------------------------------------------------------------------- /Inspect Website/.swiftlint.yaml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - identifier_name 3 | - trailing_comma 4 | - colon 5 | - type_body_length 6 | - function_body_length 7 | - opening_brace 8 | - line_length 9 | - file_length 10 | excluded: 11 | - 'AppDelegate.swift' 12 | - 'SceneDelegate.swift' 13 | - 'External/' 14 | -------------------------------------------------------------------------------- /TLS Inspector/Features/UIAccessabilityHints.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @IBDesignable 4 | extension UIBarButtonItem { 5 | @IBInspectable var accessibilityUse: String { 6 | get { 7 | return self.accessibilityUse 8 | } 9 | set { 10 | self.accessibilityLabel = newValue 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Inspect Website/README.md: -------------------------------------------------------------------------------- 1 | # Inspect Website 2 | 3 | This is the source code for the "Show Certificate" share sheet extension. It was previously known as "Inspect Website" but has since changed names. 4 | 5 | The extension itself is very small, only consisting of one view controller which loads the controllers from the main application and hands things over to that. 6 | -------------------------------------------------------------------------------- /TLS Inspector/View Controllers/MoreTableViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class MoreTableViewController: UITableViewController { 4 | override func viewDidLoad() { 5 | super.viewDidLoad() 6 | } 7 | 8 | @IBAction func closeButton(_ sender: UIBarButtonItem) { 9 | self.dismiss(animated: true, completion: nil) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /TLS Inspector/Features/URL+Encode.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import IDNA 3 | 4 | extension URL { 5 | static func fromString(str: String) -> URL? { 6 | // Only use IDNA if we have to 7 | if !str.canBeConverted(to: .ascii) { 8 | return URL.init(unicodeString: str) 9 | } 10 | 11 | return URL.init(string: str) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /TLS Inspector/User Interface/UIView+RoundedCorners.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UIView { 4 | @IBInspectable var cornerRadius: CGFloat { 5 | get { 6 | return layer.cornerRadius 7 | } 8 | set { 9 | layer.cornerRadius = newValue 10 | layer.masksToBounds = newValue > 0 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /TLS Inspector/TLS Inspector.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.ecnepsnai.TLS-Inspector 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Inspect Website/Show Certificate.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.ecnepsnai.TLS-Inspector 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CertificateKit/validate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd openssl.framework/ 4 | if ! grep "$(shasum -a 512 openssl)" CHECKSUM >/dev/null; then 5 | >&2 echo "Checksum for OpenSSL did not match" 6 | exit 1 7 | fi 8 | cd ../ 9 | 10 | cd curl.framework/ 11 | if ! grep "$(shasum -a 512 curl)" CHECKSUM >/dev/null; then 12 | >&2 echo "Checksum for curl did not match" 13 | exit 1 14 | fi 15 | cd ../ 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Have an idea to make TLS Inspector even better? Let us know and we'll talk! 4 | 5 | --- 6 | 7 | **A short description of the feature you're requesting:** 8 | 9 | 10 | 11 | **How do you imagine this feature looking? Are there any examples of other implementations?** 12 | 13 | 14 | 15 | **How do you feel this feature will benefit TLS Inspector?** 16 | -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Bug.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Bug.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Bug@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Bug@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Info.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Info.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Info@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Info@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Menu.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Menu.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Menu@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Menu@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Options.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Options.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Options@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Options@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/Twitter.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Twitter.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Twitter@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Twitter@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/LaunchLock.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchLock.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchLock@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchLock@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TLS Inspector/Assets.xcassets/ArrowRight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ArrowRight.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "ArrowRight@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "ArrowRight@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /TLS Inspector/Supporting Files/OffensiveWords/README: -------------------------------------------------------------------------------- 1 | Please be advised that the `offensive_words.plist` file contains highly offensive, derogatory words. 2 | It is used by the application as an abuse-prevention mechanism to try and stem the tide of unwarranted hate-mail we 3 | receive through the feedback system. 4 | 5 | We apologize in advanced - and ask for your understanding that the inclusion of these words is meant to try and prevent 6 | hateful messages, not promote or encourage them. If you have any feedback or suggestions regarding this, please do not 7 | hesitate to file a bug. 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Found an issue with TLS Inspector? Let us know and we'll do our best to resolve it. 4 | 5 | --- 6 | 7 | **Affected Version:** 8 | 9 | 10 | 11 | **Is this a Test Flight version or the App Store version?** 12 | 13 | 14 | 15 | **Device and iOS Version:** 16 | 17 | 18 | 19 | **What steps will reproduce the problem?** 20 | 21 | 1. 22 | 2. 23 | 3. 24 | 25 | **What is the expected output?** 26 | 27 | 28 | 29 | **What do you see instead?** 30 | 31 | 32 | 33 | **Please provide any additional information below.** 34 | -------------------------------------------------------------------------------- /TLS Inspector/User Interface/OptionsButton.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class OptionsButton: UIButton { 4 | override init(frame: CGRect) { 5 | super.init(frame: frame) 6 | self.updateImage() 7 | } 8 | 9 | required init?(coder: NSCoder) { 10 | super.init(coder: coder) 11 | self.updateImage() 12 | } 13 | 14 | func updateImage() { 15 | guard let image = UIImage(named: "Options") else { 16 | return 17 | } 18 | self.setImage(image.withRenderingMode(.alwaysTemplate), for: .normal) 19 | self.imageView?.tintColor = UIColor.systemBlue 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /TLS Inspector/User Interface/ActionTipTarget.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class ActionTipTarget { 4 | private var view: UIView? 5 | private var barButtonItem: UIBarButtonItem? 6 | 7 | init(view: UIView) { 8 | self.view = view 9 | } 10 | 11 | init(barButtonItem: UIBarButtonItem) { 12 | self.barButtonItem = barButtonItem 13 | } 14 | 15 | public func attach(to: UIPopoverPresentationController?) { 16 | if let view = self.view { 17 | to?.sourceView = view 18 | } else if let barButtonItem = self.barButtonItem { 19 | to?.barButtonItem = barButtonItem 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /TLS Inspector/View Controllers/SplitViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class SplitViewController: UISplitViewController, UISplitViewControllerDelegate { 4 | override func viewDidLoad() { 5 | SPLIT_VIEW_CONTROLLER = self 6 | super.viewDidLoad() 7 | 8 | self.delegate = self 9 | preferredDisplayMode = .allVisible 10 | } 11 | 12 | func splitViewController(_ splitViewController: UISplitViewController, 13 | collapseSecondary secondaryViewController: UIViewController, 14 | onto primaryViewController: UIViewController) -> Bool { 15 | return true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /TLS Inspector/Supporting Files/OffensiveWords/offensive_words.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | hack 6 | warn 7 | breach 8 | warn 9 | stole 10 | warn 11 | password 12 | warn 13 | fuck 14 | prohibit 15 | shit 16 | prohibit 17 | nigger 18 | prohibit 19 | cunt 20 | prohibit 21 | 22 | 23 | -------------------------------------------------------------------------------- /TLS Inspector/Features/AppInfo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Class for getting meta information about the app 4 | class AppInfo { 5 | /// Get the current version of the app 6 | static func version() -> String { 7 | return (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) ?? "Unknown" 8 | } 9 | 10 | /// Get the current build number of the app 11 | static func build() -> String { 12 | return (Bundle.main.infoDictionary?[kCFBundleVersionKey as String] as? String) ?? "Unknown" 13 | } 14 | 15 | /// Get the bundle identifer of the app 16 | static func bundleName() -> String { 17 | return Bundle.main.bundleIdentifier ?? "Unknown" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /CertificateKitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TLS Inspector/Supporting Files/QuoteList.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Never send a boy to do a woman's job. 6 | Never fear, I is here. 7 | There is no right or wrong, just fun and boring. 8 | Kid, don't threaten me. There are worse things than death, and uh, I can do all of them. 9 | Boot Up or Shut Up! 10 | We have just gotten a wake-up call from the Nintendo Generation. 11 | His parents missed Woodstock, and he's been making up for it since. 12 | This is the end, my friend. Thank you for calling. 13 | 14 | 15 | -------------------------------------------------------------------------------- /CertificateKit/README.md: -------------------------------------------------------------------------------- 1 | # CertificateKit 2 | 3 | CertificateKit is a iOS framework designed exclusively for TLS Inspector to fetch 4 | detailed information about the certificates for any TLS server. 5 | 6 | Having this as a Framework allows us to write the more complex portions of code 7 | in Objective-C, letting us interface with libraries like OpenSSL, libCURL, 8 | and SecureTransport more easily than if it were done in Swift. 9 | 10 | # Requirements 11 | 12 | OpenSSL and libCURL are required, both are downloaded and compiled automatically 13 | by Xcode when you build the TLS Inspector project for the first time, or if the 14 | version changes. 15 | 16 | ## Updating OpenSSL or libCURL 17 | 18 | To update the version of OpenSSL or libCURL the library will use, update the 19 | associated .want file in the build directory with the exact version to use. -------------------------------------------------------------------------------- /CertificateKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /CertificateKit/CertificateKit.m: -------------------------------------------------------------------------------- 1 | #import "CertificateKit.h" 2 | #import 3 | #import 4 | 5 | @implementation CertificateKit 6 | 7 | + (NSString *) opensslVersion { 8 | NSString * version = [NSString stringWithUTF8String:OPENSSL_VERSION_TEXT]; // OpenSSL ... 9 | NSArray * versionComponents = [version componentsSeparatedByString:@" "]; 10 | return versionComponents[1]; 11 | } 12 | 13 | + (NSString *) libcurlVersion { 14 | return [NSString stringWithUTF8String:LIBCURL_VERSION]; 15 | } 16 | 17 | + (BOOL) isProxyConfigured { 18 | CFDictionaryRef proxySettings = CFNetworkCopySystemProxySettings(); 19 | const CFStringRef proxyCFString = (const CFStringRef)CFDictionaryGetValue(proxySettings, (const void*)kCFNetworkProxiesHTTPProxy); 20 | NSString * proxyString = (__bridge NSString *)(proxyCFString); 21 | return proxyString != nil && proxyString.length > 0; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /CertificateKit/CKResolvedAddress.m: -------------------------------------------------------------------------------- 1 | // 2 | // CKResolvedAddress.m 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2021 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKResolvedAddress.h" 23 | 24 | @implementation CKResolvedAddress 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /CertificateKit/Revocation/CKOCSPResponse.m: -------------------------------------------------------------------------------- 1 | // 2 | // CKOCSPResponse.m 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2018 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKOCSPResponse.h" 23 | 24 | @implementation CKOCSPResponse 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /CertificateKit/Revocation/CKCRLResponse.m: -------------------------------------------------------------------------------- 1 | // 2 | // CKCRLResponse.m 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2018 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKCRLResponse.h" 23 | 24 | @implementation CKCRLResponse 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /KNOWN_BUGS.md: -------------------------------------------------------------------------------- 1 | # Known Bugs 2 | 3 | The following is an unordered list of known issues with TLS Inspector that cannot or will not 4 | be fixed. 5 | 6 | If you believe you have a solution to any of these issues, please let us know! 7 | 8 | ### Can't Inspect IDN / "Punycode" Domain Names 9 | 10 | Issue: https://github.com/tls-inspector/tls-inspector/issues/43 11 | 12 | International Domain Names or "IDN", sometimes called "Punycode" domain names is an encoding 13 | scheme that enables full UTF-8 domain names despite DNS being ASCII. 14 | 15 | TLS Inspector does not support these domains in UTF-8 form, but does support the encoded name. 16 | 17 | For example: 18 | 19 | Does not work: `🔒🔒🔒.scotthelme.co.uk` 20 | Does work: `xn--lv8haa.scotthelme.co.uk` 21 | 22 | ### "Show Certificate" Share Sheet Action Sometimes Doesn't Show Up 23 | 24 | Issue: https://github.com/tls-inspector/tls-inspector/issues/204 25 | 26 | This is a known iOS and iPad OS bug. As of iOS 14 it is still unresolved. 27 | -------------------------------------------------------------------------------- /TLS Inspector/Supporting Files/DomainList.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aliexpress.com 6 | amazon.com 7 | ebay.com 8 | facebook.com 9 | google.com 10 | imgur.com 11 | instagram.com 12 | linkedin.com 13 | ellingson-minerals.com 14 | netflix.com 15 | reddit.com 16 | tlsinspector.com 17 | tumblr.com 18 | twitch.tv 19 | twitter.com 20 | wikipedia.org 21 | wordpress.com 22 | www.apple.com 23 | www.nsa.gov 24 | yahoo.com 25 | youtube.com 26 | 27 | 28 | -------------------------------------------------------------------------------- /CertificateKit/CKAlternateNameObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // CKAlternateNameObject.m 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2018 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKAlternateNameObject.h" 23 | 24 | @implementation CKAlternateNameObject 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKCertificateChainGetter.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKCertificateChainGetter.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2016 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKGetterTask.h" 23 | 24 | @interface CKCertificateChainGetter : CKGetterTask 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKCertificateChainGetter.m: -------------------------------------------------------------------------------- 1 | // 2 | // CKCertificateChainGetter.m 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2016 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKCertificateChainGetter.h" 23 | 24 | @implementation CKCertificateChainGetter 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /TLS Inspector/Features/RandomDomainName.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class RandomDomainName { 4 | private static var placeholderDomains: [String]? 5 | 6 | private static func loadDomains() { 7 | guard let domainListPath = Bundle.main.path(forResource: "DomainList", ofType: "plist") else { 8 | return 9 | } 10 | guard let domains = NSArray.init(contentsOfFile: domainListPath) as? [String] else { 11 | return 12 | } 13 | 14 | RandomDomainName.placeholderDomains = domains 15 | } 16 | 17 | /// Get a random domain name. Will lazily load the domain list on first call. 18 | /// - Returns: A domain name. Will always return a domain name, even if the list fails to load. 19 | public static func get() -> String? { 20 | objc_sync_enter(self) 21 | if placeholderDomains == nil { 22 | RandomDomainName.loadDomains() 23 | } 24 | objc_sync_exit(self) 25 | 26 | return placeholderDomains?.randomElement() ?? "tlsinspector.com" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKServerInfoGetter.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKServerInfoGetter.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2016 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKGetterTask.h" 23 | 24 | @interface CKServerInfoGetter : CKGetterTask 25 | 26 | @property (strong, nonatomic, nonnull) CKGetterParameters * parameters; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lang.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | 4 | langs = ['en', 'de'] 5 | 6 | for lang in langs: 7 | strings_path = "TLS Inspector/Localization/Strings/" + lang + ".plist" 8 | atomic_path = "TLS Inspector/Localization/Strings/._" + lang + ".plist" 9 | 10 | subprocess.call(["plutil", "-convert", "binary1", strings_path]) 11 | subprocess.call(["plutil", "-convert", "xml1", strings_path]) 12 | 13 | line_num = 0 14 | with open(strings_path, 'r') as r: 15 | with open(atomic_path, 'w') as w: 16 | line = r.readline() 17 | while line: 18 | # Ignore the first 4 lines of the file (the schema declaration) 19 | if line_num <= 4: 20 | w.write(line) 21 | else: 22 | line = line.replace("'", "'") 23 | line = line.replace('"', """) 24 | w.write(line) 25 | line_num += 1 26 | line = r.readline() 27 | 28 | os.remove(strings_path) 29 | os.rename(atomic_path, strings_path) 30 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKGetterTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // CKGetterTask.m 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2016 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKGetterTask.h" 23 | 24 | @implementation CKGetterTask 25 | 26 | - (void) performTaskWithParameters:(CKGetterParameters *)parameters {} 27 | - (BOOL) isFinished { return NO; } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKOpenSSLCertificateChainGetter.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKOpenSSLCertificateChainGetter.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2019 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKGetterTask.h" 23 | #import "CKCertificateChainGetter.h" 24 | 25 | @interface CKOpenSSLCertificateChainGetter : CKCertificateChainGetter 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /TLS Inspector/User Interface/GradientView.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @IBDesignable 4 | class GradientView: UIView { 5 | 6 | @IBInspectable var startColor: UIColor = .black { didSet { updateColors() }} 7 | @IBInspectable var endColor: UIColor = .white { didSet { updateColors() }} 8 | 9 | override public class var layerClass: AnyClass { CAGradientLayer.self } 10 | 11 | // swiftlint:disable force_cast 12 | var gradientLayer: CAGradientLayer { layer as! CAGradientLayer } 13 | // swiftlint:enable force_cast 14 | 15 | func updatePoints() { 16 | gradientLayer.startPoint = .init(x: 1, y: 0) 17 | gradientLayer.endPoint = .init(x: 0, y: 1) 18 | } 19 | func updateLocations() { 20 | gradientLayer.locations = [0.0 as NSNumber, 1.0 as NSNumber] 21 | } 22 | func updateColors() { 23 | gradientLayer.colors = [startColor.cgColor, endColor.cgColor] 24 | } 25 | override public func layoutSubviews() { 26 | super.layoutSubviews() 27 | updatePoints() 28 | updateLocations() 29 | updateColors() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKSecureTransportCertificateChainGetter.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKSecureTransportCertificateChainGetter.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2019 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKGetterTask.h" 23 | #import "CKCertificateChainGetter.h" 24 | 25 | @interface CKSecureTransportCertificateChainGetter : CKCertificateChainGetter 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /CertificateKit/CKCurlCommon.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKCurlCommon.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2020 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | #include 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | @interface CKCurlCommon : NSObject 28 | 29 | + (CKCurlCommon *) sharedInstance; 30 | - (CURL *) curlHandle; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /CertificateKit/CKEVOIDList.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKEVOIDList.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2020 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | 24 | NS_ASSUME_NONNULL_BEGIN 25 | 26 | @interface CKEVOIDList : NSObject 27 | 28 | @property (strong, nonatomic, nonnull, readonly) NSDictionary * oidMap; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /CertificateKit/CKTypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKTypes.h 3 | // CertificateKit 4 | // 5 | // Created by Ian Spence on 2021-04-05. 6 | // Copyright © 2021 Ian Spence. All rights reserved. 7 | // 8 | 9 | #ifndef CKTypes_h 10 | #define CKTypes_h 11 | 12 | /** 13 | Possible options for the crypto engine used to chain getters 14 | */ 15 | typedef enum __CRYPTO_ENGINE { 16 | /** 17 | The modern Apple getter using the Network Framework 18 | */ 19 | CRYPTO_ENGINE_NETWORK_FRAMEWORK = 0, 20 | /** 21 | The legacy Apple getter using SecureTransport 22 | */ 23 | CRYPTO_ENGINE_SECURE_TRANSPORT = 1, 24 | /** 25 | The OpenSSL getter 26 | */ 27 | CRYPTO_ENGINE_OPENSSL = 2, 28 | } CRYPTO_ENGINE; 29 | 30 | /** 31 | Possible options for IP versions 32 | */ 33 | typedef enum __IP_VERSIONS { 34 | /** 35 | Let the system choose which IP version to use 36 | */ 37 | IP_VERSION_AUTOMATIC = 0, 38 | /** 39 | Prefer IPv4 connections 40 | */ 41 | IP_VERSION_IPV4 = 1, 42 | /** 43 | Prefer IPv6 connections 44 | */ 45 | IP_VERSION_IPV6 = 2, 46 | } IP_VERSION; 47 | 48 | #endif /* CKTypes_h */ 49 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKNetworkCertificateChainGetter.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKNetworkCertificateChainGetter.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2020 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import "CKCertificateChainGetter.h" 23 | 24 | @interface CKNetworkCertificateChainGetter : CKCertificateChainGetter 25 | 26 | - (void) performTaskWithParameters:(CKGetterParameters *)parameters API_AVAILABLE(ios(12.0)); 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /TLS Inspector/Features/Date+DurationString.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class DateDuration { 4 | static func between(first: Date, second: Date) -> String { 5 | var units: [Calendar.Component] = [.year, .month, .day, .hour, .minute] 6 | if second.timeIntervalSince(first) > 2629800 { 7 | units = [.year, .month, .day] 8 | } 9 | 10 | let components = Calendar.current.dateComponents(Set(units), from: first, to: second) 11 | 12 | var results: [String] = [] 13 | for unit in units { 14 | guard let value = components.value(for: unit) else { 15 | continue 16 | } 17 | if value == 0 { 18 | continue 19 | } 20 | if value == 1 { 21 | results.append(lang(key: "{amount} {date_unit}", args: [String(value), lang(key: "date_unit_singular::\(unit)")])) 22 | } else { 23 | results.append(lang(key: "{amount} {date_unit}", args: [String(value), lang(key: "date_unit_plural::\(unit)")])) 24 | } 25 | } 26 | 27 | return results.joined(separator: " ") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /TLS Inspector/Localization/README.md: -------------------------------------------------------------------------------- 1 | # Localization 2 | 3 | TLS Inspector supports multiple languages through the code located here. 4 | 5 | # Strings 6 | 7 | Most of the text seen in the TLS Inspector application, such as labels on buttons and dialog messages, are localized strings which are loaded in from a dictionary at launch time. 8 | 9 | Items are mapped from a fixed key to the translated string. The key is typically the English translation, however it may be an identifier if the string is long, or the key is determined by a variable. 10 | 11 | ## String Variables 12 | 13 | Sometimes strings need to have variables inserted at specific locations within them. For example with `"Hello {name}"` we would need to replace `{name}` with a value. 14 | 15 | To identify a variable within a translated string you specify the index of that variable, for example: `"Hello {0}"`. In code, we pass an array of values that are populated into the string by their index. The order of the variables does not matter in the translated string, only that the index matches that of the array. For example, this is perfectly valid: `"My name is {1}, are you {0}?"`. Variables can be repeated multiple times. 16 | -------------------------------------------------------------------------------- /validate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | HAS_MISSING_KEY=0 4 | function check_lang() { 5 | FILE=$1 6 | KEY=$2 7 | 8 | grep "${KEY}" 'TLS Inspector/Localization/Strings/en.plist' >/dev/null 9 | if [ $? != 0 ]; then 10 | HAS_MISSING_KEY=1 11 | echo $FILE:$KEY 12 | fi 13 | } 14 | 15 | LANG_CALLS=$(egrep -o 'lang\(key: "[^"]+"' **/*.swift) 16 | LAST_FILE="" 17 | while IFS= read -r STRING; do 18 | if [[ $STRING == lang* ]]; then 19 | STRING=$LAST_FILE:$STRING 20 | fi 21 | 22 | FILE=$(cut -d ':' -f 1 <<< "$STRING") 23 | LAST_FILE=$FILE 24 | LANG=$(cut -d ':' -f 2- <<< "$STRING") 25 | LANG=$(echo "${LANG}" | sed 's/lang(key: "//g') 26 | LANG=$(echo "${LANG}" | sed 's/&/&/g') 27 | LANG=${LANG:0:-1} 28 | check_lang "${FILE}" "${LANG}" 29 | done <<< "$LANG_CALLS" 30 | 31 | STORYBOARD_ATTRIBUTES=$(egrep 'userDefinedRuntimeAttribute type="string"' **/*.storyboard) 32 | while IFS= read -r STRING; do 33 | FILE=$(cut -d ':' -f 1 <<< "$STRING") 34 | LANG=$(cut -d ':' -f 2- <<< "$STRING") 35 | LANG=$(echo "${LANG}" | egrep -o 'value=".+"') 36 | LANG=$(echo "${LANG}" | sed 's/value="//g') 37 | LANG=${LANG:0:-1} 38 | check_lang "${FILE}" "${LANG}" 39 | done <<< "$STORYBOARD_ATTRIBUTES" 40 | 41 | if [[ $HAS_MISSING_KEY == 1 ]]; then 42 | exit 1 43 | fi 44 | -------------------------------------------------------------------------------- /TLS Inspector/Features/UserOptions+CKOptions.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import CertificateKit 3 | 4 | extension UserOptions { 5 | public static func inspectParameters(hostAddress: String) -> CKInspectParameters { 6 | let parameters = CKInspectParameters() 7 | 8 | parameters.hostAddress = hostAddress 9 | parameters.queryServerInfo = UserOptions.getHTTPHeaders 10 | parameters.checkOCSP = UserOptions.queryOCSP 11 | parameters.checkCRL = UserOptions.checkCRL 12 | switch UserOptions.cryptoEngine { 13 | case .NetworkFramework: 14 | parameters.cryptoEngine = CRYPTO_ENGINE_NETWORK_FRAMEWORK 15 | case .SecureTransport: 16 | parameters.cryptoEngine = CRYPTO_ENGINE_SECURE_TRANSPORT 17 | case .OpenSSL: 18 | parameters.cryptoEngine = CRYPTO_ENGINE_OPENSSL 19 | } 20 | parameters.ciphers = UserOptions.preferredCiphers 21 | 22 | switch UserOptions.ipVersion { 23 | case .Automatic: 24 | parameters.ipVersion = IP_VERSION_AUTOMATIC 25 | case .IPv4: 26 | parameters.ipVersion = IP_VERSION_IPV4 27 | case .IPv6: 28 | parameters.ipVersion = IP_VERSION_IPV6 29 | } 30 | 31 | return parameters 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /CertificateKit/Revocation/CKCRLManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKCRLManager.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2017 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | #import "CKCertificate.h" 24 | #import "CKCRLResponse.h" 25 | 26 | @interface CKCRLManager : NSObject 27 | 28 | + (CKCRLManager * _Nonnull) sharedManager; 29 | - (void) queryCertificate:(CKCertificate * _Nonnull)certificate issuer:(CKCertificate * _Nonnull)issuer response:(CKCRLResponse * _Nullable * _Nonnull)response error:(NSError * _Nullable * _Nonnull)error; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /CertificateKit/Revocation/CKOCSPManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKOCSPManager.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2018 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | #import "CKCertificate.h" 24 | #import "CKOCSPResponse.h" 25 | 26 | @interface CKOCSPManager : NSObject 27 | 28 | + (CKOCSPManager * _Nonnull) sharedManager; 29 | - (void) queryCertificate:(CKCertificate * _Nonnull)certificate issuer:(CKCertificate * _Nonnull)issuer response:(CKOCSPResponse * _Nullable * _Nonnull)response error:(NSError * _Nullable * _Nonnull)error; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /TLS Inspector/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Type 9 | PSGroupSpecifier 10 | Title 11 | Open Source Licenses 12 | 13 | 14 | Type 15 | PSChildPaneSpecifier 16 | Title 17 | TLS Inspector 18 | File 19 | tlsinspector 20 | 21 | 22 | Type 23 | PSChildPaneSpecifier 24 | Title 25 | OpenSSL 26 | File 27 | openssl 28 | 29 | 30 | Type 31 | PSChildPaneSpecifier 32 | Title 33 | tiny-curl 34 | File 35 | tinycurl 36 | 37 | 38 | Type 39 | PSChildPaneSpecifier 40 | Title 41 | IDNA-Cocoa 42 | File 43 | idnacocoa 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /CertificateKit/CKAlternateNameObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKAlternateNameObject.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2018 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | 24 | @interface CKAlternateNameObject : NSObject 25 | 26 | typedef NS_ENUM(NSUInteger, AlternateNameType) { 27 | AlternateNameTypeDNS, 28 | AlternateNameTypeOther, 29 | AlternateNameTypeEmail, 30 | AlternateNameTypeDirectory, 31 | AlternateNameTypeIP, 32 | AlternateNameTypeURI, 33 | }; 34 | 35 | @property (nonatomic) AlternateNameType type; 36 | @property (strong, nonatomic) NSString * value; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | TLS Inspector welcomes all members wanting to get involved with the project, regardless of your technical skill level. 4 | 5 | Ways to contribute: 6 | 7 | # Code 8 | 9 | We welcome the opportunity to let anybody, regardless of skill level, contribute to the code base of TLS Inspector. 10 | Fork the project, and submit a pull request and we'll go from there! 11 | 12 | # Reporting Bugs, Answering Questions, and Suggesting ideas 13 | 14 | We strive to be a welcoming and friendly community. All bug reports, questions, and suggestions are considered and will be addressed. 15 | 16 | [Report an issue or ask a question](https://github.com/certificate-helper/TLS-Inspector/issues/new/choose). [View open issues](https://github.com/certificate-helper/TLS-Inspector/issues). 17 | 18 | # Testing Beta Versions 19 | 20 | Public beta testing allows us to release a higher quality product and lets you play with new features before anybody else. 21 | 22 | [Sign up to release beta builds](https://tlsinspector.com/beta.html) 23 | 24 | ## Conduct 25 | 26 | All contributors of the Certificate Helper project, which includes but is not limited to Certificate Inspect and CHCertificate, must follow our [Code of Conduct](https://github.com/certificate-helper/TLS-Inspector/blob/master/.github/CODE_OF_CONDUCT.md). These rules apply to **every member**, including project leaders. 27 | -------------------------------------------------------------------------------- /TLS Inspector/View Controllers/NoticeViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class NoticeViewController: UIViewController { 4 | @IBOutlet weak var textView: UITextView! 5 | @IBOutlet weak var dismissButton: UIButton! 6 | 7 | override func viewDidLoad() { 8 | super.viewDidLoad() 9 | 10 | var forgroundColor = UIColor.black 11 | if #available(iOS 13, *) { 12 | forgroundColor = UIColor.label 13 | } 14 | let noticeText = NSMutableAttributedString(string: lang(key:"first_run_notice"), 15 | attributes: [ 16 | NSAttributedString.Key.foregroundColor : forgroundColor, 17 | NSAttributedString.Key.font : UIFont.systemFont(ofSize: 18.0) 18 | ]) 19 | let foundRange = noticeText.mutableString.range(of: lang(key: "Apple Support")) 20 | noticeText.addAttribute(NSAttributedString.Key.link, value: "https://support.apple.com/", range: foundRange) 21 | noticeText.addAttribute(NSAttributedString.Key.font, value: UIFont.boldSystemFont(ofSize: 18.0), range: foundRange) 22 | 23 | self.textView.attributedText = noticeText 24 | } 25 | 26 | @IBAction func dismissButtonPressed(_ sender: UIButton) { 27 | self.dismiss(animated: true, completion: nil) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /TLS Inspector/Features/Globals.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import CertificateKit 3 | 4 | // swiftlint:disable identifier_name 5 | var CERTIFICATE_CHAIN: CKCertificateChain? 6 | var SERVER_INFO: CKServerInfo? 7 | var SERVER_ERROR: Error? 8 | var CURRENT_CERTIFICATE: Int = 0 9 | var SPLIT_VIEW_CONTROLLER: UISplitViewController? 10 | var VIEW_CLOSE_NOTIFICATION: Notification.Name = Notification.Name("🏳️‍🌈") 11 | var RELOAD_RECENT_NOTIFICATION: Notification.Name = Notification.Name("🇹🇼") 12 | var SHOW_TIPS_NOTIFICATION: Notification.Name = Notification.Name("🇭🇰") 13 | // swiftlint:enable identifier_name 14 | 15 | let AppDefaults = UserDefaults(suiteName: "group.com.ecnepsnai.TLS-Inspector")! 16 | 17 | func RunOnMain(_ closure: @escaping () -> Void) { 18 | DispatchQueue.main.async(execute: closure) 19 | } 20 | 21 | func NewError(description: String) -> Error { 22 | return NSError(domain: "io.ecn.tlsinspector", code: 500, 23 | userInfo: [NSLocalizedDescriptionKey: description]) as Error 24 | } 25 | 26 | func LogError(_ message: String) { 27 | CKLogging.sharedInstance().writeError(message) 28 | } 29 | 30 | func LogWarn(_ message: String) { 31 | CKLogging.sharedInstance().writeWarn(message) 32 | } 33 | 34 | func LogInfo(_ message: String) { 35 | CKLogging.sharedInstance().writeInfo(message) 36 | } 37 | 38 | func LogDebug(_ message: String) { 39 | CKLogging.sharedInstance().writeDebug(message) 40 | } 41 | -------------------------------------------------------------------------------- /CertificateKit/CKResolvedAddress.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKResolvedAddress.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2021 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | #import "CKTypes.h" 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | @interface CKResolvedAddress : NSObject 28 | 29 | /** 30 | The original query that was sent to the resolver. 31 | */ 32 | @property (strong, nonatomic, nonnull) NSString * query; 33 | 34 | /** 35 | The result address (IPv4 or IPv6) that the query resolved to. 36 | */ 37 | @property (strong, nonatomic, nonnull) NSString * address; 38 | 39 | /** 40 | The IP version for the resolved address. 41 | */ 42 | @property (nonatomic) IP_VERSION version; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /CertificateKit/CKResolver.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKResolver.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2021 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | #import "CKResolvedAddress.h" 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | @interface CKResolver : NSObject 28 | 29 | + (CKResolver * _Nonnull) sharedResolver; 30 | - (CKResolvedAddress * _Nullable) getAddressFromDomain:(NSString * _Nonnull)domain withError:(NSError * _Nullable *)error; 31 | - (CKResolvedAddress * _Nullable) getIPv4AddressFromDomain:(NSString * _Nonnull)domain withError:(NSError * _Nullable *)error; 32 | - (CKResolvedAddress * _Nullable) getIPv6AddressFromDomain:(NSString * _Nonnull)domain withError:(NSError * _Nullable *)error; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /TLS Inspector/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @UIApplicationMain 4 | class AppDelegate: UIResponder, UIApplicationDelegate { 5 | var window: UIWindow? 6 | 7 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 8 | // Override point for customization after application launch. 9 | UserOptions.loadDefaults() 10 | return true 11 | } 12 | 13 | // MARK: UISceneSession Lifecycle 14 | @available(iOS 13.0, *) 15 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 16 | // Called when a new scene session is being created. 17 | // Use this method to select a configuration to create the new scene with. 18 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 19 | } 20 | 21 | @available(iOS 13.0, *) 22 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 23 | // Called when the user discards a scene session. 24 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 25 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /CertificateKit/Getters/CKGetterTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKGetterTask.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2016 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | #import "CKGetterParameters.h" 24 | 25 | @interface CKGetterTask : NSObject 26 | 27 | - (void) performTaskWithParameters:(CKGetterParameters *)parameters; 28 | 29 | @property (strong, nonatomic) id delegate; 30 | @property (nonatomic) NSUInteger tag; 31 | @property (nonatomic) BOOL finished; 32 | @property (nonatomic) BOOL successful; 33 | 34 | @end 35 | 36 | @protocol CKGetterTaskDelegate 37 | 38 | @required 39 | 40 | - (void) getter:(CKGetterTask *)getter finishedTaskWithResult:(id)data; 41 | - (void) getter:(CKGetterTask *)getter failedTaskWithError:(NSError *)error; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /TLS Inspector/View Controllers/GetterErrorTableViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class GetterErrorTableViewController: UITableViewController { 4 | public var chainError: Error? 5 | public var serverError: Error? 6 | var sections: [TableViewSection] = [] 7 | 8 | override func viewDidLoad() { 9 | super.viewDidLoad() 10 | 11 | let section = TableViewSection() 12 | if let error = self.chainError { 13 | section.cells.append(TitleValueTableViewCell.Cell(title: lang(key: "Certificate Chain"), 14 | value: error.localizedDescription)) 15 | } 16 | if let error = self.serverError { 17 | section.cells.append(TitleValueTableViewCell.Cell(title: lang(key: "Server Info"), 18 | value: error.localizedDescription)) 19 | } 20 | self.sections.append(section) 21 | } 22 | 23 | // MARK: - Table view data source 24 | override func numberOfSections(in tableView: UITableView) -> Int { 25 | return self.sections.count 26 | } 27 | 28 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 29 | return self.sections[section].cells.count 30 | } 31 | 32 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 33 | return self.sections[indexPath.section].cells[indexPath.row] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TLS Inspector 2 | 3 | [![Download](https://img.shields.io/itunes/v/1100539810.svg?label=iTunes%20App%20Store&style=flat-square)](https://tlsinspector.com/download.html) 4 | [![LICENSE](https://img.shields.io/github/license/tls-inspector/tls-inspector.svg?style=flat-square)](https://github.com/ecnepsnai/ds/blob/app-store/LICENSE) 5 | [![Follow](https://img.shields.io/twitter/follow/tlsinspector?style=flat-square)](https://twitter.com/tlsinspector) 6 | 7 | TLS Inspector Screenshots 8 | 9 | **[Learn More about TLS Inspector »](https://tlsinspector.com/about.html)** 10 | 11 | # Project Structure 12 | 13 | This is the Git repository for the TLS Inspector iOS application. You will find the source code for the application's front-end interface in `TLS Inspector/`. The share-extension is located in `Inspect Website/`. The back-end source used for fetching and examining certificate data is located in `CertificateKit/`. 14 | 15 | # Building 16 | 17 | Please see [BUILDING](https://github.com/tls-inspector/tls-inspector/blob/app-store/BUILDING.md) for information on how to build TLS Inspector yourself. 18 | 19 | # Sharing & Licensing 20 | 21 | The TLS Inspector application, which includes the front-end application and the share extension are GPLv3 licensed. 22 | 23 | The back-end framework, CertificateKit, is LGPLv3 licensed. 24 | 25 | The name "TLS Inspector" and associated brand imagery such the TLS Inspector logo are copyrighted material and may not be reused without permission. 26 | -------------------------------------------------------------------------------- /CertificateKit/CKSocketUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKSocketUtils.h 3 | // 4 | // LGPLv3 5 | // 6 | // Copyright (c) 2020 Ian Spence 7 | // https://tlsinspector.com/github.html 8 | // 9 | // This library is free software: you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser Public License as published by 11 | // the Free Software Foundation, either version 3 of the License, or 12 | // (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, 15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | // GNU Lesser Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser Public License 20 | // along with this library. If not, see . 21 | 22 | #import 23 | @import Network; 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | /// Utilities for working with sockets 28 | @interface CKSocketUtils : NSObject 29 | 30 | /// Get the servers (peer) IP address in human-readable format for the given socket 31 | /// @param socket The sockets file descriptor 32 | + (NSString * _Nullable) remoteAddressForSocket:(int)socket; 33 | 34 | 35 | /// Get the servers (peer) IP address in human-readable format for the given endpoint 36 | /// @param endpoint The remote endpoint 37 | + (NSString * _Nullable) remoteAddressFromEndpoint:(nw_endpoint_t)endpoint API_AVAILABLE(ios(12.0)); 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | /build/ 7 | /DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | .DS_Store 55 | defines.pch 56 | *.xcworkspacedata 57 | /TLS Inspector.xcodeproj/project.xcworkspace 58 | 59 | # OpenSSL and cURL Frameworks 60 | /CertificateKit/openssl.framework 61 | /CertificateKit/curl.framework 62 | -------------------------------------------------------------------------------- /CertificateKit/build/build-curl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Because we run this script from a Xcode build phase, it adds a million and one of it's own 5 | # environment variables, which mess with compiling the library. To get around this, we run 6 | # this script without any variables (env -i