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

Fixing a crash related to the OpenSSL library #646

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

Conversation

sergeishere
Copy link

@sergeishere sergeishere commented Sep 7, 2024

Making cert with OpenSSL from the latest commit causes a crash because it fails to load the legacy provider. To avoid the crash and allow legacy algorithms, the library needed to be rebuilt.

I rebuilt the libraries with the necessary parameters and added them to the repository. During the build, I disabled unused algorithms and technologies to reduce the size. The libraries are linked in Build Settings through Other Linker Flags.

Parameters using during build:

enable-weak-ssl-ciphers enable-ssl2 no-asm no-shared no-module no-sock no-hw no-afalgeng no-apps no-async no-capieng no-comp no-deprecated no-dgram no-dso no-gost no-http no-nextprotoneg no-ocsp no-padlockeng no-sm2-precomp no-srp no-srtp no-sse2 no-ssl-trace no-quic no-ui-console no-uplink no-tls no-dtls no-tests no-aria no-bf no-blake2 no-camellia no-cast no-chacha no-cmac no-dh no-dsa no-ecdh no-ecdsa no-idea no-md4 no-mdc2 no-ocb no-poly1305 no-rc4 no-rmd160 no-scrypt no-seed no-siphash no-siv no-sm2 no-sm3 no-sm4 no-whirlpool no-ec no-ec2m

All schemes have been tested except for the Apple TV device (I don't have one).

The external dependency from the previous commit was accordingly removed, as it does not contain correct binaries.

@Priultimus
Copy link

I run into this error when I attempt to compile it on Xcode 16 -- not sure how if this is my own configuration issue or not though
screenshot3

@sergeishere
Copy link
Author

@Priultimus It seems that there are build artifacts left from the previous version — the screenshot mentions OpenSSL.framework, which should no longer be there. Can you try to clean the build folder for the main project and moonlight-common (or clean up the DerivedData folder) and then rebuild the project.

@Priultimus
Copy link

image Okay, embarrassingly I was on the wrong branch hahaha -- the same issue shows up though

@sergeishere
Copy link
Author

I'm also having issues with the project not building in Xcode 16 RC. Neither the main branch nor my openssl-fix branch.

@Priultimus
Copy link

On your branch Xcode lets me edit crypto.h, presumably because OpenSSL is precompiled and in this case if you just actually do what the IDE says and add "#include <sys/_types/_time_t.h>" to crypto.h it appears like everything just works lol

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.

2 participants