如何使用RSA&配置Apache Apisix同一域的ECC双证书?

发布于 2025-02-03 10:35:58 字数 42 浏览 1 评论 0 原文

我正在APISIX上配置我的域名证书,我想知道如何配置两种类型的证书?

I am configuring a certificate for my domain on APISIX and I would like to know how to configure both types of certificates?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

欢烬 2025-02-10 10:35:58

APISIX支持通过TLS扩展服务器名称指示(SNI)加载多个SSL证书。您可以使用apisix admin API进行 ssl 创建Apisix中的SSL对象。作为

单个域的多个证书:

如果要为单个域配置多个证书,则
实例,支持两个
ecc
和RSA键交换算法,然后只配置额外的证书(
第一证书和私钥仍应放入 cert )和
certs

  • certs :PEM编码的证书数组。
  • :PEM编码的私钥数组。

apisix 将证书和私钥与SSL密钥相同的索引配对
一对。因此 certs的长度必须相同。

因此,要使用RSA&配置Apache Apisix ECC的同一域双证书,您必须做类似的事情:

curl -X PUT "127.0.0.1:9180/apisix/admin/ssls/1" \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -d 
'{
    "cert": "certificate",
    "key": "key",
    "snis": [...],
    "certs": [...], <- extra certificates
    "keys": [...],  <- extra keys
}'

APISIX supports loading multiple SSL certificates by TLS extension Server Name Indication (SNI). You can use the APISIX Admin API for SSL to create SSL objects in APISIX. And as the documentation quotes:

Multiple certificates for a single domain:

If you want to configure multiple certificates for a single domain, for
instance, supporting both the
ECC
and RSA key-exchange algorithm, then just configure the extra certificates (the
first certificate and private key should be still put in cert and key) and
private keys by certs and keys.

  • certs: PEM-encoded certificate array.
  • keys: PEM-encoded private key array.

APISIX will pair the certificate and private key with the same indices as an SSL key
pair. So the length of certs and keys must be the same.

So to configure Apache APISIX with RSA & ECC dual certificates for the same domain, you would have to do something like this:

curl -X PUT "127.0.0.1:9180/apisix/admin/ssls/1" \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -d 
'{
    "cert": "certificate",
    "key": "key",
    "snis": [...],
    "certs": [...], <- extra certificates
    "keys": [...],  <- extra keys
}'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文