generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/generating,...

29
Start XCA Generating, signing and exporting keys and certificates with XCA Generating, signing and exporting keys and certificates with XCA Page 1

Upload: others

Post on 05-Oct-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Start XCA

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 1

Page 2: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Create a new database

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 2

Page 3: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Name and save your database

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 3

Page 4: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Select a password - you will need this every time you reopenthis database

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 4

Page 5: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Generate a new private key for the root CA

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 5

Page 6: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Name it something like s3c3_root - we are using 4098 bits forthe example

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 6

Page 7: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Your shiny new key

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 7

Page 8: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Create a new self-signed certificate

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 8

Page 9: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Make sure the selected template is CA and click on Applyextensions

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 9

Page 10: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Fill out the subject fields

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 10

Page 11: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

In extensions, make sure it is marked as type "CertificationAuthority" and "Critical" and "Subject Key Identifier" checked- set lifetime to 10 years

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 11

Page 12: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Make sure Certificate Sign and CRL Sign are selected underKey usage and click OK

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 12

Page 13: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

You should have a new CA Certificate now

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 13

Page 14: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Create a new client certificate - start with a new Certificatesigning request

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 14

Page 15: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Set the template to HTTPS_client and click Apply extensions

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 15

Page 16: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Fill out the subject and click on Generate a new key

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 16

Page 17: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Set the name of the server (server1 in this example) and add_client to the name - use a 2048 bit key or larger

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 17

Page 18: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Make sure to also select Non Repudiation in the Key usagepane and click OK

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 18

Page 19: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

In the Certificates pane, click on New Certificate

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 19

Page 20: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Check Sign this request, uncheck copy extensions, make sureto check "Use this Certificate for signing" and use your root,select HTTPS_client in templates and click Apply all

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 20

Page 21: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Make sure Non Repudiation is also selected and click on OK

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 21

Page 22: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Generating a server certificate is the same as a client, exceptyou will use the HTTPS_server templateNote that you WILL need to choose "Use this Certificate for signing" and select your root key. I forgotto while building the screenshots and had to rebuild this certificate.

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 22

Page 23: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

X Certificate and Key management

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 23

Page 24: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Export the keys for server 1, the private server key ...

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 24

Page 25: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

... which should be named servername.pem (server1.pem forour example server1)

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 25

Page 26: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Export the client private key (servername_client.pem - orserver1_client.pem for our example server1)

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 26

Page 27: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

Export the certificates - same naming scheme as the keys, butwith the crt extension

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 27

Page 28: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

... client certificate the same

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 28

Page 29: Generating, signing and exporting keys and certificates ...evardsson.github.io/s3c3/Generating, signing and...Generating a server certificate is the same as a client, except you will

And don't forget the root CA certificate

Generating, signing and exporting keys and certificates with XCA

Generating, signing and exporting keys and certificates with XCA Page 29