You have to use the correct options (v3_req) like garethTheRed wrote. Here an example from me with your data
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
countryName = LT
stateOrProvinceName = Some-State
localityName = London
You can achieve your desired result with a combination of certtool and openssl. It is important to note that there are two things invovled here, one is to validate the chain itself and the other is checking if the chain is trusted against locally installed trusted root certificates.
WARNING: check negative cases
Please check negative cases, that is make ...
I found a solution that work for me
SSL ON CENTOS 8
Add your ssl in the ssl.conf file