Borrar filtros
Borrar filtros

Webwrite with SSL Certification

20 visualizaciones (últimos 30 días)
Simon Ward
Simon Ward el 13 de Oct. de 2023
Respondida: Dheeraj el 26 de Oct. de 2023
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

Respuestas (1)

Dheeraj
Dheeraj el 26 de Oct. de 2023
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!

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by