az sphere ca-certificate

管理资源组和目录中的证书。

操作 描述
az sphere ca-certificate list 列出资源组和目录中的所有证书。
az sphere ca-certificate download 下载目录的证书。
az sphere ca-certificate download-chain 将目录的证书链下载为 PKCS#7“.p7b”文件。
az sphere ca-certificate download-proof 下载目录的所有权证明证书,以便与提供的代码一起使用。

命令

az sphere ca-certificate list

列出资源组和目录中的所有证书。

必需参数

参数 描述
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

列出资源组和目录中的所有证书。

az sphere ca-certificate list --resource-group MyResourceGroup --catalog MyCatalog

az sphere ca-certificate download

下载目录的证书。

必需参数

参数 描述
--name -n 要下载的证书。 指定名称。 如果未提供任何名称,则会下载活动证书。 值来自: az sphere ca
--output-file -of 要在其中保存证书的路径和文件名。 指定相对路径或绝对路径。
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

使用资源组和目录名称下载活动证书。

az sphere ca-certificate download --resource-group MyResourceGroup --catalog MyCatalog --output-file myCert.cer

使用资源组、目录名称和证书名称下载证书。

az sphere ca-certificate download --resource-group MyResourceGroup --catalog MyCatalog --name 2E7A0AF370ABC439901BBB37AF38B97 --output-file myCert.cer

az sphere ca-certificate download-chain

将目录的证书链下载为 PKCS#7“.p7b”文件。

必需参数

参数 描述
--name -n 要下载的证书。 指定名称。 如果未提供任何名称,则会下载活动证书。 值来自: az sphere ca
--output-file -of 要在其中保存证书链的路径和文件名。 使用 .p7b 扩展名指定相对路径或绝对路径。
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

使用资源组和目录名称下载证书链。

az sphere ca-certificate download-chain --resource-group MyResourceGroup --catalog MyCatalog --name 2E7A0AF370ABC439901BBB37AF38B97 --output-file myCertChain.p7b

使用资源组、目录名称和证书名称下载活动证书链。

az sphere ca-certificate download-chain --resource-group MyResourceGroup --catalog MyCatalog --output-file myCertChain.p7b

az sphere ca-certificate download-proof

下载目录的所有权证明证书,以便与提供的代码一起使用。

必需参数

参数 描述
--name -n 要下载的证书。 指定名称。 如果未提供任何名称,则会下载活动证书。 值来自: az sphere ca
--verification-code -v 生成证书时要使用的 Azure Sphere 安全服务的验证码。
--output-file -of 要在其中保存证书的路径和文件名。 指定相对路径或绝对路径。
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

使用资源组和目录名称下载所有权证明证书。

az sphere ca-certificate download-proof --resource-group MyResourceGroup --catalog MyCatalog --name 2E7A0AF370ABC439901BBB37AF38B97 --verification-code 3304517c557a3375e --output-file myCert.cer

使用资源组、目录名称和证书名称下载有效的所有权证明证书。

az sphere ca-certificate download-proof --resource-group MyResourceGroup --catalog MyCatalog --verification-code 3304517c557a3375e --output-file myCert.cer