我尝试遵循文档并使用以下代码片段:
tlsAuth: [
{
domains: ['example.com'],
cert: open('./mycert.pem'),
key: open('./mycert-key.pem'),
}
但是,我很难让它发挥作用。您能否提供一些有关在 Redhat Linux 上使用自签名证书为 k6 客户端配置 SSL 的必要步骤的指导?
我有同样的问题,我只是注意到使用“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 使用的客户端证书?