-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to use SecKeyCreateRandomKey to generate key pairs #78
Update to use SecKeyCreateRandomKey to generate key pairs #78
Conversation
SecKeyGeneratePair was deprecated with iOS 15 Upgraded to support building with Xcode 14 - with no warnings Updated minimum supported versions - * MacOS - 11.5 * iOS - 14.5 * TVOS - 14.5 * WatchOS - 7.5 Testing * Converted to use xctestplans * Added support to do iOS testing * Had to add compiler flags to enable successful testing on a simulator
Kris Kline seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! If there's any way you can exclude formatting changes, it would make it easier to evaluate.
s.osx.deployment_target = "10.12" | ||
s.ios.deployment_target = "10.3" | ||
s.tvos.deployment_target = "10.3" | ||
s.watchos.deployment_target = "3.3" | ||
s.osx.deployment_target = "11.5" | ||
s.ios.deployment_target = "14.5" | ||
s.tvos.deployment_target = "14.5" | ||
s.watchos.deployment_target = "7.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking the deployment targets! Just wanted to confirm if these are the minimum versions that will work with these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a concern...can get away with going with even older versions...
I've just gotten in the habit with Apple of trying to stay as up to date as possible.
<TestPlans> | ||
<TestPlanReference | ||
reference = "container:Tests/CryptorRSA-iOSTests/CryptorRSA-iOSTests.xctestplan" | ||
default = "YES"> | ||
</TestPlanReference> | ||
</TestPlans> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit I have not yet used TestPlans, but they look really useful! How can I trigger them? I can't seem to find a way to exercise them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using the .xcodeproj it ties into the scheme. In the scheme 'Test' step, you can choose what "test plan" to run (instead of choosing what test target to run).
One of my favorite features is the "random" order - it just helps to pinpoint any tests that accidentally have a dependency on run order (very helpful if you have multiple people contributing to the same repo).
Otherwise, they just help keep things a little bit cleaner (I wonder if Apple's long term plan is to eliminate to the need to have a Test target as part of the project build??)
let parameters: [NSObject: Any] = [ | ||
kSecAttrKeyType: kSecAttrKeyTypeRSA, | ||
kSecAttrKeySizeInBits: keySize.bits, | ||
kSecPublicKeyAttrs: publicKeyAttributes, | ||
kSecPrivateKeyAttrs: privateKeyAbbributes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing doesn't appear uniform here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing some got tabs & some got spaces...
I'll work to convert everything to use tabs
@dannys42 - Took a few commits to get the compiler directives right... But, I think the spacing is all good now! 😄 |
@dannys42 - Did similar clean up to remove the generated files and just rely on Package.swift |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@dannys42 - cleaned up the build to only build on valid/more recent build machines (to match the updates to the podspecs). Seeing the odd issue where it suddenly has trouble connecting to the travis CI...but...hoping you might be able to get this (and other PRs merged in sometime soon...) -Thanks! |
Quality Gate passedIssues Measures |
@jayrhynas , @dannys42 - Any chance this could get reviewed and pulled? |
Just FYI I'm not a maintainer of this project, I just contributed once :) |
@dannys42 - Not sure if this counts as "looking a gift horse in the mouth"...but any chance you could also do an updated publish to the cocoapod spec repo? 😃 |
@LowAmmo I'm happy to add you as the cocoapods maintainer if you would like to manage it for the Kitura repos. Last time I dealt with cocoapods, there was just too many issues with downtime. Also the update process is a bit too cumbersome for me. |
@dannys42 - Sure! I know everything is moving to SPM...but our internal build system isn't ready to switch over just yet, so being able to just keep cocoapods up-to-date would be much appreciated! Let me know what you need from me to get that setup! -Thanks! |
We’re also awaiting the updated publish to the CocoaPod spec repo and look forward to its completion. |
SecKeyGeneratePair was deprecated with iOS 15
Upgraded to support building with Xcode 14 - with no warnings
Updated minimum supported versions -
Testing
Updating to switch from the deprecated SecKeyGeneratePair to SecKeyCreateRandomKey
Description
SecKeyCreateRandomKey
Minimum Versions
Unit Testing
Motivation and Context
It was done to eliminate warnings that we see in our application, and also to just update the repo to more recent standards
Issue: #77
How Has This Been Tested?
Tested locally by confirming successful unit tests.
Also tested in our application to verify change was passive
Checklist: