Openssl self signed certification have no certification path

Viewed 753

My command:

# Generate CA
openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 36500 -key ca.key -out ca.crt -subj "/C=CN/ST=myprovince/L=mycity/O=myorganization/OU=mygroup/CN=myname"

# Generate for my server (site)
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr -subj "/C=CN/ST=myprovince/L=mycity/O=myorganization/OU=mygroup/CN=*.example.com"

# Certification by CA
openssl x509 -req -days 36500 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt

But my certification looks like this, without a certification path:
enter image description here

What I hope is like this:
enter image description here

Help me, please TAT

1 Answers

It says clearly in the image that the issuer of the certificate cannot be found. That's why it it cannot display the trust chain as you expect. To have it display the trust chain you would need to import your CA first so that it can find the issuer.

Related