etcd证书的更新

时间:2021-06-12 05:03:35

标签: ssl

最近面临ETCD证书更新的问题。我想将证书更新 100 年。我根据文档做了一切,但并非所有证书都更新了 100 年。 ca.pem 只能续期 5 年 notAfter=Jun 9 09:19:00 2026 GMT

certificates ca.pem 可以延长更长时间吗?

我的配置

cat ca-config.json 
{
    "signing": {
        "default": {
            "expiry": "876000h"
        },
        "profiles": {
            "server": {
                "expiry": "876000h",
                "usages": [
                    "signing",
                    "key encipherment",
                    "server auth",
                    "client auth"
                ]
            },
            "client": {
                "expiry": "876000h",
                "usages": [
                    "signing",
                    "key encipherment",
                    "client auth"
                ]
            },
            "peer": {
                "expiry": "876000h",
                "usages": [
                    "signing",
                    "key encipherment",
                    "server auth",
                    "client auth"
                ]
            }
        }
    }
}

1 个答案:

答案 0 :(得分:0)

这需要更改 ca-csr.json

{
    "CA": {
        "expiry": "876000h",
        "pathlen": 0
    },
    "CN": "etcd",
    "key": {
        "algo": "rsa",
        "size": 2048
    }
}

然后重新生成证书

cfssl gencert -initca ca-csr.json | cfssljson -bare ca -

我们看到结果 openssl x509 -enddate -noout -in ca.pem

notAfter=May 19 09:26:00 2121 GMT