SSL错误:无法验证第一个证书。

4

我有 SSL 证书 zip 文件和 privatekey.key 文件。总共有证书文件 .crt,另外一个名称为 bundle.crt.crt 文件以及带有扩展名 .key.pem 文件和私钥。

现在我正在尝试使用这些文件在 Istio 中创建一个 secret。我能够使用这些文件 (thecertificate.certprivatekey.key,而不是使用 .pembundle.crt 文件) 来创建一个 secret。但当我在我的 Istio 入口网关配置中使用它并进行测试时,在 Postman 上出现错误:

SSL Error: Unable to verify the first certificate.

以下是详细信息:
# kubectl create -n istio-system secret tls dibbler-certificate --key=privatekey.key --cert=thecertificate.crt

# kubectl get secrets -n istio-system

输出:dibbler-certificate

网关:

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: dibbler-gateway
spec:
  selector:
    istio: ingressgateway
  servers:
  servers:
  - port:
      number: 443
      name: https
      protocol: HTTPS
    tls:
      mode: SIMPLE
      # serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
      # privateKey: /etc/istio/ingressgateway-certs/tls.key
      credentialName: dibbler-certificate
    hosts:
    - "test.ht.io" # domain name goes here

非常感谢您的帮助。


您使用的Kubernetes和Istio版本是哪个,以及您如何设置集群?您是使用裸机安装还是某个云提供商?重现您的问题非常重要。 - Mikołaj Głodziak
1个回答

1

您的配置文件看起来很好。我在discuss.istio.io上找到了非常相似的问题。该问题通过以下方式解决:

两个服务器也出现了错误,但重要的是我必须将godaddy ssl证书.crt和bundle.crt连接起来,然后使用私钥创建安全证书。现在它正常工作。

您还可以参见此postman页面


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接