无法使用LexikJWTAuthenticationBundle生成RSA私钥

问题描述

我正在使用这个库,紧跟着documentation。在“生成SSH密钥”部分中,提到必须执行以下命令:

mkdir -p config/jwt
openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096
openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -pubout

我尝试执行此命令:

openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096

但是当它要求我输入密码时,我无法输入任何内容(因此下一个不能执行)。 我试图在Windows终端,VS Code终端甚至git bash中键入它,但仍然无法正常工作。

这是一个已知问题吗?如果是这样,有解决办法吗?

我想指出的是,在git bash上,它仍在+++++++中被阻止,并且不要求输入密码。

我在Windows 10,Symfony 4.4.15,API Platform 2.5上。 OpenSSL命令对我有用。

解决方法

这是与security有关的正常行为。只需输入短语并按Enter