How do I generate a self-signed certificate for testing HTTPS functionality in MATLAB Web App Server?
20 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2021 年 10 月 4 日
編集済み: MathWorks Support Team
2025 年 1 月 31 日
I would like to generate a self-signed certificate to test out HTTPS functionality on MATLAB Web App server in a release starting from R2020a. I cannot obtain the certificates from my system administrator, since this is just a test, so I was wondering if there is a way for me to generate a certificate myself.
採用された回答
MathWorks Support Team
2025 年 1 月 17 日
編集済み: MathWorks Support Team
2025 年 1 月 31 日
To generate a self-signed certificate for testing HTTPS functionality in MATLAB Web App Server:
1. Open a terminal on a Linux machine. Or install OpenSSL for Windows machine.
2. Execute the following command:
openssl req -nodes -x509 -days 120 -subj "/C=US/ST=MyState/L=MyCity/O=MyCompany/OU=Employees/CN=www.mycompanyurl.com" \
-addext "subjectAltName = DNS:www.mycompanyurl.com" \
-addext "keyUsage = keyEncipherment,digitalSignature" \
-addext "extendedKeyUsage = serverAuth" \ -newkey rsa:2048 -keyout key.pem -out cert.pem
3. Copy the "key.pem" and "cert.pem" files generated by the "openssl" command to the "webapps_private" folder on the machine running MATLAB Web App Server.
4. To enable SSL and set up HTTP, please follow the instructions in the documentation. You can access the release-specific documentation by executing the following command in the MATLAB R2020a command window:
>> web(fullfile(docroot, 'webappserver/ug/enable-ssl.html'))
Note: Use the self-signed certificates generated by the script for testing only.
For deployment purposes, you need to obtain certificate files from a Certificate Authority (CA).
Please follow the below link to search for the required information regarding the current release:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Web App Server についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!