https证书申请工具(2)

https证书申请工具里介绍了如何方便地申请https证书,其中类似*.xlongwei.com的通配符域名还是有点麻烦,恰好我用的是aliyun的云解析,并且logserver已经引入了aliyun-sdk的相关依赖,修改DNS解析就很简单了。

https.html,561行,ajaxStyle(step,write,read),从read读取内容,ajax调用/log?type=https&step=alidns&param=true

<button onclick="ajaxStyle('alidns','.dns_resp','.dns_data')">ajaxHttps</button>&nbsp;<button onclick="ajaxStyle('alidns','.dns_resp','.dns_resp')">check</button>&nbsp;<input type="text" class="dns_resp" value="" style="287px"/>

image

PageHandler.java,264行,根据value判断是check还是set操作,自动设置DNS TXT record(其他域名请配置aliyun相关参数)

image

证书生成后更新相关服务:对于light4j应用,sh start.sh keystore,sh start.sh rebuild

image


相关代码可以参考logserver项目,欢迎关注。

原文地址:https://www.cnblogs.com/xingqi/p/12489770.html