I'm trying different order of Thawte Primary and Secondary Intermediate certificates. I even added ssl_verify_depth 3 directive. However the chain can't be verified.
CONNECTED(00000003)
depth=0 /1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
verify error:num=27:certificate not trusted
verify return:1
depth=0 /1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
i:/C=US/O=thawte, Inc./OU=Terms of use at https://www.thawte.com/cps (c)06/CN=thawte Extended Validation SSL CA
1 s:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA
i:/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com
2 s:/C=US/O=Thawte, Inc./CN=Thawte SSL CA
i:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA
---
<skipped>
Verify return code: 21 (unable to verify the first certificate)
Are SSL chains supported by nginx?
CONNECTED(00000003)
depth=0 /1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
verify error:num=27:certificate not trusted
verify return:1
depth=0 /1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/1.3.6.1.4.1.311.60.2.1.3=GB/2.5.4.15=<skipped company information>
i:/C=US/O=thawte, Inc./OU=Terms of use at https://www.thawte.com/cps (c)06/CN=thawte Extended Validation SSL CA
1 s:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA
i:/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com
2 s:/C=US/O=Thawte, Inc./CN=Thawte SSL CA
i:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA
---
<skipped>
Verify return code: 21 (unable to verify the first certificate)
Are SSL chains supported by nginx?