ฉันพยายามเซ็ตอัพการพิสูจน์ตัวตนไคลเอนต์ ssl ใน nginx ฉัน crated CA รูตที่ลงนามเอง เมื่อใช้อย่างนั้นฉันก็สร้าง sub-CA ขึ้นมา ฉันใช้ sub-CA นี้เพื่อสร้างใบรับรองสำหรับลูกค้า ฉันต่อ sub-CA และ root CA ลงในไฟล์ใหม่ ฉันตรวจสอบใบรับรองลูกค้าดังนี้:
$ openssl verify -purpose sslclient -CAfile auth-root.crt testcert.crt
testcert.crt: OK
auth-root.crt เป็น concatendated sub และ root CA; testcert.crt เป็นใบรับรองไคลเอ็นต์
ผมชี้ Nginx ไปรับรองความถูกต้อง root.crt ssl_client_certificate
ใช้
เมื่อฉันขอ HTTP โดยใช้ใบรับรอง testcert.crt nginx ล้มเหลว ฉันเปิดใช้งานบันทึกการดีบักและสามารถดูสิ่งต่อไปนี้:
2012/06/21 22:58:47 [debug] 8901#0: *2 verify:0, error:2, depth:1, subject:"/C=US/ST=Florida/L=Tampa/O=Test org/OU=Test OU/CN=AuthCerts TestCA",issuer: "/C=US/ST=Florida/L=tampa/O=Test org/OU=Test OU/CN=Root TestCA"
2012/06/21 22:58:47 [debug] 8901#0: *2 verify:0, error:27, depth:1, subject:"/C=US/ST=Florida/L=Tampa/O=Test org/OU=Test OU/CN=AuthCerts TestCA",issuer: "/C=US/ST=Florida/L=tampa/O=Test org/OU=Test OU/CN=Root TestCA"
2012/06/21 22:58:47 [debug] 8901#0: *2 verify:1, error:27, depth:0, subject:"/C=US/ST=Florida/L=Tampa/O=Accelerated Concepts/OU=NetBridge/CN=030202",issuer: "/C=US/ST=Florida/L=Tampa/O=Test org/OU=Test OU/CN=AuthCerts TestCA"