Convert a CERT/PEM certificate to a PFX certificate

I've seen a couple questions about how to convert a PFX to a cert file, but I need to go the other way.

I have two files:

bob_cert.cert

bob_key.pem

I'd like to convert them to a single .pfx file. Is there a tool that does this?


openssl pkcs12 -inkey bob_key.pem -in bob_cert.cert -export -out bob_pfx.pfx

I created .pfx file from .key and .pem files.

Like this openssl pkcs12 -inkey rootCA.key -in rootCA.pem -export -out rootCA.pfx

That's not the direct answer but still maybe it helps out someone else.