We\'re trying to implement some functionality of a Web-Service from one of our partners. Now, the content which is beeing transmitted, should be encrypted with a public key,
Create a private-public key pair.
openssl req -x509 -newkey rsa:2048 -keyout private.key -out public.cert -days 365
Optionally, combine the pair into a single file.
openssl pkcs12 -export -inkey private.key -in public.cert -out certificate.pfx
This results in the following files.
private.key
certificate.pfx
public.cert
See also