toxicity-io / sqlite-mc

An SQLDelight driver that uses SQLite3MultipleCiphers for database encryption.
Apache License 2.0
13 stars 0 forks source link

Use `SecRandomCopyBytes` #43

Closed 05nelsonm closed 1 year ago

05nelsonm commented 1 year ago

This PR is a fix to #39 , which will remain open until things go live upstream and can be pulled into this codebase.

The fix allows enabling of tvOS and watchOS targets.

It modifies the SQLite3MultipleCiphers amalgamations to use SecRandomCopyBytes for darwin targets, in line with the fix expressed HERE.

05nelsonm commented 1 year ago
> Task :library:driver:iosSimulatorArm64Test SKIPPED
e: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
> Task :library:driver-test:linkDebugTestIosSimulatorArm64 FAILED
The /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: warning: object file (/private/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/konan_temp130378032671[85](https://github.com/toxicity-io/sqlite-mc/actions/runs/6381376828/job/17317720607?pr=43#step:9:85)517018/result.o) was built for newer iOS Simulator version (14.0) than being linked (9.0)
Undefined symbols for architecture arm64:
  "_SecRandomCopyBytes", referenced from:
      _entropy in result.o
  "_kSecRandomDefault", referenced from:
      _entropy in result.o
ld: symbol(s) not found for architecture arm64
> Task :library:driver:iosX64Sqlite3mc
FAILURE: Build failed with an exception.

:thinking: