Use this openssl command to convert a certificate and a private key to a .PFX certificate with a password.

openssl pkcs12 -export -out certificate.pfx -inkey private.key -in certificate.crt