此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍如何生成证书签名请求(CSR)以获取第三方证书。然后,如何下载链接证书到Catalyst 9800无线局域网控制器(9800 WLC)并用于webauth和webadmin门户。
Cisco 建议您了解以下主题:
本文档中的信息基于以下软件和硬件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
在16.10.X上,9800不支持Web身份验证和Web管理的其他证书。Web登录门户始终使用默认证书。
在16.11.X上,可以为Web身份验证配置专用证书,在全局参数映射中定义信任点。
有两个选项可以获取9800 WLC的证书。
使用最适合您需求的解决方案。
如果您还没有证书,则需要生成要授予您的CA的签名请求。
从当前目录(在安装了OpenSSL的笔记本电脑上)编辑openssl.cnf文件,复制并粘贴这些行,以便在新创建的CSR中包含主题备用名(SAN)字段。
[ req ] default_bits = 4096 distinguished_name = req_distinguished_name req_extensions = req_ext [ req_distinguished_name ] countryName = Country Name (2 letter code) stateOrProvinceName = State or Province Name (full name) localityName = Locality Name (eg, city) organizationName = Organization Name (eg, company) commonName = Common Name (e.g. server FQDN or YOUR name) [ req_ext ] subjectAltName = @alt_names [alt_names] DNS.1 = testdomain.com DNS.2 = example.com DNS.3 = webadmin.com
将DNS.X名称替换为您的SAN。将主字段替换为所需的证书详细信息。确保在SAN字段(DNS.x)中重复通用名称。 Google Chrome要求URL中的名称位于SAN字段中,以便信任证书。
对于Web管理员,您还需要使用URL的变体填充SAN字段(例如仅主机名,或完全限定域名(FQDN)),以便无论浏览器地址栏中URL中的管理员类型是什么,证书都匹配。
使用以下命令从OpenSSL生成CSR:
openssl req -out myCSR.csr -newkey rsa:4096 -nodes -keyout private.key -config openssl.cnf
除非为命令提供完整路径,否则CSR在运行OpenSSL的目录中生成为myCSR.csr,其密钥生成为private.key。
确保将private.key文件用于加密通信时保持安全。
您可以使用以下内容验证其内容:
openssl req -noout -text -in myCSR.csr
然后,您可以向您的CA提供此CSR,以签名并接收回证书。确保从CA下载完整链,并且证书采用Base64格式,以防需要进一步处理。
步骤1.将您的PKCS12证书保存在可从9800 WLC访问的简单文件传输协议(TFTP)服务器上。PKCS12证书必须包含私钥以及到根CA的证书链。
第2步:打开9800 WLC GUI并导航到Configuration > Security > PKI Management,然后点击Add Certificate选项卡。展开Import PKCS12 Certificate菜单并填写TFTP详细信息。或者,Transport Type下拉列表中的Desktop(HTTPS)选项允许通过浏览器进行HTTP上传。Certificate Password是指生成PKCS12证书时使用的密码。
步骤3.验证信息是否正确,然后点击导入。之后,您将在密钥对生成选项卡中看到此新信任点的新证书密钥对。成功导入后,9800 WLC还会为多级CA创建额外的信任点。
注意:目前,当特定信任点用于webauth或webadmin时,9800 WLC不会呈现完整的证书链,而是呈现设备证书及其直接颁发者。使用Cisco Bug ID CSCwa23606对此进行跟踪 ,已在Cisco IOS® XE 17.8中修复。
CLI:
9800# configure terminal 9800(config)#crypto pki importpkcs12 [tftp:// / | ftp:// / | http:// / ] password
注意:对于9800 WLC,证书文件名和信任点名称必须完全匹配,以便为多级CA创建任何其他信任点。
最终可能会出现以下情况:您有PEM或CRT格式的私钥文件和证书,并且希望将它们以PKCS12(.pfx)格式组合以上传到9800 WLC。为此,请输入以下命令:
openssl pkcs12 -export -in-inkey -out
如果证书链(一个或多个中间CA和根CA)全部采用PEM格式,则需要将所有证书组合在一个.pfx文件中。
首先,像这样手动将CA证书合并到一个文件中。将内容复制并粘贴在一起(以.pem格式保存文件):
----- BEGIN Certificate -------- <intermediate CA cert> ------END Certificate -------- -----BEGIN Certificate ----- <root CA cert> -----END Certificate--------
然后,您可以将所有PKCS12证书文件与:
openssl pkcs12 -export -out chaincert.pfx -inkey-in -certfile
请参阅本文结尾的验证部分,查看最终证书的外观。
步骤1.生成通用RSA密钥对。导航到配置>安全> PKI管理,选择密钥对生成选项卡,然后单击+添加。输入详细信息,确保选中Key Exportable复选框,然后单击Generate。
CLI 配置:
9800(config)#crypto key generate rsa general-keys label 9800-keys exportable
The name for the keys will be: 9800-keys
Choose the size of the key modulus in the range of 512 to 4096 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [1024]: 4096
% Generating 4096 bit RSA keys, keys will be exportable...
[OK] (elapsed time was 9 seconds)
第二步:为9800 WLC生成CSR。导航到Add Certificate选项卡并展开Generate Certificate Signing Request,填写详细信息并从下拉列表中选择之前创建的密钥对。Domain Name必须与9800 WLC上为客户端访问定义的URL(Web管理员页面、Web身份验证页面等)匹配,Certificate Name是信任点名称,因此您可以根据其使用进行命名。
注意:9800 WLC支持在其公用名中包含通配符参数的证书。
确保信息正确,然后单击Generate。这会将CSR显示在原始表单旁边的文本框中。
复制会将副本保存到剪贴板,以便您可以将其粘贴到文本编辑器并保存CSR。如果选择Save to device,9800 WLC将创建CSR的副本并将其存储在bootflash:/csr中。例如,请执行以下命令:
9800#dir bootflash:/csr
Directory of bootflash:/csr/
1046531 -rw- 1844 Sep 28 2021 18:33:49 +00:00 9800-CSR1632856570.csr
26458804224 bytes total (21492699136 bytes free)
9800#more bootflash:/csr/9800-CSR1632856570.csr
-----BEGIN CERTIFICATE REQUEST-----
<Certificate Request>
-----END CERTIFICATE REQUEST-----
CLI 配置:
9800(config)#crypto pki trustpoint 9800-CSR
9800(ca-trustpoint)#enrollment terminal pem
9800(ca-trustpoint)#revocation-check none
9800(ca-trustpoint)#subject-name C=MX, ST=CDMX, L=Mexico City, O=Cisco Systems, OU=Wireless TaC, CN=alz-9800.local-domain.com
9800(ca-trustpoint)#rsakeypair 9800-keys
9800(ca-trustpoint)#subject-alt-name domain1.mydomain.com,domain2.mydomain.com
9800(ca-trustpoint)#exit
(config)#crypto pki enroll 9800-CSR
% Start certificate enrollment ..
% The subject name in the certificate will include: C=MX, ST=CDMX, L=Mexico City, O=Cisco Systems, OU=Wireless TaC, CN=alz-9800.local-domain.com
% The subject name in the certificate will include: alz-9800
% Include the router serial number in the subject name? [yes/no]: no
% Include an IP address in the subject name? [no]: no
Display Certificate Request to terminal? [yes/no]: yes
Certificate Request follows:
-----BEGIN CERTIFICATE REQUEST-----
<Certificate Request>
-----END CERTIFICATE REQUEST-----
---End - This line not part of the certificate request---
Redisplay enrollment request? [yes/no]: no
可用于主题名称配置的参数:
C:国家/地区,只能是两个大写字母。
ST:某些州/省,指省或州名称。
L:位置名称,指城市。
O:组织名称,指公司。
OU:组织单位名称,请参阅一节。
CN:(公用名称)指证书颁发到的使用者,您必须指定要访问的特定IP地址(无线管理IP、虚拟IP等)或使用FQDN配置的主机名。
注意:如果要添加主题备用名称,由于Cisco Bug ID CSCvt15177,在17.8.1之前的Cisco IOS XE版本上无法添加此名称。 .此情况可能会因SAN不存在而引发某些浏览器警报,为了避免出现这种情况,请按照选项1所示创建密钥和CSR离线状态。
步骤3.让证书颁发机构(CA)签署CSR。 完整字符串需要发送到CA才能进行签名。
-----BEGIN CERTIFICATE REQUEST-----
<Certificate Request>
-----END CERTIFICATE REQUEST-----
如果使用Windows Server CA对证书签名,请下载Base64格式的签名证书。否则,您需要使用Windows证书管理器等实用程序进行导出。
注意:信任点身份验证过程取决于签署CSR的CA数量。如果存在单级CA,则执行步骤4a。如果有多级CA,则执行步骤4b。这是必需的,因为信任点一次只能存储两个证书(主题证书和颁发者证书)。
步骤4a.使9800信任颁发者CA。下载.pem格式的颁发者CA证书(Base64)。 展开同一菜单中的Authentication Root CA部分,从Trustpoint下拉列表中选择先前定义的信任点,并粘贴颁发者CA证书。确保详细信息配置正确,然后单击Authenticate。
CLI 配置:
9800(config)# crypto pki authenticate 9800-CSR Enter the base 64 encoded CA certificate. End with a blank line or the word "quit" on a line by itself -----BEGIN CERTIFICATE----------END CERTIFICATE-----
Certificate has the following attributes: Fingerprint MD5: DD05391A 05B62573 A38C18DD CDA2337C Fingerprint SHA1: 596DD2DC 4BF26768 CFB14546 BC992C3F F1408809 % Do you accept this certificate? [yes/no]: yes Trustpoint CA certificate accepted. % Certificate successfully imported
步骤4b.在存在多个授权级别的情况下,每个CA级别都需要一个新的信任点。这些信任点仅包含身份验证证书并指向下一个身份验证级别。此过程仅在CLI中完成,在本示例中,有两个中间CA和一个根CA:
9800(config)#crypto pki trustpoint root
9800(ca-trustpoint)#enrollment terminal
9800(ca-trustpoint)#chain-validation stop
9800(ca-trustpoint)#revocation-check none
9800(ca-trustpoint)#exit
9800(config)#crypto pki authenticate root
Enter the base 64 encoded CA certificate.
End with a blank line or the word "quit" on a line by itself
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Certificate has the following attributes:
Fingerprint MD5: 6CAC00D5 C5932D01 B514E413 D41B37A8
Fingerprint SHA1: 5ABD5667 26B7BD0D 83BDFC34 543297B7 3D3B3F24
% Do you accept this certificate? [yes/no]: yes
Trustpoint CA certificate accepted.
% Certificate successfully imported
9800(config)#crypto pki trustpoint intermediate
9800(ca-trustpoint)#enrollment terminal
9800(ca-trustpoint)#chain-validation continue root
9800(ca-trustpoint)#revocation-check none
9800(ca-trustpoint)#exit
9800(config)#crypto pki authenticate intermediate
Enter the base 64 encoded CA certificate.
End with a blank line or the word "quit" on a line by itself
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Certificate has the following attributes:
Fingerprint MD5: 2F3F1EF7 EDF66BE0 F4C9BDA1 01D8FFBA
Fingerprint SHA1: 1651F5C7 5D6F7A6B F411D529 34E980B1 D629A2B9
Certificate validated - Signed by existing trustpoint CA certificate.
Trustpoint CA certificate accepted.
% Certificate successfully imported
9800(config)#crypto pki trustpoint 9800-CSR
9800(ca-trustpoint)#chain-validation continue intermediate
9800(config)#crypto pki authenticate 9800-CSR
Enter the base 64 encoded CA certificate.
End with a blank line or the word "quit" on a line by itself
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Certificate has the following attributes:
Fingerprint MD5: DD05391A 05B62573 A38C18DD CDA2337C
Fingerprint SHA1: 596DD2DC 4BF26768 CFB14546 BC992C3F F1408809
Certificate validated - Signed by existing trustpoint CA certificate.
Trustpoint CA certificate accepted.
% Certificate successfully imported
步骤5.将签名证书加载到9800 WLC。在同一菜单中展开Import Device Certificate部分。选择先前定义的信任点,并粘贴CA提供的已签名设备证书。验证证书信息后,单击import。
CLI 配置:
9800(config)#crypto pki import 9800-CSR certificate
Enter the base 64 encoded certificate.
End with a blank line or the word "quit" on a line by itself
-----BEGIN CERTIFICATE-----
< 9800 device certificate >
-----END CERTIFICATE-----
% Router Certificate successfully imported
导航到管理>管理> HTTP/HTTPS/Netconf,然后从信任点下拉列表中选择导入的证书。
CLI 配置:
9800(config)#ip http secure-trustpoint 9800.pfx 9800(config)#no ip http secure-server
9800(config)#ip http secure-server
导航到Configuration > Security > Web Auth,选择global参数映射,然后从Trustpoint下拉列表中选择导入的信任点。单击Update & Apply保存更改。确保虚拟IPv4主机名与证书中的公用名匹配。
CLI 配置:
9800(config)#parameter-map type webauth global
9800(config-params-parameter-map)#type webauth
9800(config-params-parameter-map)#virtual-ip ipv4 192.0.2.1 virtual-host alz-9800.local-domain.com
9800(config-params-parameter-map)#trustpoint 9800-CSR
要更新证书使用情况,请重新启动HTTP服务:
9800(config)#no ip http server
9800(config)#ip http server
.
在为状态切换高可用性(HA SSO)配置的9800对上,所有证书在初始批量同步时从主证书复制到辅助证书。这包括私钥在控制器本身上生成的证书,即使RSA密钥配置为不可导出。建立HA对后,所有新安装的证书都会安装在两个控制器上,并且所有证书都会被实时复制。
失败后,以前辅助的、现在处于活动状态的控制器以透明方式使用从主控制器继承的证书。
确保Web浏览器信任证书时,需要考虑以下重要事项:
您可以使用以下命令验证证书配置:
9800#show crypto pki certificate 9800.pfx
Certificate
Status: Available
Certificate Serial Number (hex): 1236
Certificate Usage: General Purpose
Issuer:
cn=Chuu Intermediate CA
ou=Chuu Wireless
o=Chuu Inc
st=CDMX
c=MX
Subject:
Name: alz-9800
e=user@example.com
cn=alz-9800
ou=Cisco Systems
o=Wireless TAC
l=CDMX
st=CDMX
c=MX
Validity Date:
start date: 17:54:45 Pacific Sep 28 2021
end date: 17:54:45 Pacific Sep 26 2031
Associated Trustpoints: 9800.pfx
CA Certificate
Status: Available
Certificate Serial Number (hex): 1000
Certificate Usage: Signature
Issuer:
cn=Chuu Root CA
ou=Chuu Wireless
o=Chuu Inc
l=Iztapalapa
st=CDMX
c=MX
Subject:
cn=Chuu Intermediate CA
ou=Chuu Wireless
o=Chuu Inc
st=CDMX
c=MX
Validity Date:
start date: 05:10:34 Pacific Apr 29 2020
end date: 05:10:34 Pacific Apr 27 2030
Associated Trustpoints: 9800.pfx
9800#show ip http server secure status
HTTP secure server status: Enabled
HTTP secure server port: 443
HTTP secure server ciphersuite: 3des-ede-cbc-sha aes-128-cbc-sha
aes-256-cbc-sha dhe-aes-128-cbc-sha ecdhe-rsa-3des-ede-cbc-sha
rsa-aes-cbc-sha2 rsa-aes-gcm-sha2 dhe-aes-cbc-sha2 dhe-aes-gcm-sha2
ecdhe-rsa-aes-cbc-sha2 ecdhe-rsa-aes-gcm-sha2
HTTP secure server TLS version: TLSv1.2 TLSv1.1 TLSv1.0
HTTP secure server client authentication: Disabled
HTTP secure server trustpoint: 9800.pfx
HTTP secure server active session modules: ALL
您可以在9800上验证证书链。如果设备证书是由中间CA颁发的,而它本身是由根CA颁发的,您有一个信任点,按两个证书的组排列,因此每个级别都有自己的信任点。在本例中,9800 WLC具有9800.pfx以及设备证书(WLC证书)及其颁发CA(中间CA)。 然后是另一个信任点,其根CA发出该中间CA。
9800#show crypto pki certificate 9800.pfx
Certificate
Status: Available
Certificate Serial Number (hex): 1236
Certificate Usage: General Purpose
Issuer:
cn=Chuu Intermediate CA
ou=Chuu Wireless
o=Chuu Inc
st=CDMX
c=MX
Subject:
Name: alz-9800
e=user@example.com
cn=alz-9800
ou=Cisco Systems
o=Wireless TAC
l=CDMX
st=CDMX
c=MX
Validity Date:
start date: 17:54:45 Pacific Sep 28 2021
end date: 17:54:45 Pacific Sep 26 2031
Associated Trustpoints: 9800.pfx
CA Certificate
Status: Available
Certificate Serial Number (hex): 1000
Certificate Usage: Signature
Issuer:
cn=Chuu Root CA
ou=Chuu Wireless
o=Chuu Inc
l=Iztapalapa
st=CDMX
c=MX
Subject:
cn=Chuu Intermediate CA
ou=Chuu Wireless
o=Chuu Inc
st=CDMX
c=MX
Validity Date:
start date: 05:10:34 Pacific Apr 29 2020
end date: 05:10:34 Pacific Apr 27 2030
Associated Trustpoints: 9800.pfx
9800#show crypto pki certificate 9800.pfx-rrr1
CA Certificate
Status: Available
Certificate Serial Number (hex): 00
Certificate Usage: Signature
Issuer:
cn=Chuu Root CA
ou=Chuu Wireless
o=Chuu Inc
l=Iztapalapa
st=CDMX
c=MX
Subject:
cn=Chuu Root CA
ou=Chuu Wireless
o=Chuu Inc
l=Iztapalapa
st=CDMX
c=MX
Validity Date:
start date: 04:58:05 Pacific Apr 29 2020
end date: 04:58:05 Pacific Apr 27 2030
Associated Trustpoints: 9800-CSR 9800.pfx-rrr1
OpenSSL可用于验证证书本身或执行某些转换操作。
要使用OpenSSL显示证书,请执行以下操作:
openssl x509 -in-text
要显示CSR的内容,请执行以下操作:
openssl req -noout -text -in
如果要验证9800 WLC上的终端证书,但希望使用浏览器以外的其他内容,OpenSSL可以执行此操作,并提供大量详细信息。
openssl s_client -showcerts -verify 5 -connect:443
您可以使用9800的webadmin的URL或访客门户的URL(虚拟IP)替换<wlcURL>。 您也可以将IP地址放在此处。它会告诉您接收了什么证书链,但使用IP地址而不是主机名时,证书验证永远不可能是100%正确的。
要查看内容并验证PKCS12(.pfx)证书或证书链:
openssl pkcs12 -info -in
以下是证书链上此命令的示例,其中设备证书由称为“intermediate.com”的中间CA(其自身由称为“root.com”的根CA颁发)颁发给技术支持中心(TAC):
openssl pkcs12 -info -in chainscript2.pfx
Enter Import Password:
MAC Iteration 2048
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
Bag Attributes
localKeyID: 1D 36 8F C2 4B 18 0B 0D B2 57 A2 55 18 96 7A 8B 57 F9 CD FD
subject=/C=BE/ST=Diegem/L=Diegem/O=Cisco/CN=TAC
issuer=/C=BE/ST=Diegem/O=Cisco/OU=TAC/CN=intermediate.com/emailAddress=int@int.com
-----BEGIN CERTIFICATE-----
< Device certificate >
-----END CERTIFICATE-----
Certificate bag
Bag Attributes: <No Attributes>
subject=/C=BE/ST=Diegem/O=Cisco/OU=TAC/CN=intermediate.com/emailAddress=int@int.com
issuer=/C=BE/ST=Diegem/L=Diegem/O=Cisco/OU=TAC/CN=RootCA.root.com/emailAddress=root@root.com
-----BEGIN CERTIFICATE-----
< Intermediate certificate >
-----END CERTIFICATE-----
Certificate bag
Bag Attributes: <No Attributes>
subject=/C=BE/ST=Diegem/L=Diegem/O=Cisco/OU=TAC/CN=RootCA.root.com/emailAddress=root@root.com
issuer=/C=BE/ST=Diegem/L=Diegem/O=Cisco/OU=TAC/CN=RootCA.root.com/emailAddress=root@root.com
-----BEGIN CERTIFICATE-----
< Root certificate >
-----END CERTIFICATE-----
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
Bag Attributes
localKeyID: 1D 36 8F C2 4B 18 0B 0D B2 57 A2 55 18 96 7A 8B 57 F9 CD FD
Key Attributes: <No Attributes>
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----BEGIN ENCRYPTED PRIVATE KEY-----
< Private key >
-----END ENCRYPTED PRIVATE KEY-----
使用此命令排除故障。如果在远程会话(SSH或telnet)上完成,则需要terminal monitor来显示输出:
9800#debug crypto pki transactions
此输出显示在9800上发生成功证书导入时的预期输出。使用此命令作为参考并确定故障状态:
Sep 28 17:35:23.242: CRYPTO_PKI: Copying pkcs12 from bootflash:9800.pfx
Sep 28 17:35:23.322: CRYPTO_PKI: Creating trustpoint 9800.pfx
Sep 28 17:35:23.322: %PKI-6-TRUSTPOINT_CREATE: Trustpoint: 9800.pfx created succesfully
Sep 28 17:35:23.324: CRYPTO_PKI: examining cert:
Sep 28 17:35:23.324: CRYPTO_PKI: issuerName=cn=Chuu Intermediate CA,ou=Chuu Wireless,o=Chuu Inc,st=CDMX,c=MX
Sep 28 17:35:23.324: CRYPTO_PKI: subjectname=e=user@example.com,cn=alz-9800,ou=Cisco Systems,o=Wireless TAC,l=CDMX,st=CDMX,c=MX
Sep 28 17:35:23.324: CRYPTO_PKI: adding RSA Keypair
Sep 28 17:35:23.324: CRYPTO_PKI: bitValue of ET_KEY_USAGE = 140
Sep 28 17:35:23.324: CRYPTO_PKI: Certificate Key Usage = GENERAL_PURPOSE
Sep 28 17:35:23.324: %CRYPTO_ENGINE-5-KEY_ADDITION: A key named 9800.pfx has been generated or imported by pki-pkcs12
Sep 28 17:35:23.331: CRYPTO_PKI: adding as a router certificate.Public key in cert and stored public key 9800.pfx match
Sep 28 17:35:23.333: CRYPTO_PKI: examining cert:
Sep 28 17:35:23.333: CRYPTO_PKI: issuerName=cn=Chuu Root CA,ou=Chuu Wireless,o=Chuu Inc,l=Iztapalapa,st=CDMX,c=MX
Sep 28 17:35:23.333: CRYPTO_PKI: subjectname=cn=Chuu Intermediate CA,ou=Chuu Wireless,o=Chuu Inc,st=CDMX,c=MX
Sep 28 17:35:23.333: CRYPTO_PKI: no matching private key presents.
[...]
Sep 28 17:35:23.335: CRYPTO_PKI: Setting the key_type as RSA
Sep 28 17:35:23.335: CRYPTO_PKI: Attempting to insert the peer's public key into cache
Sep 28 17:35:23.335: CRYPTO_PKI:Peer's public inserted successfully with key id 21
Sep 28 17:35:23.336: Calling pkiSendCertInstallTrap to send alert
Sep 28 17:35:23.337: CRYPTO_PKI: Deleting cached key having key id 31
Sep 28 17:35:23.337: CRYPTO_PKI: Attempting to insert the peer's public key into cache
Sep 28 17:35:23.337: CRYPTO_PKI:Peer's public inserted successfully with key id 32
Sep 28 17:35:23.338: CRYPTO_PKI: (A0323) Session started - identity selected (9800.pfx)
Sep 28 17:35:23.338: CRYPTO_PKI: Rcvd request to end PKI session A0323.
Sep 28 17:35:23.338: CRYPTO_PKI
alz-9800#: PKI session A0323 has ended. Freeing all resources.
Sep 28 17:35:23.338: CRYPTO_PKI: unlocked trustpoint 9800.pfx, refcount is 0
Sep 28 17:35:23.338: CRYPTO_PKI: Expiring peer's cached key with key id 32Public key in cert and stored public key 9800.pfx match
Sep 28 17:35:23.341: Calling pkiSendCertInstallTrap to send alert
Sep 28 17:35:23.341: CRYPTO_PKI: cert verified and inserted.
Sep 28 17:35:23.402: CRYPTO_PKI: Creating trustpoint 9800.pfx-rrr1
Sep 28 17:35:23.402: %PKI-6-TRUSTPOINT_CREATE: Trustpoint: 9800.pfx-rrr1 created succesfully
Sep 28 17:35:23.403: CRYPTO_PKI: Setting the key_type as RSA
Sep 28 17:35:23.404: CRYPTO_PKI: Attempting to insert the peer's public key into cache
Sep 28 17:35:23.404: CRYPTO_PKI:Peer's public inserted successfully with key id 22
Sep 28 17:35:23.405: Calling pkiSendCertInstallTrap to send alert
Sep 28 17:35:23.406: CRYPTO_PKI: no CRLs present (expected)
Sep 28 17:35:23.406: %PKI-6-PKCS12_IMPORT_SUCCESS: PKCS #12 import in to trustpoint 9800.pfx successfully imported.
如果导入证书并获取错误:“未找到CA证书。”,这意味着.pfx文件不包含整个链或者一个CA不存在。
9800(config)#crypto pki import pkcs12.pfx pkcs12 bootflash:pks12.pfx password% Importing pkcs12... Source filename [pks12.pfx]? Reading file from bootflash:pks12.pfx % Warning: CA cert is not found. The imported certs might not be usable.
如果运行命令openssl pkcs12 -info -in <path to cert>,并且仅显示具有一个私钥的一个证书,则表示CA不存在。根据经验,此命令最好列出整个证书链。如果客户端浏览器已经知道顶部根CA,则不需要包含它。
解决此问题的一种方法是将PKCS12解构为PEM并正确重建链。在下一个示例中,我们有一个只包含设备(WLC)证书及其密钥的.pfx文件。它由中间CA(在PKCS12文件中不存在)发出,而中间CA又由已知的根CA签名。
步骤1.将私钥导出出去。
openssl pkcs12 -in-out cert.key -nocerts -nodes
步骤2.将证书导出为PEM。
openssl pkcs12 -in-out certificate.pem -nokeys -clcerts
步骤3.将中间CA证书下载为PEM。
CA的来源取决于其性质,如果它是公共CA,则联机搜索足以查找存储库。否则,CA管理员必须提供Base64格式(.pem)的证书。 如果有多个级别的CA,则将其分组到单个文件中,与选项1导入过程结束时显示的文件类似。
步骤4.从密钥、设备证书和CA证书重建PKCS 12。
openssl pkcs12 -export -out fixedcertchain.pfx -inkey cert.key -in certificate.pem -certfile CA.pem
我们现在有“fixedcertchain.pfx”,可以方便地将其导入Catalyst 9800!
版本 | 发布日期 | 备注 |
---|---|---|
6.0 |
15-Mar-2022 |
主题备用名情况的更新 |
5.0 |
09-Feb-2022 |
添加了一个限制 |
4.0 |
15-Dec-2021 |
添加限制 |
3.0 |
20-Nov-2021 |
添加了有关现在发送完整证书链的WLC的说明 |
2.0 |
05-Oct-2021 |
添加的参与者 |
1.0 |
21-Nov-2018 |
初始版本 |