フィルターのクリア

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

8 ビュー (過去 30 日間)
Giacomo Rebonato
Giacomo Rebonato 2021 年 1 月 28 日
コメント済み: Kautuk Raj 2024 年 2 月 20 日
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 件のコメント
Giacomo Rebonato
Giacomo Rebonato 2021 年 2 月 1 日
Ticket: 04717330
Kautuk Raj
Kautuk Raj 2024 年 2 月 20 日
A solution to the question is posted by the OP here: .net - SSL broken with LD_LIBRARY_PATH and Matlab - Stack Overflow

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet 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