Valandur / Web-API

RESTful web server for Minecraft Sponge including an admin panel
https://valandur.github.io/Web-API/
MIT License
66 stars 17 forks source link

how to edit our's SSL certificate #135

Open JimLeon595 opened 5 years ago

JimLeon595 commented 5 years ago

I have problem when login in outside. Chrome will show me like this


您的连接不是私密连接 攻击者可能会试图从https://www.test.com窃取您的信息(例如:密码、通讯内容或信用卡信息)。 NET::ERR_CERT_COMMON_NAME_INVALID

自动向 Google 报告可能出现的安全事件的详细信息。隐私权政策重新加载隐藏详情 https://www.test.com 通常会使用加密技术来保护您的信息。Google Chrome 此次尝试连接到 https://www.test.com 时,此网站发回了异常的错误凭据。这可能是因为有攻击者在试图冒充 https://www.test.com,或 Wi-Fi 登录屏幕中断了此次连接。请放心,您的信息仍然是安全的,因为 Google Chrome 尚未进行任何数据交换便停止了连接。 您目前无法访问 https://www.test.com,因为此网站使用了 HSTS。网络错误和攻击行为通常是暂时的,因此,此网页稍后可能就会恢复正常。了解详情。 ———————————————— It had a solution to fix it But i want to change the mod ssl certificate with my own certificate to make sure the link is safe.

Thanks a lot Jim Leon

Valandur commented 5 years ago

You have to create a new java keystore and import your ssl certificate using the java keytool. This article should help you get started.

Once you have created a java keystore (and have a file with a .jks file ending) you can set the customKeyStore and customKeyStorePassword (if enabled) in the main config/webapi/config.conf file to your keystore and Web-API will use your SSL certificate.

JimLeon595 commented 5 years ago

Thanks!!! I will try it!