- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在关注这个 AWS GUIDE关于创建自签名证书。
但是在创建我的 CA 后,我尝试将它上传到 AWS IOT 我收到此错误:
命令:aws iot register-ca-certificate --ca-certificate file://CA_cert.pem --verification-cert file://verificationCert.crt
错误:An error occurred (CertificateValidationException) when calling the RegisterCACertificate operation: CA certificate is not valid. The CA certificate does not have the basicConstraints extension as true
任何帮助表示赞赏!
最佳答案
我也使用了 AWS IoT 并遇到了同样的错误,我找到了解决方案。
错误原因
发生错误的原因是 basicConstraints
CA 证书中的扩展名,即该证书是 CA,因此该证书能够签署其他公钥以生成客户端证书,未设置为 TRUE
.
请注意,客户端 X 的证书包含由 CA 的私钥签名的 X 的公钥。其他客户端,例如 Y,可以使用 CA 的公钥验证 X 的公钥。
我认为您在尝试生成 CA 证书时遇到了错误。该错误消息表明不允许 CA 的证书对其他客户端公钥进行签名。
下面是我是怎么做的。
解决方案
我假设您已经生成了 CA 的 key ,rootCA.key
.
我们需要一个 openssl
配置文件,比如 rootCA_openssl.conf
.请注意,您可以修改这些值。
[ req ]
distinguished_name = req_distinguished_name
extensions = v3_ca
req_extensions = v3_ca
[ v3_ca ]
basicConstraints = CA:TRUE
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = KR
countryName_min = 2
countryName_max = 2
organizationName = Organization Name (eg, company)
organizationName_default = Deeply Inc.
rootCA_openssl.conf
.
openssl req -new -sha256 -key rootCA.key -nodes -out rootCA.csr -config rootCA_openssl.conf
openssl x509 -req -days 3650 -extfile rootCA_openssl.conf -extensions v3_ca -in rootCA.csr -signkey rootCA.key -out rootCA.pem
rootCA.pem
.
# Get the registration code for the use below:
# $ aws iot get-registration-code
openssl genrsa -out verificationCert.key 2048
openssl req -new -key verificationCert.key -out verificationCert.csr
# Put the registration code in Common Name field
openssl x509 -req -in verificationCert.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out verificationCert.crt -days 500 -sha256
关于amazon-web-services - CA 证书没有将 basicConstraints 扩展名设为 true,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50414315/
我有一个 .crt 文件。打开那个文件,我看到它以开头 -----BEGIN CERTIFICATE----- 如何从这个文件生成这 2 个文件?: 以-----BEGIN CERTIFICATE R
我有一个文件被加载到 fd.ChosenName 并想知道是否有一个快速的解决方案,例如与 stringbuilder 相反的截断文件名(扩展名)以用于显示目的。因此,如果 fd.ChosenName
我的文件名如下:name1.csv,我想提取该字符串的两个子字符串。一种将 name1 存储在一个变量中,另一种将扩展名 csv 存储在另一个变量中,但不带点。 我一直在寻找是否有像 Java 的 i
我正在尝试找出一种方法来确定我在 struts2 应用程序中上传的文件的文件类型。我的应用程序可以读取 CSV 和 XML 文件并根据上传的文件类型执行操作。我将该文件作为“File”类的实例。该文件
如何使用 NLP/信息提取 (IE) 方法检测/找出首字母缩略词的含义(扩展名)? 我们希望检测自由文本中是否使用了单词或其首字母缩略词,并将其映射到相同的实体/标记。 大多数在线论文都是关于医学缩略
我正在编写一个 shell 脚本,该脚本需要改变其行为,并根据特定 X11 扩展的存在或不存在为被调用程序提供不同的选项。我有一个可行的解决方案,但我希望有一个更干净的解决方案。我愿意考虑一个简单的
我要查找文件名的扩展名,扩展名只能是3个字符。 有点像, filename = str(input("Please enter filename: ")) 然后我想执行一个任务来查找扩展名,如果扩展名
我正在开发一种文档管理系统。最终用户是企业级用户。 我目前仅检查并允许上传符合以下条件之一的文件: "png|jpe?g|gif|xls|doc|docx|csv|ppt|txt|pdf|rtf" 我
尝试将文件列表添加到 Jlist,然后过滤 JList 中的文件以仅返回 .txt 文件和固定字符长度。还尝试删除返回的文件路径,并仅在文件 JList 中显示文件名+扩展名。 到目前为止,除了删除文
File.py file = fields.Binary('File') @api.multi def get_file(self): if self.file: xsl_fi
我尝试使用导航 Controller 使我的应用程序处于纵向模式我收到此错误 iam usring Xcode7 and Swift 2 And Target System IOS 9.3 声明仅在文
这个问题在这里已经有了答案: Test whether a glob has any matches in Bash (22 个回答) 关闭去年。 您将如何使用 bash 判断目录中是否存在特定扩展名
我正在开发转换器服务,我使用 FFMPEG 转换视频。 我想检查输入文件,哪种真的是视频。 我使用以下命令并获取文件类型。但是如果文件已经被操作过就无法理解了: curl -s -o /dev/nul
我需要一个规则来添加 .html 扩展名,只要有“不”结尾的斜杠。 一个新客户最近更改了电子商务脚本,新版本以不同的方式处理 SEO,并更改了他们所有 16,000 多个产品链接。这在站点被重新索引之
我正在尝试使用 Kickstarter 进行扩展以覆盖页面的正常呈现,并呈现 PDF 文件。为此我使用 FPDF。但我不确定该怎么做。我尝试这样做,但没有成功: AddPage();
在寻找巴恩斯利蕨分形的实现时,我遇到了一个具有 .pde 扩展名的实现。哪种编程语言使用此扩展? Implementation Page 最佳答案 此代码来自Processing.org,一个基于Ja
Visual Studio Code (1.22.2) 提供了一个名为 .dockerfile 的文件扩展名。在保存对话框中。带有此扩展名的文件是什么? Dockerfile 包含在所有文档和示例中,
我正在为32位计算机编译一个应用程序,因为该应用程序的创建者将其设置为64位。我确保所有库和DLL都是32位的。但是,我在编译时遇到问题。当我使用sh make.sh进行编译时,当它进入GCC构建部分
当我将文件保存在 img/upload 文件夹中时,文件会以正确的文件扩展名保存。 但是,当我尝试下载该文件时,会附加一个 .htm 文件扩展名。 我怎样才能避免这种情况?我在下面添加了我的代码; V
GHC 有几种有用的语言 extensions用于机械派生各种常见的 Haskell 类型类(-XDeriveFunctor、-XDeriveFoldable、-XDeriveTraversable)
我是一名优秀的程序员,十分优秀!