Which intermediate certificates are required (Apache)?

I am receiving the following error on my HPUX/Apache server:

Certificate Verification: Error (20): unable to get local issuer certificate

When I look at my root certificates, I have the DoD Root CA-2 Root certificate included on the server.

My site certificate has the chain of DoD Root CA-2 -> DoD CA-28 -> Certificate.

when I do the following, I do receive an error:

-bash-4.3$ openssl s_client -connect mysite:443 -showcerts
CONNECTED(00000003)
depth=0 /C=US/O=U.S. Government/OU=DoD/OU=PKI/OU=USN/CN=mysite
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /C=US/O=U.S. Government/OU=DoD/OU=PKI/OU=USN/CN=mysite
verify error:num=27:certificate not trusted
verify return:1
depth=0 /C=US/O=U.S. Government/OU=DoD/OU=PKI/OU=USN/CN=mysite
verify error:num=21:unable to verify the first certificate
verify return:1
20509:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1102:SSL alert number 40
20509:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:182:

Other than the error and confirmation from the openssl command above, my site works most of the time (I do have a lack of memory that is causing me issues).

Do I need the DoD CA-28 certificate in my root store on my server?

1
задан 20 October 2016 в 03:33
1 ответ

Для HTTPD Apache требуется только ключ RSA и подписанный сертификат X509 или самоподписанный. CA не нужны.

Хотя некоторые клиенты будут жаловаться, если не увидят, что у вас есть полная цепочка или, по крайней мере, цепочка CA, за исключением корневой, если она у них есть.

Предположим, что есть центр подписи с 3 ca's, называемый EXAMPLE, который подписал ваш сертификат.

ROOT-EXAMPLE <-- browsers may have this if it is a known authority
SUB-EXAMPLE  <--- you haven't included this one
SIGNER-EXAMPLE <--- you haven't included this one
YOURCERT <-- you are offering this one
YOURKEY <-- you are offering this one

Итак, вкратце, чтобы иметь возможность шифровать-дешифровать HTTPd Apache, нужны только первые два, начинающиеся снизу, а вы должны добавить все остальное (кроме корня, если он включен в браузеры, который в этом случае не нужен.

Как это сделать с HTTPD Apache (включить все)? Simple

SSLCertificateKeyFile /path/to/rsa.key
SSLCertificateFile /path/to/chain.crt <-- here you can include the signed and the ca's from root to leaf.
0
ответ дан 4 December 2019 в 05:40

Теги

Похожие вопросы