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

Add more Sendable annotations to Crypto Extras #214

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

rnro
Copy link
Contributor

@rnro rnro commented Dec 19, 2023

Motivation

Add Sendable annotations to Crypto Extras to reflect current sandability so that downstream packages can implement sendable conformance.

Modifications

  • Add Sendable conformance to some missed public symbols.
  • RSA public and private keys are now marked sendable with their backing storage on darwin OS marked unchecked sendable until SecKey from security framework has sendability annotations

Result

  • More accurate Sendable annotations

@Lukasa Lukasa added the 🆕 semver/minor Adds new public API. label Dec 19, 2023
@@ -18,7 +18,7 @@ import Foundation
extension AES {
/// The Advanced Encryption Standard (AES) Cipher Block Chaining (CBC) cipher
/// suite.
public enum _CBC {
public enum _CBC: Sendable {
Copy link
Contributor

Choose a reason for hiding this comment

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

This enum is uninhabited, it doesn't need a Sendable annotation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yep, good catch, I missed that on this pass.

@@ -25,7 +25,7 @@ import Foundation
/// Types associated with the AES GCM SIV algorithm
extension AES.GCM {
/// AES in GCM SIV mode with 128-bit tags.
public enum _SIV {
public enum _SIV: Sendable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

rnro added 2 commits December 20, 2023 09:14
Motivation

Add Sendable annotations to Crypto Extras to reflect current sandability
so that downstream packages can implement sendable conformance.

Modifications

* Add Sendable conformance to some missed public symbols.
* RSA public and private keys are now marked sendable with their backing storage on darwin OS marked unchecked sendable until SecKey from security framework has sendability annotations

Result

* More accurate Sendable annotations
@rnro rnro force-pushed the Add_Sendable_annotations_to_Crypto_Extras branch from 90fcc20 to f284a81 Compare December 20, 2023 09:14
@rnro rnro requested a review from Lukasa December 20, 2023 09:15
@Lukasa Lukasa merged commit c1825df into apple:main Dec 20, 2023
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants