Skip to content

Commit

Permalink
Only apply new Android overlay patch to Swift Crypto trunk on the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin committed Oct 20, 2024
1 parent 18ed486 commit f9d922a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ jobs:
path: swift-crypto
- name: Build Swift crypto package
run: |
git apply sdk-config/swift-crypto.patch
git apply sdk-config/swift-crypto.patch sdk-config/swift-crypto-overlay.patch
cd swift-crypto
perl -pi -e 's%\\\\(testsDirectory)/.*Vectors%/data/local/tmp/pack/crypto-vectors%' Tests/{Crypto,_CryptoExtras}Tests/Utils/{RFCVector,Wycheproof}.swift
perl -pi -e 's%#file%"/data/local/tmp/pack/crypto-vectors"%;s%../_CryptoExtrasVectors/%%' Tests/_CryptoExtrasTests/TestRSABlindSigning.swift
Expand Down
15 changes: 15 additions & 0 deletions swift-crypto-overlay.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift b/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift
index 1076de1..421db76 100644
--- a/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift
+++ b/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift
@@ -21,6 +21,10 @@ import Foundation
@_implementationOnly import CCryptoBoringSSL
@_implementationOnly import CCryptoBoringSSLShims

+#if canImport(Android)
+import Android
+#endif
+
internal struct BoringSSLScrypt {
/// Derives a secure key using the provided passphrase and salt.
///
15 changes: 0 additions & 15 deletions swift-crypto.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,3 @@ index 5f47c2f..4b5579e 100644

/// A standards-based implementation of an HMAC-based Key Derivation Function
/// (HKDF).
diff --git a/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift b/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift
index 1076de1..421db76 100644
--- a/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift
+++ b/swift-crypto/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift
@@ -21,6 +21,10 @@ import Foundation
@_implementationOnly import CCryptoBoringSSL
@_implementationOnly import CCryptoBoringSSLShims

+#if canImport(Android)
+import Android
+#endif
+
internal struct BoringSSLScrypt {
/// Derives a secure key using the provided passphrase and salt.
///

0 comments on commit f9d922a

Please sign in to comment.