如何在 Redhat Linux 上使用自签名证书为 k6 客户端配置 SSL?

问题描述 投票:0回答:1

我尝试遵循文档并使用以下代码片段:

tlsAuth: [
    {
      domains: ['example.com'],
      cert: open('./mycert.pem'),
      key: open('./mycert-key.pem'),
    }

但是,我很难让它发挥作用。您能否提供一些有关在 Redhat Linux 上使用自签名证书为 k6 客户端配置 SSL 的必要步骤的指导?

linux spring-boot ssl redhat k6
1个回答
0
投票

我有同样的问题,我只是注意到使用“tlsAuth.domains”会导致日志中出现警告:

WARN[0000] tlsAuth.domains option could be removed in the next releases, it's recommended to leave it empty and let k6 automatically detect from the provided certificate. It follows the Go's NameToCertificate deprecation - https://pkg.go.dev/crypto/[email protected]#Config.

但是我没有成功生成k6“自动检测”的证书:(

您是否设法创建 k6 使用的客户端证书?

© www.soinside.com 2019 - 2024. All rights reserved.