Webwrite with SSL Certification

조회 수: 33 (최근 30일)
Simon Ward
Simon Ward 2023년 10월 13일
댓글: Joey 2024년 10월 10일
Hi folks
I've used webwrite for a bunch of calls to various APIs, but I'm lost with this one...
I am connecting to a web service that requires SSL verification. I can connect with SOAPUi without trouble, so I'm hoping to roll out a similar solution in Matlab. I have a .pem file for both the cert and the key, however weboptions makes reference to CertificateFileName but not any accompanying key or password. It's also not clear what kind of certificates can be handled by Matlab for this purpose (.pem / .p12 etc).
I'm sure there is a Java workaround, but it would be great if this type of query could be handled in the Matlab environment.
Any hint would be really appreciated.
Thanks
Simon
  댓글 수: 1
Joey
Joey 2024년 10월 10일
Did you ever figure this out by chance? Simply combining the .crt and .pem into a single .pem and trying to pass it through CertificateFileName attitrubte in weboptions did not work for me

댓글을 달려면 로그인하십시오.

답변 (1개)

Dheeraj
Dheeraj 2023년 10월 26일
Hi,
I understand you want to connect to a web service that require SSL certification. MATLAB “weboptions” object supports “.pem” certificates for “CertificateFileName” attribute however regarding the key for the SSL certificate, SSL has its public key already embedded into the certificate and the private key is in the web server of the page you would like to access, and the private key is used to decrypt the certificate to validate it.
So, you could use HTTPS built in classes in MATLAB to connect to a web service by creating and configuring the “weboptions” object.
You could go through the link below to get better insights about how to use HTTPS and “weboptions”.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by