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

8 次查看(过去 30 天)
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 个评论

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB Compiler SDK 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by