【问题标题】:traefik's tls: client didn't provide a certificate when accessing https endpointtraefik 的 tls:客户端在访问 https 端点时没有提供证书
【发布时间】:2019-01-03 22:28:41
【问题描述】:

这是我的配置

[entryPoints]
  [entryPoints.http]
  address = ":801"

  [entryPoints.https]
  address = ":802"
  [entryPoints.https.tls]
    [entryPoints.https.tls.ClientCA]
      files = ["/etc/ssl/comodo/bundle.crt"]

      [[entryPoints.https.tls.certificates]]
        certFile = "/etc/ssl/comodo/www.crt"
        keyFile = "/etc/ssl/comodo/www.key"

[frontends]
    [frontends.http] # default
      entryPoints = ["http", "https"]
      backend = "fallback"
      passHostHeader = true

现在我正在尝试访问 https://mydomain:802,但在 traefik 调试输出中出现以下错误 http: TLS handshake error from 111.111.111.111:64463: tls: client didn't provide a certificate

卷曲错误信息 error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate

我不知道我做错了什么。

【问题讨论】:

    标签: https traefik


    【解决方案1】:

    为什么要使用相互身份验证(双向握手)?对于普通的 SSL 连接,您的服务器证书就足够了。

    在您的 traefik.toml 中,您正在配置 Mutual authentication。如果你真的想要,你必须在你的 curl 请求中提供证书:

    curl --cert client.pem:<password> --key key.pem --cacert ca.pem
    

    如果您只想提供“普通” SSL,则应删除以下行:

        [entryPoints.https.tls.ClientCA]
          files = ["/etc/ssl/comodo/bundle.crt"]
    

    【讨论】:

      猜你喜欢
      • 2019-10-25
      • 2023-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-01
      • 2017-01-02
      • 1970-01-01
      相关资源
      最近更新 更多