@appzung/react-native-code-push 9.0.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CodePush.podspec +1 -0
- package/LICENSE.md +1 -1
- package/README.md +169 -329
- package/android/app/.gradle/config.properties +2 -0
- package/android/app/build.gradle +63 -19
- package/android/app/local.properties +8 -0
- package/android/app/src/main/AndroidManifest.xml +2 -3
- package/android/app/src/main/AndroidManifestNew.xml +3 -0
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePush.java +35 -97
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushConstants.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInstallMode.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidUpdateException.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushMalformedDataException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java +37 -8
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNotInitializedException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushTelemetryManager.java +14 -14
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUnknownException.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateManager.java +3 -3
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateState.java +2 -2
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateUtils.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUtils.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgress.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgressCallback.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/FileUtils.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/ReactInstanceHolder.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/SettingsManager.java +1 -1
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/TLSSocketFactory.java +1 -1
- package/android/build.gradle +1 -11
- package/android/codepush.gradle +3 -3
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradle.properties +4 -20
- package/docs/advanced-usage.md +56 -0
- package/docs/api-android.md +16 -77
- package/docs/api-ios.md +9 -21
- package/docs/api-js.md +184 -219
- package/docs/code-signing.md +62 -0
- package/docs/migrating-to-v10.md +31 -0
- package/docs/setup-android.md +54 -463
- package/docs/setup-ios.md +37 -208
- package/docs/setup-windows.md +8 -74
- package/ios/CodePush/CodePush.h +4 -4
- package/ios/CodePush/CodePush.m +21 -65
- package/ios/CodePush/CodePushConfig.m +14 -11
- package/ios/CodePush/CodePushPackage.m +60 -60
- package/ios/CodePush/CodePushTelemetryManager.m +13 -13
- package/ios/CodePush.xcodeproj/project.pbxproj +1 -562
- package/lib/commonjs/CodePush.js +90 -0
- package/lib/commonjs/CodePush.js.map +1 -0
- package/lib/commonjs/allowRestart.js +12 -0
- package/lib/commonjs/allowRestart.js.map +1 -0
- package/lib/commonjs/checkForUpdates.js +105 -0
- package/lib/commonjs/checkForUpdates.js.map +1 -0
- package/lib/commonjs/clearUpdates.js +15 -0
- package/lib/commonjs/clearUpdates.js.map +1 -0
- package/lib/commonjs/disallowRestart.js +12 -0
- package/lib/commonjs/disallowRestart.js.map +1 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js +25 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js +21 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/InstallMode.enum.js +35 -0
- package/lib/commonjs/enums/InstallMode.enum.js.map +1 -0
- package/lib/commonjs/enums/SyncStatus.enum.js +53 -0
- package/lib/commonjs/enums/SyncStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/UpdateState.enum.js +29 -0
- package/lib/commonjs/enums/UpdateState.enum.js.map +1 -0
- package/lib/commonjs/getUpdateMetadata.js +25 -0
- package/lib/commonjs/getUpdateMetadata.js.map +1 -0
- package/lib/commonjs/index.js +195 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internals/AcquisitionSdk.js +9 -0
- package/lib/commonjs/internals/AcquisitionSdk.js.map +1 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js +29 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js +8 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js +6 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js +49 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/getConfiguration.js +15 -0
- package/lib/commonjs/internals/getConfiguration.js.map +1 -0
- package/lib/commonjs/internals/getCurrentPackage.js +12 -0
- package/lib/commonjs/internals/getCurrentPackage.js.map +1 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js +49 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js +62 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/commonjs/internals/types.js +6 -0
- package/lib/commonjs/internals/types.js.map +1 -0
- package/lib/commonjs/internals/utils/log.js +11 -0
- package/lib/commonjs/internals/utils/log.js.map +1 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js +50 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/commonjs/internals/version.js +9 -0
- package/lib/commonjs/internals/version.js.map +1 -0
- package/lib/commonjs/notifyAppReady.js +83 -0
- package/lib/commonjs/notifyAppReady.js.map +1 -0
- package/lib/commonjs/reactNative.d.js +2 -0
- package/lib/commonjs/reactNative.d.js.map +1 -0
- package/lib/commonjs/restartApp.js +16 -0
- package/lib/commonjs/restartApp.js.map +1 -0
- package/lib/commonjs/sync.js +219 -0
- package/lib/commonjs/sync.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/CodePush.js +84 -0
- package/lib/module/CodePush.js.map +1 -0
- package/lib/module/allowRestart.js +9 -0
- package/lib/module/allowRestart.js.map +1 -0
- package/lib/module/checkForUpdates.js +101 -0
- package/lib/module/checkForUpdates.js.map +1 -0
- package/lib/module/clearUpdates.js +12 -0
- package/lib/module/clearUpdates.js.map +1 -0
- package/lib/module/disallowRestart.js +9 -0
- package/lib/module/disallowRestart.js.map +1 -0
- package/lib/module/enums/CheckFrequency.enum.js +21 -0
- package/lib/module/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/module/enums/DeploymentStatus.enum.js +17 -0
- package/lib/module/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/module/enums/InstallMode.enum.js +32 -0
- package/lib/module/enums/InstallMode.enum.js.map +1 -0
- package/lib/module/enums/SyncStatus.enum.js +49 -0
- package/lib/module/enums/SyncStatus.enum.js.map +1 -0
- package/lib/module/enums/UpdateState.enum.js +26 -0
- package/lib/module/enums/UpdateState.enum.js.map +1 -0
- package/lib/module/getUpdateMetadata.js +21 -0
- package/lib/module/getUpdateMetadata.js.map +1 -0
- package/lib/module/index.js +19 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internals/AcquisitionSdk.js +5 -0
- package/lib/module/internals/AcquisitionSdk.js.map +1 -0
- package/lib/module/internals/LocalPackageImplementation.js +24 -0
- package/lib/module/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js +4 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js +4 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/module/internals/RemotePackageImplementation.js +44 -0
- package/lib/module/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/module/internals/getConfiguration.js +11 -0
- package/lib/module/internals/getConfiguration.js.map +1 -0
- package/lib/module/internals/getCurrentPackage.js +8 -0
- package/lib/module/internals/getCurrentPackage.js.map +1 -0
- package/lib/module/internals/getPromisifiedSdk.js +45 -0
- package/lib/module/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js +58 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/module/internals/types.js +4 -0
- package/lib/module/internals/types.js.map +1 -0
- package/lib/module/internals/utils/log.js +7 -0
- package/lib/module/internals/utils/log.js.map +1 -0
- package/lib/module/internals/utils/request-fetch-adapter.js +46 -0
- package/lib/module/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/module/internals/version.js +5 -0
- package/lib/module/internals/version.js.map +1 -0
- package/lib/module/notifyAppReady.js +79 -0
- package/lib/module/notifyAppReady.js.map +1 -0
- package/lib/module/reactNative.d.js +2 -0
- package/lib/module/reactNative.d.js.map +1 -0
- package/lib/module/restartApp.js +13 -0
- package/lib/module/restartApp.js.map +1 -0
- package/lib/module/sync.js +215 -0
- package/lib/module/sync.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts +24 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts +16 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts +7 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/sync.d.ts +17 -0
- package/lib/typescript/commonjs/src/sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +196 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/CodePush.d.ts +24 -0
- package/lib/typescript/module/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/module/src/allowRestart.d.ts +5 -0
- package/lib/typescript/module/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +17 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/types.d.ts +16 -0
- package/lib/typescript/module/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/version.d.ts +2 -0
- package/lib/typescript/module/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/module/src/restartApp.d.ts +7 -0
- package/lib/typescript/module/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/module/src/sync.d.ts +17 -0
- package/lib/typescript/module/src/sync.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +196 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/package.json +79 -29
- package/react-native.config.js +8 -8
- package/scripts/generateBundledResourcesHash.js +1 -1
- package/scripts/getFilesInFolder.js +1 -1
- package/scripts/recordFilesBeforeBundleCommand.js +1 -1
- package/src/CodePush.tsx +108 -0
- package/src/allowRestart.ts +6 -0
- package/src/checkForUpdates.ts +109 -0
- package/src/clearUpdates.ts +9 -0
- package/src/disallowRestart.ts +6 -0
- package/src/enums/CheckFrequency.enum.ts +19 -0
- package/src/enums/DeploymentStatus.enum.ts +14 -0
- package/src/enums/InstallMode.enum.ts +31 -0
- package/src/enums/SyncStatus.enum.ts +53 -0
- package/src/enums/UpdateState.enum.ts +24 -0
- package/src/getUpdateMetadata.ts +23 -0
- package/src/index.ts +18 -0
- package/src/internals/AcquisitionSdk.ts +3 -0
- package/src/internals/LocalPackageImplementation.ts +45 -0
- package/src/internals/NativeRNAppZungCodePushModule.ts +3 -0
- package/src/internals/RNAppZungCodePushModuleSpec.ts +54 -0
- package/src/internals/RemotePackageImplementation.ts +69 -0
- package/src/internals/getConfiguration.ts +12 -0
- package/src/internals/getCurrentPackage.ts +6 -0
- package/src/internals/getPromisifiedSdk.ts +72 -0
- package/src/internals/shouldUpdateBeIgnored.ts +76 -0
- package/src/internals/types.ts +18 -0
- package/{logging.js → src/internals/utils/log.ts} +1 -3
- package/src/internals/utils/request-fetch-adapter.ts +58 -0
- package/src/internals/version.ts +2 -0
- package/src/notifyAppReady.ts +94 -0
- package/src/reactNative.d.ts +34 -0
- package/src/restartApp.ts +10 -0
- package/src/sync.ts +272 -0
- package/src/types.ts +237 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +29 -12
- package/windows/CodePush/CodePushConfig.cpp +3 -3
- package/windows/CodePush/CodePushConfig.h +3 -3
- package/windows/CodePush/CodePushNativeModule.cpp +27 -27
- package/windows/CodePush/CodePushNativeModule.h +4 -4
- package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
- package/windows/CodePush/CodePushTelemetryManager.h +1 -1
- package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
- package/.azurepipelines/test-rn-code-push.yml +0 -94
- package/.config/CredScanSuppressions.json +0 -14
- package/AlertAdapter.js +0 -24
- package/CONTRIBUTING.md +0 -134
- package/CodePush.js +0 -671
- package/SECURITY.md +0 -41
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +0 -102
- package/docs/multi-deployment-testing-android.md +0 -148
- package/docs/multi-deployment-testing-ios.md +0 -59
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
- package/ios/CodePush/Base64/README.md +0 -47
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
- package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
- package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
- package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
- package/ios/CodePush/JWT/LICENSE +0 -19
- package/ios/CodePush/JWT/README.md +0 -489
- package/ios/CodePush/SSZipArchive/Info.plist +0 -26
- package/ios/CodePush/SSZipArchive/README.md +0 -1
- package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -178
- package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -1496
- package/ios/CodePush/SSZipArchive/SSZipCommon.h +0 -71
- package/ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy +0 -23
- package/ios/CodePush/SSZipArchive/include/ZipArchive.h +0 -25
- package/ios/CodePush/SSZipArchive/minizip/LICENSE +0 -17
- package/ios/CodePush/SSZipArchive/minizip/mz.h +0 -273
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.c +0 -1306
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.h +0 -346
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.c +0 -187
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.h +0 -65
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt_apple.c +0 -526
- package/ios/CodePush/SSZipArchive/minizip/mz_os.c +0 -348
- package/ios/CodePush/SSZipArchive/minizip/mz_os.h +0 -176
- package/ios/CodePush/SSZipArchive/minizip/mz_os_posix.c +0 -350
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.c +0 -556
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.h +0 -132
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.c +0 -383
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h +0 -42
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.c +0 -269
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.h +0 -48
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os.h +0 -40
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os_posix.c +0 -203
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.c +0 -334
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.h +0 -46
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.c +0 -429
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.h +0 -43
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.c +0 -360
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.h +0 -46
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.c +0 -389
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h +0 -43
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.c +0 -2782
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.h +0 -262
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.c +0 -1942
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.h +0 -285
- package/package-mixins.js +0 -68
- package/request-fetch-adapter.js +0 -52
- package/scripts/postlink/android/postlink.js +0 -87
- package/scripts/postlink/ios/postlink.js +0 -116
- package/scripts/postlink/run.js +0 -11
- package/scripts/postunlink/android/postunlink.js +0 -74
- package/scripts/postunlink/ios/postunlink.js +0 -87
- package/scripts/postunlink/run.js +0 -11
- package/scripts/tools/linkToolsAndroid.js +0 -57
- package/scripts/tools/linkToolsIos.js +0 -130
- package/tslint.json +0 -32
- package/typings/react-native-code-push.d.ts +0 -455
- package/windows-legacy/CodePush/CodePush.csproj +0 -128
- package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
- package/windows-legacy/CodePush/FileUtils.cs +0 -40
- package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
- package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
- package/windows-legacy/CodePush/UpdateManager.cs +0 -305
- package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
- package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
- package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
- package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
- package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
- package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
- package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
- package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
- package/windows-legacy/CodePush.Net46/packages.config +0 -5
- package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
- package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
- package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
- package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
- package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
- package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
- package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
- package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
- package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
- package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
- package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
- package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
- package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
- package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
- package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
- package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
|
@@ -1,551 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// JWTAlgorithmRSBase.m
|
|
3
|
-
// JWT
|
|
4
|
-
//
|
|
5
|
-
// Created by Lobanov Dmitry on 13.03.16.
|
|
6
|
-
// Copyright © 2016 Karma. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#import "JWTAlgorithmRSBase.h"
|
|
10
|
-
#import "JWTBase64Coder.h"
|
|
11
|
-
#import "JWTCryptoSecurity.h"
|
|
12
|
-
#import "JWTCryptoKeyExtractor.h"
|
|
13
|
-
#import "JWTCryptoKey.h"
|
|
14
|
-
#import "JWTAlgorithmFactory.h"
|
|
15
|
-
#import <CommonCrypto/CommonCrypto.h>
|
|
16
|
-
/*
|
|
17
|
-
* * Possible inheritence *
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* RSBase (Public + Create-category)
|
|
21
|
-
* / \
|
|
22
|
-
* / \
|
|
23
|
-
* RSBaseMac RSBaseIOS
|
|
24
|
-
* \ ifdef /
|
|
25
|
-
* \ /
|
|
26
|
-
* RSFamilyMember
|
|
27
|
-
* |
|
|
28
|
-
* RSFamilyMemberMutable
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
NSString *const JWTAlgorithmNameRS256 = @"RS256";
|
|
33
|
-
NSString *const JWTAlgorithmNameRS384 = @"RS384";
|
|
34
|
-
NSString *const JWTAlgorithmNameRS512 = @"RS512";
|
|
35
|
-
|
|
36
|
-
@interface JWTAlgorithmRSBase()
|
|
37
|
-
@property (nonatomic, readonly) id <JWTCryptoKeyExtractorProtocol> keyExtractor;
|
|
38
|
-
@end
|
|
39
|
-
|
|
40
|
-
@implementation JWTAlgorithmRSBase
|
|
41
|
-
|
|
42
|
-
#pragma mark - NSCopying
|
|
43
|
-
- (id)copyWithZone:(NSZone *)zone {
|
|
44
|
-
// create new.
|
|
45
|
-
id <JWTRSAlgorithm> algorithm = (id<JWTRSAlgorithm>)[JWTAlgorithmFactory algorithmByName:[self name]];
|
|
46
|
-
algorithm.privateKeyCertificatePassphrase = self.privateKeyCertificatePassphrase;
|
|
47
|
-
algorithm.keyExtractorType = self.keyExtractorType;
|
|
48
|
-
algorithm.signKey = self.signKey;
|
|
49
|
-
algorithm.verifyKey = self.verifyKey;
|
|
50
|
-
return algorithm;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@synthesize privateKeyCertificatePassphrase;
|
|
54
|
-
@synthesize keyExtractorType;
|
|
55
|
-
@synthesize signKey;
|
|
56
|
-
@synthesize verifyKey;
|
|
57
|
-
- (id<JWTCryptoKeyExtractorProtocol>) keyExtractor {
|
|
58
|
-
return [JWTCryptoKeyExtractor createWithType:self.keyExtractorType];
|
|
59
|
-
}
|
|
60
|
-
#pragma mark - Override
|
|
61
|
-
- (size_t)ccSHANumberDigestLength {
|
|
62
|
-
@throw [[NSException alloc] initWithName:NSInternalInconsistencyException reason:@"ccSHANumberDigestLength property should be overriden" userInfo:nil];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
- (uint32_t)secPaddingPKCS1SHANumber {
|
|
66
|
-
@throw [[NSException alloc] initWithName:NSInternalInconsistencyException reason:@"secPaddingPKCS1SHANumber property should be overriden" userInfo:nil];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
- (unsigned char *)CC_SHANumberWithData:(const void *)data withLength:(CC_LONG)len withHashBytes:(unsigned char *)hashBytes {
|
|
70
|
-
return nil;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
- (NSString *)name {
|
|
74
|
-
return @"RSBase";
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
#pragma mark - JWTAlgorithm
|
|
78
|
-
- (NSData *)signHash:(NSData *)hash key:(NSData *)key error:(NSError *__autoreleasing *)error {
|
|
79
|
-
NSData *result = nil;
|
|
80
|
-
if (self.signKey || self.keyExtractor) {
|
|
81
|
-
NSError *extractKeyError = nil;
|
|
82
|
-
id <JWTCryptoKeyProtocol> keyItem = self.signKey ?: [self.keyExtractor keyFromData:key parameters:@{ [JWTCryptoKeyExtractor parametersKeyCertificatePassphrase] : self.privateKeyCertificatePassphrase ?: [NSNull null] } error:&extractKeyError];
|
|
83
|
-
|
|
84
|
-
if (extractKeyError || keyItem == nil) {
|
|
85
|
-
// tell about error
|
|
86
|
-
if (extractKeyError && error) {
|
|
87
|
-
*error = extractKeyError;
|
|
88
|
-
}
|
|
89
|
-
NSError *removeError = nil;
|
|
90
|
-
[JWTCryptoSecurity removeKeyByTag:keyItem.tag error:&removeError];
|
|
91
|
-
if (removeError && error) {
|
|
92
|
-
*error = removeError;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
result = [self signData:hash withKey:keyItem.key];
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
SecIdentityRef identity = nil;
|
|
101
|
-
SecTrustRef trust = nil;
|
|
102
|
-
|
|
103
|
-
// [JWTCryptoSecurity extractIdentityAndTrustFromPKCS12:inPKCS12Data password:keyPassword identity:outIdentity trust:outTrust];
|
|
104
|
-
[JWTCryptoSecurity extractIdentityAndTrustFromPKCS12:(__bridge CFDataRef)(key) password: (__bridge CFStringRef)(self.privateKeyCertificatePassphrase) identity:&identity trust:&trust];
|
|
105
|
-
|
|
106
|
-
if (identity && trust) {
|
|
107
|
-
SecKeyRef privateKey;
|
|
108
|
-
SecIdentityCopyPrivateKey(identity, &privateKey);
|
|
109
|
-
result = [self signData:hash withKey:privateKey];
|
|
110
|
-
|
|
111
|
-
if (privateKey) {
|
|
112
|
-
CFRelease(privateKey);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (identity) {
|
|
117
|
-
CFRelease(identity);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if (trust) {
|
|
121
|
-
CFRelease(trust);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return result;
|
|
125
|
-
}
|
|
126
|
-
- (BOOL)verifyHash:(NSData *)hash signature:(NSData *)signature key:(NSData *)key error:(NSError *__autoreleasing *)error {
|
|
127
|
-
if (self.verifyKey || self.keyExtractor) {
|
|
128
|
-
NSError *extractKeyError = nil;
|
|
129
|
-
id<JWTCryptoKeyProtocol> keyItem = self.verifyKey?: [self.keyExtractor keyFromData:key parameters:nil error:&extractKeyError];
|
|
130
|
-
BOOL verified = NO;
|
|
131
|
-
|
|
132
|
-
if (extractKeyError || keyItem == nil) {
|
|
133
|
-
// error while getting key.
|
|
134
|
-
// cleanup.
|
|
135
|
-
// tell about error
|
|
136
|
-
if (extractKeyError && error) {
|
|
137
|
-
*error = extractKeyError;
|
|
138
|
-
}
|
|
139
|
-
NSError *removeError = nil;
|
|
140
|
-
[JWTCryptoSecurity removeKeyByTag:keyItem.tag error:&removeError];
|
|
141
|
-
if (removeError && error) {
|
|
142
|
-
//???
|
|
143
|
-
*error = removeError;
|
|
144
|
-
}
|
|
145
|
-
return verified;
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
verified = [self verifyData:hash witSignature:signature withKey:keyItem.key];
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
NSError *removeError = nil;
|
|
152
|
-
[JWTCryptoSecurity removeKeyByTag:keyItem.tag error:&removeError];
|
|
153
|
-
|
|
154
|
-
if (error && removeError) {
|
|
155
|
-
*error = removeError;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return verified;
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
SecKeyRef publicKey = [JWTCryptoSecurity publicKeyFromCertificate:key];
|
|
162
|
-
// TODO: special error handling here.
|
|
163
|
-
// add error handling later?
|
|
164
|
-
if (publicKey != NULL) {
|
|
165
|
-
BOOL verified = [self verifyData:hash witSignature:signature withKey:publicKey];
|
|
166
|
-
CFRelease(publicKey);
|
|
167
|
-
return verified;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return NO;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
- (NSData *)encodePayload:(NSString *)theString withSecret:(NSString *)theSecret {
|
|
174
|
-
return [self encodePayloadData:[theString dataUsingEncoding:NSUTF8StringEncoding] withSecret:[JWTBase64Coder dataWithBase64UrlEncodedString:theSecret]];
|
|
175
|
-
}
|
|
176
|
-
- (NSData *)encodePayloadData:(NSData *)theStringData withSecret:(NSData *)theSecretData {
|
|
177
|
-
return [self signHash:theStringData key:theSecretData error:nil];
|
|
178
|
-
}
|
|
179
|
-
- (BOOL)verifySignedInput:(NSString *)input withSignature:(NSString *)signature verificationKey:(NSString *)verificationKey {
|
|
180
|
-
NSData *certificateData = [JWTBase64Coder dataWithBase64UrlEncodedString:verificationKey];
|
|
181
|
-
return [self verifySignedInput:input withSignature:signature verificationKeyData:certificateData];
|
|
182
|
-
}
|
|
183
|
-
- (BOOL)verifySignedInput:(NSString *)input withSignature:(NSString *)signature verificationKeyData:(NSData *)verificationKeyData {
|
|
184
|
-
return [self verifyHash:[input dataUsingEncoding:NSUTF8StringEncoding] signature:[JWTBase64Coder dataWithBase64UrlEncodedString:signature] key:verificationKeyData error:nil];
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
#pragma mark - Private ( Override-part depends on platform )
|
|
188
|
-
- (BOOL)verifyData:(NSData *)plainData witSignature:(NSData *)signature withKey:(SecKeyRef) publicKey {
|
|
189
|
-
return NO;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
- (NSData *)signData:(NSData *)plainData withKey:(SecKeyRef)privateKey {
|
|
193
|
-
return nil;
|
|
194
|
-
}
|
|
195
|
-
@end
|
|
196
|
-
|
|
197
|
-
#if TARGET_OS_MAC && TARGET_OS_IPHONE
|
|
198
|
-
@interface JWTAlgorithmRSBaseIOS : JWTAlgorithmRSBase @end
|
|
199
|
-
@implementation JWTAlgorithmRSBaseIOS
|
|
200
|
-
- (BOOL)verifyData:(NSData *)plainData witSignature:(NSData *)signature withKey:(SecKeyRef) publicKey {
|
|
201
|
-
size_t signedHashBytesSize = SecKeyGetBlockSize(publicKey);
|
|
202
|
-
const void* signedHashBytes = [signature bytes];
|
|
203
|
-
|
|
204
|
-
size_t hashBytesSize = self.ccSHANumberDigestLength;
|
|
205
|
-
uint8_t* hashBytes = malloc(hashBytesSize);
|
|
206
|
-
if (![self CC_SHANumberWithData:[plainData bytes] withLength:(CC_LONG)[plainData length] withHashBytes:hashBytes]) {
|
|
207
|
-
return false;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
OSStatus status = SecKeyRawVerify(publicKey,
|
|
211
|
-
self.secPaddingPKCS1SHANumber,
|
|
212
|
-
hashBytes,
|
|
213
|
-
hashBytesSize,
|
|
214
|
-
signedHashBytes,
|
|
215
|
-
signedHashBytesSize);
|
|
216
|
-
|
|
217
|
-
return status == errSecSuccess;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
- (NSData *)signData:(NSData *)plainData withKey:(SecKeyRef)privateKey {
|
|
221
|
-
size_t signedHashBytesSize = SecKeyGetBlockSize(privateKey);
|
|
222
|
-
uint8_t* signedHashBytes = malloc(signedHashBytesSize);
|
|
223
|
-
memset(signedHashBytes, 0x0, signedHashBytesSize);
|
|
224
|
-
|
|
225
|
-
size_t hashBytesSize = self.ccSHANumberDigestLength;
|
|
226
|
-
uint8_t* hashBytes = malloc(hashBytesSize);
|
|
227
|
-
|
|
228
|
-
// ([plainData bytes], (CC_LONG)[plainData length], hashBytes)
|
|
229
|
-
unsigned char *str = [self CC_SHANumberWithData:[plainData bytes] withLength:(CC_LONG)[plainData length] withHashBytes:hashBytes];
|
|
230
|
-
|
|
231
|
-
if (!str) {
|
|
232
|
-
return nil;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
SecKeyRawSign(privateKey,
|
|
236
|
-
self.secPaddingPKCS1SHANumber,
|
|
237
|
-
hashBytes,
|
|
238
|
-
hashBytesSize,
|
|
239
|
-
signedHashBytes,
|
|
240
|
-
&signedHashBytesSize);
|
|
241
|
-
|
|
242
|
-
NSData* signedHash = [NSData dataWithBytes:signedHashBytes
|
|
243
|
-
length:(NSUInteger)signedHashBytesSize];
|
|
244
|
-
|
|
245
|
-
if (hashBytes) {
|
|
246
|
-
free(hashBytes);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (signedHashBytes) {
|
|
250
|
-
free(signedHashBytes);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return signedHash;
|
|
254
|
-
}
|
|
255
|
-
@end
|
|
256
|
-
#endif
|
|
257
|
-
|
|
258
|
-
#if TARGET_OS_MAC && !TARGET_OS_IPHONE
|
|
259
|
-
@interface JWTAlgorithmRSBaseMac : JWTAlgorithmRSBase
|
|
260
|
-
@end
|
|
261
|
-
|
|
262
|
-
@implementation JWTAlgorithmRSBaseMac
|
|
263
|
-
- (NSData *)executeTransform:(SecTransformRef)transform withInput:(NSData *)input withDigestType:(CFStringRef)type withDigestLength:(NSNumber *)length withFalseResult:(CFTypeRef)falseResultRef {
|
|
264
|
-
CFErrorRef errorRef = NULL;
|
|
265
|
-
|
|
266
|
-
CFTypeRef resultRef = NULL;
|
|
267
|
-
NSData *resultData = nil;
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
BOOL success = transform != NULL;
|
|
271
|
-
//TODO: after import algorithm by pem, this code seems not working well.
|
|
272
|
-
//error: Error Domain=com.apple.security.transforms.error Code=6 "Invalid digest algorithm for RSA signature, choose one of: SHA1, SHA2 (512bits, 348bits, 256bits, or 224 bits), MD2, or MD5"
|
|
273
|
-
//TODO: add error inout parameter to this method.
|
|
274
|
-
if (success) {
|
|
275
|
-
// setup digest type
|
|
276
|
-
success = SecTransformSetAttribute(transform, kSecDigestTypeAttribute, type, &errorRef);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
if (success) {
|
|
280
|
-
// digest length
|
|
281
|
-
success = SecTransformSetAttribute(transform, kSecDigestLengthAttribute, (__bridge CFNumberRef)length, &errorRef);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
if (success) {
|
|
285
|
-
// set input
|
|
286
|
-
success = SecTransformSetAttribute(transform, kSecTransformInputAttributeName, (__bridge CFDataRef)input, &errorRef);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
if (success) {
|
|
290
|
-
// execute
|
|
291
|
-
resultRef = SecTransformExecute(transform, &errorRef);
|
|
292
|
-
success = (resultRef != falseResultRef);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
BOOL positiveResult = success; // resultRef != falseResultRef
|
|
296
|
-
|
|
297
|
-
// error
|
|
298
|
-
if (errorRef != NULL) {
|
|
299
|
-
NSLog(@"%@ error: %@", self.debugDescription, (__bridge NSError *)errorRef);
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
if (positiveResult) {
|
|
303
|
-
resultData = (__bridge NSData *)resultRef;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// release
|
|
308
|
-
if (transform != NULL) {
|
|
309
|
-
CFRelease(transform);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
if (errorRef != NULL) {
|
|
313
|
-
CFRelease(errorRef);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
if (resultRef != NULL) {
|
|
317
|
-
CFRelease(resultRef);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
return resultData;
|
|
321
|
-
}
|
|
322
|
-
- (BOOL)verifyData:(NSData *)plainData witSignature:(NSData *)signature withKey:(SecKeyRef) publicKey {
|
|
323
|
-
|
|
324
|
-
size_t signedHashBytesSize = SecKeyGetBlockSize(publicKey);
|
|
325
|
-
//const void* signedHashBytes = [signature bytes];
|
|
326
|
-
|
|
327
|
-
size_t hashBytesSize = self.ccSHANumberDigestLength;
|
|
328
|
-
uint8_t* hashBytes = malloc(hashBytesSize);
|
|
329
|
-
if (![self CC_SHANumberWithData:[plainData bytes] withLength:(CC_LONG)[plainData length] withHashBytes:hashBytes]) {
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
// verify for iOS
|
|
334
|
-
// OSStatus status = SecKeyRawVerify(publicKey,
|
|
335
|
-
// self.secPaddingPKCS1SHANumber,
|
|
336
|
-
// hashBytes,
|
|
337
|
-
// hashBytesSize,
|
|
338
|
-
// signedHashBytes,
|
|
339
|
-
// signedHashBytesSize);
|
|
340
|
-
// return status == errSecSuccess;
|
|
341
|
-
|
|
342
|
-
CFErrorRef errorRef = NULL;
|
|
343
|
-
SecTransformRef transform = SecVerifyTransformCreate(publicKey, (__bridge CFDataRef)signature, &errorRef);
|
|
344
|
-
|
|
345
|
-
// verification. false result is kCFBooleanFalse
|
|
346
|
-
BOOL result = [self executeTransform:transform withInput:plainData withDigestType:kSecDigestSHA2 withDigestLength:@(signedHashBytesSize) withFalseResult:kCFBooleanFalse] != nil;
|
|
347
|
-
|
|
348
|
-
if (errorRef != NULL) {
|
|
349
|
-
CFRelease(errorRef);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
return result;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
- (NSData *)signData:(NSData *)plainData withKey:(SecKeyRef)privateKey {
|
|
356
|
-
size_t signedHashBytesSize = SecKeyGetBlockSize(privateKey);
|
|
357
|
-
//uint8_t* signedHashBytes = malloc(signedHashBytesSize);
|
|
358
|
-
//memset(signedHashBytes, 0x0, signedHashBytesSize);
|
|
359
|
-
|
|
360
|
-
size_t hashBytesSize = self.ccSHANumberDigestLength;
|
|
361
|
-
uint8_t* hashBytes = malloc(hashBytesSize);
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
for sha256
|
|
365
|
-
CC_SHANumberWithData() is CC_SHA256()
|
|
366
|
-
self.secPaddingPKCS1SHANumber = kSecPaddingPKCS1SHA256
|
|
367
|
-
self.ccSHANumberDigestLength = CC_SHA256_DIGEST_LENGTH
|
|
368
|
-
*/
|
|
369
|
-
unsigned char *str = [self CC_SHANumberWithData:[plainData bytes] withLength:(CC_LONG)[plainData length] withHashBytes:hashBytes];
|
|
370
|
-
|
|
371
|
-
if (!str) {
|
|
372
|
-
return nil;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
CFErrorRef errorRef = NULL;
|
|
376
|
-
|
|
377
|
-
SecTransformRef transform = SecSignTransformCreate(privateKey, &errorRef);
|
|
378
|
-
|
|
379
|
-
/** iOS
|
|
380
|
-
SecKeyRawSign(privateKey,
|
|
381
|
-
self.secPaddingPKCS1SHANumber,
|
|
382
|
-
hashBytes,
|
|
383
|
-
hashBytesSize,
|
|
384
|
-
signedHashBytes,
|
|
385
|
-
&signedHashBytesSize);
|
|
386
|
-
|
|
387
|
-
NSData* signedHash = [NSData dataWithBytes:signedHashBytes
|
|
388
|
-
length:(NSUInteger)signedHashBytesSize];
|
|
389
|
-
|
|
390
|
-
*/
|
|
391
|
-
|
|
392
|
-
NSData *resultData = nil;
|
|
393
|
-
// signing: false result is NULL.
|
|
394
|
-
// it will release error.
|
|
395
|
-
resultData = [self executeTransform:transform withInput:plainData withDigestType:kSecDigestSHA2 withDigestLength:@(signedHashBytesSize) withFalseResult:NULL];
|
|
396
|
-
|
|
397
|
-
if (errorRef != NULL) {
|
|
398
|
-
CFRelease(errorRef);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
return resultData;
|
|
402
|
-
}
|
|
403
|
-
@end
|
|
404
|
-
#endif
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
// MacOS OR iOS is Base
|
|
408
|
-
#if TARGET_OS_MAC && !TARGET_OS_IPHONE
|
|
409
|
-
@interface JWTAlgorithmRSFamilyMember : JWTAlgorithmRSBaseMac @end
|
|
410
|
-
#else
|
|
411
|
-
@interface JWTAlgorithmRSFamilyMember : JWTAlgorithmRSBaseIOS @end
|
|
412
|
-
#endif
|
|
413
|
-
|
|
414
|
-
@interface JWTAlgorithmRS256 : JWTAlgorithmRSFamilyMember @end
|
|
415
|
-
@interface JWTAlgorithmRS384 : JWTAlgorithmRSFamilyMember @end
|
|
416
|
-
@interface JWTAlgorithmRS512 : JWTAlgorithmRSFamilyMember @end
|
|
417
|
-
|
|
418
|
-
@implementation JWTAlgorithmRSFamilyMember
|
|
419
|
-
- (uint32_t)secPaddingPKCS1SHANumber {
|
|
420
|
-
return 0;
|
|
421
|
-
}
|
|
422
|
-
@end
|
|
423
|
-
|
|
424
|
-
@implementation JWTAlgorithmRS256
|
|
425
|
-
|
|
426
|
-
- (size_t)ccSHANumberDigestLength {
|
|
427
|
-
return CC_SHA256_DIGEST_LENGTH;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
#if TARGET_OS_MAC && TARGET_OS_IPHONE
|
|
431
|
-
- (uint32_t)secPaddingPKCS1SHANumber {
|
|
432
|
-
return kSecPaddingPKCS1SHA256;
|
|
433
|
-
}
|
|
434
|
-
#endif
|
|
435
|
-
|
|
436
|
-
- (unsigned char *)CC_SHANumberWithData:(const void *)data withLength:(CC_LONG)len withHashBytes:(unsigned char *)hashBytes {
|
|
437
|
-
return CC_SHA256(data, len, hashBytes);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
- (NSString *)name {
|
|
441
|
-
return JWTAlgorithmNameRS256;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
@end
|
|
445
|
-
|
|
446
|
-
@implementation JWTAlgorithmRS384
|
|
447
|
-
|
|
448
|
-
- (size_t)ccSHANumberDigestLength {
|
|
449
|
-
return CC_SHA384_DIGEST_LENGTH;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
#if TARGET_OS_MAC && TARGET_OS_IPHONE
|
|
453
|
-
- (uint32_t)secPaddingPKCS1SHANumber {
|
|
454
|
-
return kSecPaddingPKCS1SHA384;
|
|
455
|
-
}
|
|
456
|
-
#endif
|
|
457
|
-
|
|
458
|
-
- (unsigned char *)CC_SHANumberWithData:(const void *)data withLength:(CC_LONG)len withHashBytes:(unsigned char *)hashBytes {
|
|
459
|
-
return CC_SHA384(data, len, hashBytes);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
- (NSString *)name {
|
|
463
|
-
return JWTAlgorithmNameRS384;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
@end
|
|
467
|
-
|
|
468
|
-
@implementation JWTAlgorithmRS512
|
|
469
|
-
|
|
470
|
-
- (size_t)ccSHANumberDigestLength {
|
|
471
|
-
return CC_SHA512_DIGEST_LENGTH;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
#if TARGET_OS_MAC && TARGET_OS_IPHONE
|
|
475
|
-
- (uint32_t)secPaddingPKCS1SHANumber {
|
|
476
|
-
return kSecPaddingPKCS1SHA512;
|
|
477
|
-
}
|
|
478
|
-
#endif
|
|
479
|
-
|
|
480
|
-
- (unsigned char *)CC_SHANumberWithData:(const void *)data withLength:(CC_LONG)len withHashBytes:(unsigned char *)hashBytes {
|
|
481
|
-
return CC_SHA512(data, len, hashBytes);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
- (NSString *)name {
|
|
485
|
-
return JWTAlgorithmNameRS512;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
@end
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
@interface JWTAlgorithmRSFamilyMemberMutable : JWTAlgorithmRSFamilyMember
|
|
492
|
-
|
|
493
|
-
@property (assign, nonatomic, readwrite) size_t ccSHANumberDigestLength;
|
|
494
|
-
@property (assign, nonatomic, readwrite) uint32_t secPaddingPKCS1SHANumber;
|
|
495
|
-
@property (copy, nonatomic, readwrite) unsigned char * (^ccShaNumberWithData)(const void *data, CC_LONG len, unsigned char *hashBytes);
|
|
496
|
-
@property (copy, nonatomic, readwrite) NSString *name;
|
|
497
|
-
@end
|
|
498
|
-
|
|
499
|
-
@implementation JWTAlgorithmRSFamilyMemberMutable
|
|
500
|
-
|
|
501
|
-
@synthesize ccSHANumberDigestLength = _ccSHANumberDigestLength;
|
|
502
|
-
@synthesize secPaddingPKCS1SHANumber = _secPaddingPKCS1SHANumber;
|
|
503
|
-
@synthesize name = _name;
|
|
504
|
-
|
|
505
|
-
- (size_t)ccSHANumberDigestLength {
|
|
506
|
-
return _ccSHANumberDigestLength;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
- (uint32_t)secPaddingPKCS1SHANumber {
|
|
510
|
-
return _secPaddingPKCS1SHANumber;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
- (unsigned char *)CC_SHANumberWithData:(const void *)data withLength:(uint32_t)len withHashBytes:(unsigned char *)hashBytes {
|
|
514
|
-
unsigned char *result = [super CC_SHANumberWithData:data withLength:len withHashBytes:hashBytes];
|
|
515
|
-
if (!result && self.ccShaNumberWithData) {
|
|
516
|
-
result = self.ccShaNumberWithData(data, len, hashBytes);
|
|
517
|
-
}
|
|
518
|
-
return result;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
@end
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
@implementation JWTAlgorithmRSBase (Create)
|
|
525
|
-
|
|
526
|
-
+ (instancetype)algorithm256 {
|
|
527
|
-
return [JWTAlgorithmRS256 new];
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
+ (instancetype)algorithm384 {
|
|
531
|
-
return [JWTAlgorithmRS384 new];
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
+ (instancetype)algorithm512 {
|
|
535
|
-
return [JWTAlgorithmRS512 new];
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
+ (instancetype)mutableAlgorithm {
|
|
539
|
-
JWTAlgorithmRSFamilyMemberMutable *base = [JWTAlgorithmRSFamilyMemberMutable new];
|
|
540
|
-
base.ccSHANumberDigestLength = CC_SHA256_DIGEST_LENGTH;
|
|
541
|
-
|
|
542
|
-
//set to something ok
|
|
543
|
-
//base.secPaddingPKCS1SHANumber = kSecPaddingPKCS1SHA256;
|
|
544
|
-
base.ccShaNumberWithData = ^unsigned char *(const void *data, CC_LONG len, unsigned char *hashBytes){
|
|
545
|
-
return CC_SHA256(data, len, hashBytes);
|
|
546
|
-
};
|
|
547
|
-
base.name = @"RS256";
|
|
548
|
-
return base;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
@end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Created by Marcelo Schroeder on 12/03/2016.
|
|
3
|
-
// Copyright (c) 2016 Karma. All rights reserved.
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
#import <Foundation/Foundation.h>
|
|
7
|
-
#import "JWTAlgorithm.h"
|
|
8
|
-
@protocol JWTCryptoKeyProtocol;
|
|
9
|
-
|
|
10
|
-
@protocol JWTAsymmetricKeysAlgorithm <JWTAlgorithm>
|
|
11
|
-
|
|
12
|
-
@optional
|
|
13
|
-
@property(nonatomic, readwrite, copy) NSString *keyExtractorType;
|
|
14
|
-
@property(nonatomic, readwrite, strong) id<JWTCryptoKeyProtocol> signKey;
|
|
15
|
-
@property(nonatomic, readwrite, strong) id<JWTCryptoKeyProtocol> verifyKey;
|
|
16
|
-
|
|
17
|
-
@end
|
|
18
|
-
|
|
19
|
-
@protocol JWTRSAlgorithm <JWTAsymmetricKeysAlgorithm, NSCopying>
|
|
20
|
-
|
|
21
|
-
@required
|
|
22
|
-
@property(nonatomic, readwrite, copy) NSString *privateKeyCertificatePassphrase;
|
|
23
|
-
@end
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// JWTCryptoKey.h
|
|
3
|
-
// JWT
|
|
4
|
-
//
|
|
5
|
-
// Created by Lobanov Dmitry on 04.02.17.
|
|
6
|
-
// Copyright © 2017 JWTIO. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
#import <Security/Security.h>
|
|
11
|
-
|
|
12
|
-
@protocol JWTCryptoKeyProtocol <NSObject>
|
|
13
|
-
@property (copy, nonatomic, readonly) NSString *tag;
|
|
14
|
-
@property (assign, nonatomic, readonly) SecKeyRef key;
|
|
15
|
-
@property (copy, nonatomic, readonly) NSData *rawKey;
|
|
16
|
-
@end
|
|
17
|
-
|
|
18
|
-
@interface JWTCryptoKeyBuilder : NSObject
|
|
19
|
-
@property (assign, nonatomic, readonly) NSString *keyType;
|
|
20
|
-
- (instancetype)keyTypeRSA;
|
|
21
|
-
- (instancetype)keyTypeEC;
|
|
22
|
-
@end
|
|
23
|
-
|
|
24
|
-
@interface JWTCryptoKey : NSObject<JWTCryptoKeyProtocol>
|
|
25
|
-
- (instancetype)initWithData:(NSData *)data parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error; //NS_DESIGNATED_INITIALIZER
|
|
26
|
-
- (instancetype)initWithBase64String:(NSString *)base64String parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error;
|
|
27
|
-
- (instancetype)initWithPemEncoded:(NSString *)encoded parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error;
|
|
28
|
-
- (instancetype)initWithPemAtURL:(NSURL *)url parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error;
|
|
29
|
-
@end
|
|
30
|
-
|
|
31
|
-
@interface JWTCryptoKey (Parameters)
|
|
32
|
-
+ (NSString *)parametersKeyBuilder;
|
|
33
|
-
@end
|
|
34
|
-
|
|
35
|
-
@interface JWTCryptoKeyPublic : JWTCryptoKey
|
|
36
|
-
- (instancetype)initWithCertificateData:(NSData *)certificateData parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error; //NS_DESIGNATED_INITIALIZER;
|
|
37
|
-
- (instancetype)initWithCertificateBase64String:(NSString *)certificateString parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error;
|
|
38
|
-
@end
|
|
39
|
-
|
|
40
|
-
@interface JWTCryptoKeyPrivate : JWTCryptoKey
|
|
41
|
-
- (instancetype)initWithP12Data:(NSData *)p12Data withPassphrase:(NSString *)passphrase parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error; //NS_DESIGNATED_INITIALIZER;
|
|
42
|
-
- (instancetype)initWithP12AtURL:(NSURL *)url withPassphrase:(NSString *)passphrase parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error;
|
|
43
|
-
@end
|