Skip to content

OpenSSlLoadException: Could not find libcrypto. in Android #99

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

Open
eserdeiro opened this issue Apr 19, 2024 · 2 comments
Open

OpenSSlLoadException: Could not find libcrypto. in Android #99

eserdeiro opened this issue Apr 19, 2024 · 2 comments

Comments

@eserdeiro
Copy link

eserdeiro commented Apr 19, 2024

Hi. I have a problem when I want to use the library on Android (API Level 33). DTLS version ^0.16.0
How can I solve that? Thank you

Captura de pantalla 2024-04-19 a la(s) 03 09 32

I have installed
https://pub.dev/packages/libcrypto in my project ( Version ^0.2.2 )

@JKRhb
Copy link
Owner

JKRhb commented Apr 20, 2024

Hi @eserdeiro! To get the library to work, you need to bundle OpenSSL with your app as shared libraries. One way to achieve this is via a Flutter Plugin that integrates the bundling into the build process.

There is one such project called flutter_openssl_crypto which you can use for that – however, it is only bundling one of the two parts of OpenSSL required for this library. To temporarily solve the issue, you can include a patched fork of the plugin into your app's dependencies, like so:

  flutter_openssl_crypto:
    git:
      url: https://gitlab.com/jkr_hb/flutter_openssl_crypto.git
      ref: add-ssl

Note that this plugin only really works for Android at the moment and only includes an older version of OpenSSL 1.1.1 which has reached “End of Life” status by now, so using it is not really advisable for production at the moment. However, it should hopefully be possible to create a new plugin based on OpenSSL 3.2 in the upcoming months. I will keep this issue open until then but will already update the documentation a bit in the meantime :)

@eserdeiro
Copy link
Author

Thanks for your answer! I will be aware of new updates.

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

No branches or pull requests

2 participants