Skip to content
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 #36

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

LowAmmo
Copy link

@LowAmmo LowAmmo commented Sep 30, 2022

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

Added in a project file to make any future modifications easy build & test with Xcode

Description

  • Changed from using SecKeyGeneratePair to SecKeyCreateRandomKey to address a deprecation warning when targetting iOS 15+
  • Eliminated all warnings seen when building with Xcode 14
  • Minimum Versions increased to more recent versions (to help with cleaning up warnings)
  • Included a project file so any future modifications are easier to make/test, etc.
    • Guessing the original maintainer already has a local project file, I'm totally okay removing mine...just thought I would include that to make future maintaining easier.

Motivation and Context

Issue: #35

Just addresses a build warning - so consumers can attempt to target a goal of 0 build warnings

How Has This Been Tested?

Via unit testing, and passivity testing our application.

Checklist:

  • I have submitted a CLA form
    (filled out an online form as part of submitting the PR on the BlueRSA repo)
  • If applicable, I have updated the documentation accordingly.
    (didn't see any places that needed to change)
  • If applicable, I have added tests to cover my changes.

Kris Kline added 2 commits September 30, 2022 14:32
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

Added in a project file to make any future modifications easy build & test with Xcode
@LowAmmo
Copy link
Author

LowAmmo commented Feb 28, 2023

@dannys42 - Updated to just be the relevant changes - to continue to just dynamically generate the xcodeproject

Add Xcode 14.2 support
@sonarcloud
Copy link

sonarcloud bot commented Mar 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ LowAmmo
❌ Kris Kline


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.

@LowAmmo
Copy link
Author

LowAmmo commented Nov 19, 2024

@dannys42 - If you happen to be picking these projects back up... This is another that I would love to have get merged in and released! 😄

Comment on lines 305 to 306
let pubKey = SecKeyCopyPublicKey(privKey) else {
throw ECError.failedNativeKeyCreation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this follow the pattern below of error.takeRetainedValue() ... throw error?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair...makes sense to be consistent in the error handling, will make the adjustment and update.

@dannys42
Copy link
Contributor

@LowAmmo Thanks for being patient and persistent. :-)

Copy link

sonarcloud bot commented Nov 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants