那些免费证书

1 一年的单域名的证书
都是国内云厂商提供的,都是要实名的
第一个是华为云和阿里云的encryption everywhere

华为云的怎么申请看这里
https://www.huaweicloud.com/zhishi/sslfree.html
阿里云的https://developer.aliyun.com/article/875508
trust asia的,腾讯,宝塔,ucloud,青云,好像还有几个,
但是记得,同一主域最多只能申请20张
腾讯https://console.cloud.tencent.com/ssl,有个免费证书,点进去
宝塔直接在面板里就有
ucloud https://console.ucloud.cn/ussl/Free
青云https://www.qingcloud.com/pricing

2 acme.sh申请的三个月的通配符证书
Let's Encrypt ,zerossl和谷歌的三个月的

系统是debian
①安装acme.sh

curl https://get.acme.sh | sh

如果报错,安装socat

apt install socat -y

确认acme.sh已经安装,显示acme.sh版本,如果没反应的话重启下

acme.sh -v

②切换默认ca
切换成Let's encrypt

acme.sh --set-default-ca --server letsencrypt

切换成gcp的

acme.sh --set-default-ca --server google

切换成zerossl

acme.sh --set-default-ca  --server zerossl

zerossl要邮箱的,https://app.zerossl.com/signup,在这边注册个账户,然后输入下面的命令就行

acme.sh --register-account -m [email protected]

②.5 如果用gcp的证书的话申请gcp证书的api
https://console.cloud.google.com/

cloudshell

gcloud beta publicca external-account-keys create
acme.sh --register-account --server google -m [email protected] 
--eab-hmac-key 申请到b64MacKey
--eab-kid 申请到的keyId]

③设置api
腾讯云dnspod api获取地址
https://console.dnspod.cn/account/token/apikey

export DP_Id="123456"
export DP_Key="abcdefg"

阿里云dns api
https://usercenter.console.aliyun.com/

export Ali_Key="AccessKeyId"
export Ali_Secret="AccessKeySecret"

cloudflare的api的话
https://dash.cloudflare.com/profile/api-tokens
申请Global API Key

export CF_Key="Global API Key" 
export CF_Email="你cloudflare邮箱"

④申请证书

腾讯云dnspod

acme.sh --issue --dns dns_dp -d xxx.com -d *.xxx.com

阿里云dns

acme.sh --issue --dns dns_ali -d xxx.com -d *.xxx.com

cloudflare

acme.sh --issue --dns dns_cf -d *.xxx.com -d xxx.com

还有半年的bypass证书,不过是单域名的,还不如阿里腾讯啥的一年的,我就没申请了
不想敲命令的话,可以试下这个,在线申请
https://letsencrypt.osfipin.com/
怎么玩的话看imgurl图床作者的博客
https://blog.xiaoz.org/archives/18775
3cf的那个15年的是自签证书,要配合他家cdn用的,现在所有浏览器,谷歌chrome,微软edge,苹果safari,火狐,还有那种套壳的,里面的证书通通最多就13个月
两年的证书已经成历史了
这15年时给你回源用的,得配合cf的cdn,点亮小云朵才行

点赞
  1. Clang3911说道:

    感谢分享, 有个问题请教各位

    使用 letsencrypt 证书 浏览器(PC/android) 认可, 但 android app 不认可是什么问题

    curl https://site
    
    curl: (60) SSL certificate problem: unable to get local issuer certificate
    More details here: https://curl.se/docs/sslcerts.html
    
    curl failed to verify the legitimacy of the server and therefore could not
    establish a secure connection to it. To learn more about this situation and
    how to fix it, please visit the web page mentioned above.
    

    证书申请命令

    curl https://get.acme.sh | sh
    
    CMD_ACME="${HOME}/.acme.sh/acme.sh"
    
    # change ca
    $CMD_ACME --set-default-ca --server letsencrypt
    # install cert
    $CMD_ACME  --issue -d "$DOMAIN" -k ec-256 --webroot  /var/www/html
    

    是 CA 问题吗?

  2. Dogelee2说道:

    @Clang3911 #1
    我感觉是let's的那个ISRG Root X1根证书的问题
    你换成zerossl试下

  3. Testcharon说道:
    curl https://get.acme.sh | sh -s [email protected]
    
    alias acme.sh=~/.acme.sh/acme.sh
    
    acme.sh --set-default-ca  --server zerossl
    
    acme.sh --dns dns_dp --issue -d 'drive.microbin.dev' --keylength 2048
    
    acme.sh --install-cert -d drive.microcharon.dev \
    --cert-file /usr/local/apache/conf/ssl/drive.microbin.dev/drive.microbin.dev.crt \
    --key-file /usr/local/apache/conf/ssl/drive.microbin.dev/drive.microbin.dev.key  \
    --fullchain-file /usr/local/apache/conf/ssl/drive.microbin.dev/fullchain.cer \
    --reloadcmd "lnmp httpd restart"
    
    acme.sh --revoke -d microbin.dev
    

    習慣用 RSA2048 的,不習慣用 ECC

    另外就是 export 變量寫在 /etc/profile 裡面防止失效

发表回复

电子邮件地址不会被公开。必填项已用 * 标注

×
订阅图标按钮