Generate an X.509 Key Pair

An X.509 certificate is a digital document that binds an identity (like a website, organization, or individual) to a public key using a digital signature.

In an application such as OpenSSL, generate the private key.

  1. For example, type:
    openssl genrsa -out private.key 2048
  2. Using the private key you just generated, create an X509 certificate (.cer file) that contains your public key.
    Note: You'll be prompted to enter certificate details such as country, state, and organization.

    For example, type:

    openssl req -new -x509 -key private.key -out public.cer -days 365