具有NSS的cURL-找不到证书

ev0*_*n37 5 curl certificate nss

我正在尝试使用NSS数据库中的证书存储区进行cURL,但是在运行cURL命令时,它说找不到证书。这是我的数据库中的证书列表:

[root@localhost scripts]# certutil -L -d /nss

Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI

Test User                                                     u,u,u
Test Root CA                                                 ,,   
Test SUBCA2                                                  ,,   
Run Code Online (Sandbox Code Playgroud)

您可以在其中看到“测试用户”证书。我还确认SSL_DIR设置为数据库目录:

[root@localhost scripts]# echo $SSL_DIR
/nss
Run Code Online (Sandbox Code Playgroud)

但是,当我运行cURL命令时:

[root@localhost etc]# curl -vk --cert "Test User" https://localhost:7446
* About to connect() to localhost port 7446 (#0)
*   Trying ::1... connected
* Connected to localhost (::1) port 7446 (#0)
* Initializing NSS with certpath: sql:/nss
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* NSS: client certificate not found: Test User
* NSS error -5938
* Closing connection #0
curl: (35) NSS: client certificate not found: Test User
Run Code Online (Sandbox Code Playgroud)

为什么找不到证书?