![Google App Engine 是否支持自定义证书颁发机构 (CA)?“证书数据无效。”](https://linux22.com/image/750772/Google%20App%20Engine%20%E6%98%AF%E5%90%A6%E6%94%AF%E6%8C%81%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%81%E4%B9%A6%E9%A2%81%E5%8F%91%E6%9C%BA%E6%9E%84%20(CA)%EF%BC%9F%E2%80%9C%E8%AF%81%E4%B9%A6%E6%95%B0%E6%8D%AE%E6%97%A0%E6%95%88%E3%80%82%E2%80%9D.png)
我正在尝试上传并使用我使用自己创建的个人 CA 生成的自定义 SSL 证书和私钥。
我已经完成了他们的指南中的所有步骤: https://cloud.google.com/appengine/docs/standard/nodejs/securing-custom-domains-with-ssl#converting_private_keys_and_concatenating_ssl_certificates
但是当我尝试上传证书和密钥时出现以下错误:
The certificate data is invalid. Please ensure that the private key and public certificate match.
我尝试了各种编码、链式顺序等,但总是出现同样的错误。我没有看到任何明确指出您可以拥有自己的自定义 CA 的内容,所以我很好奇这是否是问题所在。
我从上传 API 请求(控制台)获取的原始 HTTP 响应主体如下:
)]}'
{"code":3,"trackingId":"8598058641280346134","errorSpace":"generic","status":400,"message":"backend error"}
由于我现在只做了一个开发实例以确保它是可行的,因此这是我的测试证书链和私钥(这些并未用于生产,我特意发布它们以帮助调试此问题,它们不是敏感数据):
证书链:
-----BEGIN CERTIFICATE-----
MIID8TCCAtmgAwIBAgIJAL27hhOcC13lMA0GCSqGSIb3DQEBCwUAMGcxCzAJBgNV
BAYTAlVTMRMwEQYDVQQKEwpHcmFudFByb3h5MQswCQYDVQQIEwJDQTEhMB8GA1UE
CxMYR3JhbnRQcm94eSBCcm93c2VyIFByb3h5MRMwEQYDVQQDEwpHcmFudFByb3h5
MB4XDTIwMDQwODIwMzQ1OVoXDTIxMDQwODIwMzQ1OVowWDELMAkGA1UEBhMCVVMx
CzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMSQwIgYDVQQDDBtj
YS10ZXN0LXBhZ2U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