|
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
6 | 6 | <link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAe1BMVEUDuu3///8AtuwAue1c0/QAt+1a0vSZ4/gOve4Ju+4AtOzf9v31/P4iw/DS8/yf5fnE7/tNzvMsxvHw+/7t+v7k+P2U4veO4PeA3Pbp+f7h9/3Y9f3I8Pxt1/Vi1PRQz/NDzPIzyPEWv+76/v/3/f+87fqn5/mI3/Z82vb+fQDoAAAA10lEQVQ4y63T2c7CIBCGYWamUwFZurfuy7/e/xVaeySlYmJ8T78nISQgPh0xU2pGZa1EfrazHJz5an2FT3brYKoul4UqAHx5Hhqoq6VTMAc4aER9acDjEviFPd2voP9gKykGVECHkzyBsRzvI+g1jWG5BFDIPXRKjqkcTKUwPISPbvsN9XpqA9DuehXsF4g64APALAY+AHkMVm+CzToNVld1NAmwE0zaJ0DBQughAcxZ66tLAGj6f/f2NdMgewXKGHSPgOTPfG/Dh0vqlAXlluefahaLT3UDvrAKrj7jLKkAAAAASUVORK5CYII=" />
|
7 | 7 |
|
8 |
| -<title>ACME Web Browser Client | ACME客户端H5网页单文件版,在线免费申请签发SSL/TLS通配符泛域名HTTPS证书,支持Let's Encrypt、ZeroSSL,无需账号免登录注册 | Get Wildcard Certificates Online For Free - Single HTML File</title> |
| 8 | +<title>ACME Web Browser Client | ACME客户端H5网页单文件版,在线免费申请签发SSL/TLS通配符泛域名HTTPS证书,支持Let's Encrypt、ZeroSSL,无需账号免登录注册 | Windows macOS Get Wildcard Certificates Online For Free - Single HTML File</title> |
9 | 9 | </head>
|
10 | 10 |
|
11 | 11 | <body>
|
12 | 12 | <script>
|
13 |
| -var Version="1.0.220920"; |
| 13 | +var Version="1.0.221001"; |
14 | 14 | console.log("LICENSE: GPL-3.0, https://github.com/xiangyuecn/ACME-HTML-Web-Browser-Client/blob/main/LICENSE");
|
15 | 15 | /***********************************
|
16 | 16 | 中英对照翻译主要来自:Chrome自带翻译+百度翻译,由中文翻译成English(作者英文很菜)。
|
|
22 | 22 | </script>
|
23 | 23 |
|
24 | 24 |
|
25 |
| -<div class="main-load Center" style="padding-top:40vh;font-size:28px">Loading...</div> |
| 25 | +<div class="main-load" style="padding-top:40vh;text-align:center;font-size:28px">Loading...</div> |
26 | 26 | <div class="main" style="display:none">
|
27 | 27 | <div class="mainBox acmeReadDirGotoCORSState" style="display:none"></div>
|
28 | 28 |
|
|
46 | 46 | <li class="langEN"><i>Functional use</i>This web client is used to: apply for free SSL/TLS domain name certificates (RSA, ECC/ECDSA) for HTTPS from <a href="https://letsencrypt.org/" target="_blank">Let's Encrypt</a> , <a href="https://zerossl.com/" target="_blank">ZeroSSL</a> and other certificate authorities that support the ACME protocol, and support multiple domain names and wildcard pan-domain names; Simply operate on a modern browser to obtain a domain name certificate in plain text in PEM format, does not depend on the operating system environment, does not need to download and install software, and is purely manual, <span class="Bold">only focus on the only thing that is to apply for and obtain a certificate.</span></li>
|
47 | 47 |
|
48 | 48 | <li class="langCN"><i>简单易用</i>点点鼠标 Ctrl+C Ctrl+V 就能完成证书的申请,全程需要的操作少,每一步都有保姆级操作提示,UI友好大气美观;<span class="Bold">本客户端不需要注册账号、更不需要登录。</span></li>
|
49 |
| - <li class="langEN"><i>Simple to use</i>Click the mouse and Ctrl+C Ctrl+V to complete the certificate application. The whole process requires less operations, and there are nanny level operation prompts at each step; UI friendly, atmospheric and beautiful; <span class="Bold">This client does not need to register an account, and does not need to log in.</span></li> |
| 49 | + <li class="langEN"><i>Easy to use</i>Click the mouse and Ctrl+C Ctrl+V to complete the certificate application. The whole process requires less operations, and there are nanny level operation prompts at each step; UI friendly, atmospheric and beautiful; <span class="Bold">This client does not need to register an account, and does not need to log in.</span></li> |
50 | 50 |
|
51 | 51 | <li class="langCN"><i>开源项目</i>本网页客户端源码已开源,访问网址由托管仓库提供,源码透明可追溯。</li>
|
52 | 52 | <li class="langEN"><i>Open source project</i>The source code of the client side of this webpage has been open sourced, and the access URL is provided by the hosting warehouse, and the source code is transparent and traceable.</li>
|
53 | 53 |
|
54 | 54 | <li class="langCN"><i>单一文件</i>本网页客户端仅一个静态 HTML 文件,不依赖其他任何文件;因此可以直接保存到你本地(右键-另存为),即可通过浏览器打开。</li>
|
55 |
| - <li class="langEN"><i>A single file</i>This web client is only a static HTML file and does not depend on any other files; therefore, it can be directly saved to your local (right-click - save as), and you can open it through a browser.</li> |
| 55 | + <li class="langEN"><i>A single file</i>This web client is only a single static HTML web page file and does not depend on any other files; therefore, it can be directly saved to your local (right-click - save as), and you can open it through a browser.</li> |
56 | 56 |
|
57 | 57 | <li class="langCN"><i>数据安全</i>除了你指定证书颁发机构的 ACME 接口地址外,本网页客户端不会向其他任何地址发送数据,通过浏览器控制台很容易做到网络数据审查。</li>
|
58 | 58 | <li class="langEN"><i>Data security</i>Except for the ACME interface address of the certificate authority you specify, this web client will not send data to any other address, and it is easy to check the network data through the browser console.</li>
|
|
620 | 620 |
|
621 | 621 |
|
622 | 622 | </div>
|
623 |
| -<script> |
624 |
| -var downloadFileNameShow=function(name){ |
625 |
| - $(".downloadFileName").html(name); |
626 |
| - $(".downloadKeyFileName").html(name+".key"); |
627 |
| - $(".downloadCertFileName").html(name+".pem"); |
628 |
| -}; |
629 |
| -</script> |
630 | 623 | </div>
|
631 | 624 |
|
632 | 625 |
|
|
947 | 940 | $(".eccCurveNames").html(X509.SupportECCType2Names().join(Lang("、",", ")));
|
948 | 941 | $(".donateBtnIco").html(unescape("%uD83D%uDE18"));
|
949 | 942 | $(".versionBox").html(Lang("版本: "+Version,"Ver: "+Version));
|
950 |
| - downloadFileNameShow("your_domain"); |
951 | 943 |
|
952 | 944 | if(/mobile/i.test(navigator.userAgent)){
|
953 | 945 | $(".main").prepend($(".langBtnBox").css("position",null));
|
|
968 | 960 |
|
969 | 961 | initTest_Restore();
|
970 | 962 | acmeReadDirGotoCORSInit();
|
| 963 | + downloadFileNameShow(); |
971 | 964 | initStep1();
|
972 | 965 | initStep2();
|
973 | 966 | initStep4();
|
|
1225 | 1218 | };
|
1226 | 1219 |
|
1227 | 1220 | var msg0=CLog(tag,0, ShowState(sEl,PleaseWaitTips()+Lang("正在创建","Generating ")+keyTag, 2));
|
1228 |
| - X509.KeyGenerate(type,function(pem){ |
| 1221 | + X509.KeyGenerate(type,type2,function(pem){ |
1229 | 1222 | if(UserClickSyncKill(id,tag,msg0))return;
|
1230 | 1223 | $(".in_privateKey").val(pem);
|
1231 | 1224 | CLog(tag,0, ShowState(sEl,keyTag+Lang(",创建成功。",", generated successfully."), 2), '\n'+pem);
|
|
1252 | 1245 | };
|
1253 | 1246 |
|
1254 | 1247 | var msg0=CLog(tag,0, ShowState(sEl,PleaseWaitTips()+Lang("正在创建","Generating ")+keyTag, 2));
|
1255 |
| - X509.KeyGenerate(type,function(pem){ |
| 1248 | + X509.KeyGenerate(type,type2,function(pem){ |
1256 | 1249 | if(UserClickSyncKill(id,tag,msg0))return;
|
1257 | 1250 | $(".in_accountKey").val(pem);
|
1258 | 1251 | CLog(tag,0, ShowState(sEl,keyTag+Lang(",创建成功。",", generated successfully."), 2), '\n'+pem);
|
|
1288 | 1281 | domains.splice(i,1); i--; continue;
|
1289 | 1282 | }else if(mp[domain])
|
1290 | 1283 | return ShowState(sEl,Lang("域名"+domain+"重复!","Duplicate domain name "+domain+"!"),1);
|
| 1284 | + if(/[:\/;]/.test(domain))//简单校验域名格式 |
| 1285 | + return ShowState(sEl,Lang("域名"+domain+"格式错误!","Format error of domain name "+domain+"!"),1); |
1291 | 1286 | mp[domain]=1;
|
1292 | 1287 | }
|
1293 | 1288 | localStorage[InputDomainsStoreKey]=domainsStore?domains.join(", "):"";
|
|
1679 | 1674 | CLog("DropConfigFile",0,"Reset Config",DropConfigFile);
|
1680 | 1675 | Toast(Lang("识别到拖入的记录LOG文件,已填充上次申请证书时使用的配置。","The LOG file of the dragged record is identified, and the configuration used in the last certificate application has been filled."),2);
|
1681 | 1676 | resetStep1();//重新初始化第1步
|
| 1677 | + downloadFileNameShow(); |
1682 | 1678 | }
|
1683 | 1679 | reader.readAsText(file);
|
1684 | 1680 | });
|
|
1693 | 1689 | if(type=="Cert") fileName+=".pem";
|
1694 | 1690 | if(type=="Key") fileName+=".key";
|
1695 | 1691 | if(type=="Log") fileName+=".log";
|
1696 |
| - if(DefaultDownloadFileNames[type]) fileName=DefaultDownloadFileNames[type]; |
| 1692 | + fileName=DefaultDownloadFileNames[type]||fileName; |
1697 | 1693 |
|
1698 | 1694 | var url=URL.createObjectURL(new Blob([val], {"type":"text/plain"}));
|
1699 | 1695 | var downA=document.createElement("A");
|
1700 | 1696 | downA.href=url;
|
1701 | 1697 | downA.download=fileName;
|
1702 | 1698 | downA.click();
|
1703 | 1699 | };
|
| 1700 | +window.downloadFileNameShow=function(name){//显示下载文件名称,优先使用手动设置的默认名称 |
| 1701 | + name=name||"your_domain"; |
| 1702 | + var name2=(DefaultDownloadFileNames.Cert||"").replace(/\.[^\.]+$/g,""); |
| 1703 | + $(".downloadFileName").html(name2||name); |
| 1704 | + $(".downloadKeyFileName").html(DefaultDownloadFileNames.Key||name+".key"); |
| 1705 | + $(".downloadCertFileName").html(DefaultDownloadFileNames.Cert||name+".pem"); |
| 1706 | +}; |
1704 | 1707 |
|
1705 | 1708 |
|
1706 | 1709 |
|
|
2248 | 2251 | }
|
2249 | 2252 | ,SupportECCType2Names:function(){ var str=[]; for(var k in X509.SupportECCType2)str.push(X509.SupportECCType2[k]); return str; }
|
2250 | 2253 |
|
2251 |
| - //创建RSA/ECC密钥对 |
2252 |
| - ,KeyGenerate:function(type,True,False){ |
| 2254 | + //创建RSA/ECC密钥对 type2取值:type=RSA时为密钥位数数值,type=ECC时为支持的曲线(X509.SupportECCType2) |
| 2255 | + ,KeyGenerate:function(type,type2,True,False){ |
2253 | 2256 | var algorithm=0;
|
2254 | 2257 | if(type=="RSA"){
|
2255 | 2258 | algorithm={ publicExponent: new Uint8Array([1, 0, 1]) //E: AQAB
|
2256 |
| - ,name:"RSASSA-PKCS1-v1_5", modulusLength:+X509.DefaultType2_RSA, hash:"SHA-256" }; |
| 2259 | + ,name:"RSASSA-PKCS1-v1_5", modulusLength:+type2, hash:"SHA-256" }; |
2257 | 2260 | }else if(type=="ECC"){
|
2258 |
| - algorithm={ name:"ECDSA", namedCurve:X509.DefaultType2_ECC }; |
| 2261 | + algorithm={ name:"ECDSA", namedCurve:type2 }; |
2259 | 2262 | }else{
|
2260 | 2263 | False("Not support "+type);
|
2261 | 2264 | return;
|
|
0 commit comments