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

Recompile OpenSSL for iOS #6603

Open
1 task
charlag opened this issue Feb 23, 2024 · 0 comments · May be fixed by #6645
Open
1 task

Recompile OpenSSL for iOS #6603

charlag opened this issue Feb 23, 2024 · 0 comments · May be fixed by #6645
Assignees
Labels
ios issues that concern the ios client but not all clients maintenance dependency updates, key renewals, code cleanup

Comments

@charlag
Copy link
Contributor

charlag commented Feb 23, 2024

  • We need to include arm64 simulators
  • We can update OpenSSL (optional)
  • Maybe we can avoid checking in .a in the repo somehow (optional)

Below are the contents of our wiki page. We just need to add another target in the invocation:


As OpenSSL does not provide compiling for iOS right away so we used an open source toolset which simplifies the task.

https://github.com/x2on/OpenSSL-for-iPhone.git



The current version was compiled from commit 3bcf50b0e1ac0b271929323bce90ae6605586b36.


Execution of build-libssl.sh:

CONFIG_OPTIONS="no-aria no-bf no-blake2 no-camellia no-cast no-chacha no-cmac no-des no-dh no-dsa no-ecdh no-ecdsa no-idea no-md2 no-md4 no-mdc2 no-ocb no-poly1305 no-rc2 no-rc4 no-rc5 no-rmd160 no-scrypt no-seed no-siphash no-sm2 no-sm3 no-sm4 no-whirlpool no-zlib no-zlib-dynamic" CURL_OPTIONS="" ./build-libssl.sh --targets="ios-cross-arm64 ios-sim-cross-x86_64"

We purposefully only use libcrypto in this invocation and leave out the libssl that was compiled.

To use this, we drag-and-drop the whole libcrypto.xcframework directory into the "Frameworks" folder in XCodes Project view. When prompted, check the "Copy items if needed" checkbox.

Test notes

  • Send and receive an email with an account that uses RSA
@charlag charlag added the maintenance dependency updates, key renewals, code cleanup label Feb 23, 2024
@charlag charlag added this to the Technical tasks milestone Feb 23, 2024
tutao-mac added a commit that referenced this issue Mar 1, 2024
@paw-hub paw-hub linked a pull request Mar 1, 2024 that will close this issue
paw-hub pushed a commit that referenced this issue Mar 1, 2024
tutao-mac added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Fixes #6603
tutao-mac added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Fixes #6603
tutao-mac added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Fixes #6603
tutao-mac added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Fixes #6603
tutao-mac added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Fixes #6603
paw-hub added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Fixes #6603
tutao-mac pushed a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Fixes #6603
tutao-mac pushed a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Fixes #6603
paw-hub added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Also stop using a .xcframework and just conditionally static-link the
.a files depending on architecture, and use the include directory from
the build tools.

Fixes #6603
paw-hub added a commit that referenced this issue Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Also stop using a .xcframework and just conditionally static-link the
.a files depending on architecture, and use the include directory from
the build tools.

Fixes #6603
@paw-hub paw-hub added the ios issues that concern the ios client but not all clients label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ios issues that concern the ios client but not all clients maintenance dependency updates, key renewals, code cleanup
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants