Skip to content

SSL Support #1

Description

@enricoantonini84

I've cross-compiled Mosquitto successfully with SSL support, here is how I got it working:

  • Download the OpenSSL source code.
  • Follow the guide to compile sources against the Android toolchain https://github.com/openssl/openssl/blob/master/NOTES-ANDROID.md
  • Now we must embed OpenSSL directly into the Mosquitto library, for some obscure reasons we cannot simply link OpenSSL including .so files in jniLibs. To achieve this, add the following options to cmake script:
    -DOPENSSL_LIBRARIES="../Mosquitto_TLS_Android-master/openssl-3.0.2" \ -DOPENSSL_CRYPTO_LIBRARY="../Mosquitto_TLS_Android-master/openssl-3.0.2/libcrypto.a" \ -DOPENSSL_SSL_LIBRARY="../Mosquitto_TLS_Android-master/openssl-3.0.2/libssl.a" \ -DOPENSSL_INCLUDE_DIR="../Mosquitto_TLS_Android-master/openssl-3.0.2/include" \

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions