Connectrix-Brocade B 系列:证书服务器cert.pem:是未知的 x509 格式

Summary: seccermgmt 证书显示错误“是未知的 x509 格式”。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

fc-switch:user> seccertmgmt show -cert https
Certificate servercert.pem: Is an unknown x509 format.

 

已确保验证以下详细信息:

  1. Base 64 ASCII 内容应该有 BEGIN CERTIFICATE 和 END CERTIFICATE 属性。
  2. 对于通常是链式证书的 CA 证书,它将包含相同的格式,但顺序很重要。它应该是例如:
    中间 CA 1
    中间 CA 2
    中间 CA 3
    根 CA
    链证书认证路径 

Cause

如果证书是 Windows 格式的文本文件,则可能会出现“格式错误证书”,其中在 UNIX/Linux 环境中查看时,每行末尾都会显示“^M”。
此转换引入了其他字符,特别是“^M”字符或“-----END CERTIFICATE-----”分隔符后的额外空格。

 

Resolution

要解决此问题,必须确保证书中的“-----END CERTIFICATE-----分隔符后面没有多余的空格或字符。
以下是如何从这种情况中恢复,并使用“vi”文本编辑器将文件从 Microsoft 格式转换为 UNIX/Linux 格式:

  • 首先,创建 .pem 文件的备份拷贝以保留原始数据。
  • 使用“vi”文本编辑器打开 .pem 文件。这可以通过在终端中输入以下命令来实现。
    运行 vi 命令:
    :setlocal ff=unix
    然后运行 vi 命令:
    :wq

 

现在,.pem 文件从文件中的所有行中删除了“^M”或额外的空间。
此时,您现在可以尝试重新导入修改后的 .pem 文件,并且“错误格式证书”错误应该得到解决。

 

Additional Information

提醒:最好不要打开证书文件,因为这可能会更改其格式。

 

 

Affected Products

Connectrix B-Series
Article Properties
Article Number: 000216601
Article Type: Solution
Last Modified: 02 Sept 2025
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.