First convert the .pfx file to .pem format
openssl pkcs12 -in ClientCert1.pfx -out privpub.pem
Then extract the public key from the .pem format:
openssl x509 -inform pem -in privpub.pem -pubkey -out pub.pem -outform pem
First convert the .pfx file to .pem format
openssl pkcs12 -in ClientCert1.pfx -out privpub.pem
Then extract the public key from the .pem format:
openssl x509 -inform pem -in privpub.pem -pubkey -out pub.pem -outform pem