The SSL certificate authority sent me the signed certificate in .pfx format and it was password-protected; so I need to convert it to .crt file.
The first attempt was to call openssl pkcs12 -in server.pfx -out server.crt -nokeys -clcerts, simply in Git-Bash Windows; but it waits forever, and there was no output nor hint. Eventually, I switched to Linux (RHEL7), and the same command worked OK. It turns out, in Linux the command prompts "Enter Import Password:"; however, running in Windows Git-Bash the it's missing the prompt for password, and will be hanging there forever.
I'm wondering if there is anything to make it work in Windows Git-Bash, e.g. command argument, etc., as my work computer is still running Windows OS. Any pointers will be highly appreciated.
Screenshot of Linux:
[root@host]# openssl pkcs12 -in server.pfx -out server.crt -nokeys -clcerts
Enter Import Password:
MAC verified OK
[root@host]#