ssl - 如何将证书添加到 Kong。发出 https 请求
问题描述
我正在尝试使用此文档kong docs添加证书
但我无法弄清楚如何生成这些“证书”和“密钥”pem 文件。
我尝试使用 puttygen 生成的公钥和私钥,但没有锻炼。
一个样本将非常有帮助
{
"message": "3 schema violations (cert: invalid certificate: x509.cert.new: asn1_lib.c:101:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long; key: invalid key: pkey.new: tasn_dec.c:1130:error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag; tags: expected a set)",
"name": "schema violation",
"fields": {
"tags": "expected a set",
"cert": "invalid certificate: x509.cert.new: asn1_lib.c:101:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long",
"key": "invalid key: pkey.new: tasn_dec.c:1130:error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag"
},
"code": 2
}
这是我收到的错误
解决方案
试试这个命令
curl -i -X 'POST' http://localhost:8001/certificates \
-F 'cert= Content PEM archive ' \
-F 'key= Content key archive without password ' \
-F 'snis=subdomain.mydomain.com'
推荐阅读
- azure - 如何将 .NET Core 3.x 与 Azure Function App Powershell Runtime 一起使用?
- git - 快捷方式 git 分支结帐
- javascript - 在for循环react js中进行单独的条件渲染
- python - 如何从 PyQt 的 QWebEnginePage.runJavaScript() 中获取返回值
- apache-flink - 通过 jackson JavaTimeModule 支持 java.time.Instant serde
- scala - scala中反引号中的文字标识符
- c# - 如何使用 .sln 和 .proj 文件查找项目的 TargetPath/可执行路径?
- vue.js - Vue如何从子组件中获取价值
- reactjs - Atom Beautify 的格式化问题
- pytorch - Pytorch:寻找一个功能,让我手动设置特定时期间隔的学习率