As per this Medium post, I'm trying to setup a local Next.js development server with HTTPS.
But when I run this command in Windows 10 Powershell:
openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
I get this error The '<' operator is reserved for future use.
:
At line:1 char:142
+ ... des -sha256 \ -subj '/CN=localhost' -extensions EXT -config <( \ prin ...
+ ~
The '<' operator is reserved for future use.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : RedirectionNotSupported
I've tried a few things but I'm unable to get this command working.