我正在探索SAN证书,并且能够在CSR创建期间用SAN字段中指定的域连接到机器上。但是,我无法用CSR中指定的通用名称连接到机器。
下面的错误是我在连接过程中得到的信息,尽管服务器证书具有相同的名称:
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
我遗漏了什么?
我目前正在努力正确地提取CSR文件主题中的每个内容。这里有一个工作片段,但是当值有一个斜杠/ (ex )时,我被卡住了。CSR内容在值上有OrganizationUnit = orgunit/testou)。我提取内容的方法是使用regex,拆分它,将它推到散列中,然后将它扔回前端。见下文:
sub CSRDecode{
###########################################################################
################Do Your Validation############################
使用SANs创建证书时,步骤-CA的帮助文本如下:
Request a new certificate with multiple Subject Alternative Names. The
Subject Common Name of the certificate will be 'foobar'. However, because
additional SANs are configured using the --san flag and 'foobar' is not one
of these, 'foobar' wi