I have a CSR file which I want to sign by setting basicConstraints=CA:TRUE using open ssl CLI, and without using openssl.conf file.
I tried using some of the openssl command buts not working.
#Generate CA private key. openssl genrsa -out ca.key 2048
#Generate CA certificate. openssl req -new -x509 -days 365 -key ca.key -subj "/C=IN/ST=MH/L=Pune/O=XYZ, Inc./CN=India Root CA" -out ca.pem
#Generate endpoint Private key and csr. openssl req -newkey rsa:2048 -nodes -keyout client2.key -subj "/C=IN/ST=MH/L=Pune/O=XYZ, Inc./CN=*.example.com" -out client2.csr #Sign CSR with CA key.
openssl x509 -req -extfile <(printf "subjectAltName=DNS:50:05:07:63:0B:FF:C6:E4") -days 365 -in client2.csr -CA ca.pem -CAkey ca.key -CAcreateserial -out client2.pem