'Unable to create p12 file from key and crt file

I am trying to create a p12 keystore using the following command:

openssl pkcs12 -export -out localhost.p12 -name "localhost" -inkey localhost.key -in localhost.crt

However, the generate keystore file is blank (0KB). I am unable to comprehend where I am going wrong.

I can provide the localhost.key and localhost.crt files if needed.

Thanks and regards.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source