V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
neilp
V2EX  ›  SSL

letsencrypt 野卡正式上线, 来试试吧

  •  9
     
  •   neilp · 2018-03-14 07:46:23 +08:00 · 23062 次点击
    这是一个创建于 2207 天前的主题,其中的信息可能已经有所发展或是发生改变。

    由于野卡验证只支持 dns 验证, 不支持 http 验证. 所以请使用 dns api 模式.

    acme.sh  --issue -d  exmaple.com  -d *.example.com  --dns dns_cf
    

    acme.sh 支持了 40 多种 dns api 的原生集成, 相信一定有你用的那一款.

    https://github.com/Neilpang/acme.sh/tree/master/dnsapi

    如果实在没有, 可以尝尝我们独有的 dns alias 模式:

    https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode

    132 条回复    2018-05-28 08:41:42 +08:00
    1  2  
    mortal
        101
    mortal  
       2018-03-15 01:29:34 +08:00
    来给作者表达谢意,这脚本太棒了!
    lemonda
        102
    lemonda  
       2018-03-15 03:25:50 +08:00
    @Hardrain
    谢谢!
    用一次生成一次的话不能自动,如果只是自己用还可以,管理着很多不同地方注册的域名就不方便了。
    我刚刚才看到有 DNS alias mode,这个不错,专门买个域名注册个 Cloudflare 用于验证就行。
    yuzenan888
        103
    yuzenan888  
       2018-03-15 08:36:11 +08:00
    好东西!不过为什么要两个域名?
    fengtalk
        104
    fengtalk  
       2018-03-15 08:51:39 +08:00
    @yuzenan888 #103 如果只签发了*.example.com ,example.com 这个域名用是不了这个数字证书的。
    yuzenan888
        105
    yuzenan888  
       2018-03-15 09:17:39 +08:00
    @fengtalk 刚试了下,果真如此。
    trys1
        106
    trys1  
       2018-03-15 09:35:21 +08:00
    @neilp #96 我今天回到昨天的 screen 会话想看控制台汇报给你,但是 screen 看不到昨天的记录了,log 有记录在.acme.sh/目录下吗?
    我今天用--force 想重现昨天的问题,也重现不了,直接成功了
    heiybb
        107
    heiybb  
       2018-03-15 12:14:10 +08:00
    用 CloudXNS 的 API 一直提示 invalid domain
    核对了一下 key 无误依旧不成功只好换到 CloudFare 了然后成功签上了
    neilp
        108
    neilp  
    OP
       2018-03-15 13:04:57 +08:00
    @heiybb 请添加 log `--debug 2`, 然后去 github 上报 bug
    neilp
        109
    neilp  
    OP
       2018-03-15 13:14:59 +08:00
    @trys1 有 log 但是默认不开启, 你先手动开启 log

    ```
    acme.sh --update-account --log --log-level 2
    ```

    以后你的所有操作都会有 log 了.
    jaleo
        110
    jaleo  
       2018-03-15 14:32:20 +08:00
    @neilp 大师,请问我已经申请了 rsa 证书,现在想用 rsa+ecc 双证书,是不是再用下面代码执行一次? 比如 acme.sh --issue -d domain.com -d *.domain.com --dns dns_ali --keylength ec-256
    jaleo
        111
    jaleo  
       2018-03-15 15:17:11 +08:00
    @neilp 生成 ecc 证书后 再用 acme.sh --installcert 安装,以后两种 rsa 和 ecc 证书都会自动更新吗?
    jaleo
        112
    jaleo  
       2018-03-15 16:49:52 +08:00
    终于搞定 ecc 证书 之前在 installcert 时没加 --ecc 参数 结果 copy 过去的依旧是 rsa 证书
    感谢大师 @neilp 提供这么好的工具
    locktionc
        113
    locktionc  
       2018-03-15 23:43:08 +08:00
    ![]( http://7sbpmp.com1.z0.glb.clouddn.com/2018-03-15-23-42-39.png)
    报了一个错:Unknown parameter,不知道是什么原因。。。
    neilp
        114
    neilp  
    OP
       2018-03-15 23:56:24 +08:00
    @locktionc 把带星号的域名 用引号引起来, 否则 shell 会提前解释.

    ```
    acme.sh --issue -d "*.aaa.com"
    ```
    locktionc
        115
    locktionc  
       2018-03-16 10:22:18 +08:00
    @neilp 建议更新一下文档,文档中的示例没有打引号。
    powergx
        116
    powergx  
       2018-03-16 11:20:03 +08:00
    从 dnspod 迁到了 cloudflare,加了 CAA 记录 一切都完美了
    qinxi
        117
    qinxi  
       2018-03-16 11:48:15 +08:00
    @neilp 6 试了一下,居然还有这种操作...完美啊.
    官方说明支持这种操作吗?还是大佬自己想出来的
    ccbikai
        118
    ccbikai  
       2018-03-17 11:55:02 +08:00
    @qinxi #117 Linux 基础
    qinxi
        119
    qinxi  
       2018-03-17 12:21:21 +08:00
    @ccbikai alias 模式属于 linux 基础? 我书读得少也不能这么忽悠人
    neilp
        120
    neilp  
    OP
       2018-03-17 23:58:08 +08:00
    @qinxi 这个是来自于 官方 的方案, 当年 LE 刚发布的时候, 就提到过这个模式. 我当时就知道了. 只是现在才实现而已. 因为 dns 方式变得重要了 现在. 从 DNS 协议的层面来说, cname 就是这个意思. 就是要委托自身的全部解析给 cname. 这也是为什么裸域一般不能设置成 cname 的原因.
    marcher233
        121
    marcher233  
       2018-03-20 16:16:01 +08:00
    acme.sh 太棒了,特意前来感谢 neilpang !
    wshedu
        122
    wshedu  
       2018-03-22 21:50:19 +08:00
    @powergx 现在 dnspod 也支持,,需要获取到 token,而且里面有 dnspod 的运行脚本
    powergx
        123
    powergx  
       2018-03-23 13:26:44 +08:00
    @wshedu 不知道为什么,我始终报没有 CAA 记录的错,只能把 ns 改去 cloudflare 就完美了
    reechang
        124
    reechang  
       2018-03-26 16:40:52 +08:00 via Android
    请问一下现在支持签发 ECC 的泛域名证书吗?
    wql
        125
    wql  
       2018-03-28 07:53:10 +08:00 via Android
    @reechang 纯 ECC 证书链没有,但是可以签发 ECC 证书。
    Seymer
        126
    Seymer  
       2018-04-03 20:45:33 +08:00
    @neilp 请问下使用 dns 验证是否意味着可以绕过备案?
    renjuntao
        127
    renjuntao  
       2018-04-05 21:12:06 +08:00
    试了几次没成功,然后提示下面这个
    Create new order error. Le_OrderFinalize not founme:error:rateLimited","detail":"Error creating new order :: too many failed auth://letsencrypt.org/docs/rate-limits/","status": 429}
    之后再命令行后面追加 --test 就行了,好像是测试环境,不知道生成的证书跟正式环境的证书有啥区别
    tonyleen
        128
    tonyleen  
       2018-05-11 00:25:01 +08:00
    tonyleen
        129
    tonyleen  
       2018-05-11 00:26:15 +08:00   ❤️ 1
    @zhaohao 官方有如下说明

    Name.com API and Mobile Apps Access
    You have Two-Step Verification enabled on your account. Our API and mobile apps do not support this service. You can manage mobile and API access to your name.com account below. Selecting "yes" will enable your account to be accessed by our mobile apps and API without the security token. Selecting "no" will disallow you to login to your account through the API or mobile apps.

    进入如下地址,https://www.name.com/account/settings/security,拉到最下面选择 yes 就可以了.
    zhaohao
        130
    zhaohao  
       2018-05-11 07:31:01 +08:00 via Android
    @tonyleen 是的,当时已经猜测问题是两步验证的影响,后面看过说明已经用上了。感谢你的回复!
    will1916
        131
    will1916  
       2018-05-18 17:38:54 +08:00
    用 DNS 的 api 签出来之后得出的证书文件跟用 certbot 签出来的完全不一样,不懂 Nginx 怎么配置,请教
    文件如下:

    ca.cer
    fullchain.cer
    xxx.com.cer
    xxx.com.conf
    xxx.com.csr
    xxx.com.csr.conf
    xxx.com.key
    ========================================================================
    请问怎么对应下面的文件路径
    ssl_dhparam /
    ssl_certificate /
    ssl_certificate_key /
    ssl_trusted_certificate /
    huanter
        132
    huanter  
       2018-05-28 08:41:42 +08:00
    @neilp 脚本能直接生成给 Tomcat 用的证书吗?
    1  2  
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5332 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 08:10 · PVG 16:10 · LAX 01:10 · JFK 04:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.