Effacer les filtres
Effacer les filtres

libcrypto.so coming with Matlab Runtime breaks SSL for self signed certificates

8 vues (au cours des 30 derniers jours)
Giacomo Rebonato
Giacomo Rebonato le 28 Jan 2021
Commenté : Kautuk Raj le 20 Fév 2024
I am using Matlab Compiler SDK to compile some Matlab code to .net DLL that I use as a dependency in a dotnet code 5 project.
The project is running inside a AWS Docker image for writing Lambda in dotnet 5.
In general everything works and as you can see the documentation points out that setting the env var LD_LIBRARY_PATH is key for this functionality.
What breaks is that I can't anymore make request to https end points with self signed certificates (all AWS services DynamoDB, S3, etc...). The problem disappears as I take out the LD_LIBRARY_PATH with Matlab libraries, but of course when I do that Matlab binaries don't work anymore.
I have been reading articles like this one, yet I didn't manage to fix this SSL issue, that of course I can bypass but I don't intend to.
.net exception
The SSL connection could not be established, see inner exception. The remote certificate is invalid according to the validation procedure.
INNER EXCEPTION: The remote certificate is invalid because of errors in > the certificate chain: PartialChain
I found out that the specific libraries that is causing this exception are:
  • /opt/mcr/v99/bin/glnxa64/libssl.so.1.1
  • /opt/mcr/v99/bin/glnxa64/libssl.so.1
  • /opt/mcr/v99/bin/glnxa64/libcrypto.so.1.1
  • /opt/mcr/v99/bin/glnxa64/libcrypto.so.1
They are provided by Matlab and added to LD_LIBRARY_PATH.
I have tried to remove those and link the system one and in this way I fix the SSL issue, but I break Matlab execution.
Useful articles
  4 commentaires

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB Compiler SDK dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by