ความแตกต่างระหว่างการตรวจสอบ openssl และคำสั่ง s_client

ทำงานบน Ubuntu 14.04 พร้อม OpenSSL 1.0.1l:

 openssl s_client -CApath /etc/ssl/certs -showcerts -connect www.google.com:443

ผลตอบแทน:

Verify return code: 0 (ok)

อย่างไรก็ตาม การทำงาน:

openssl verify -CApath /etc/ssl/certs/ google_chain.pem

โดยที่ google_chain.pem เป็นเอาต์พุตของคำสั่ง s_client ด้านบน ส่งคืน:

google_chain.pem: C = US, ST = California, L = Mountain View, O = Google Inc, CN = google.com
error 20 at 0 depth lookup:unable to get local issuer certificate

ใครสามารถอธิบายความแตกต่างนี้ได้บ้าง สำหรับฉันดูเหมือนว่าคำสั่ง openssl Verify ไม่สนใจพารามิเตอร์ -CApath


person clatter    schedule 21.01.2015    source แหล่งที่มา
comment
บางทีคุณควรถาม Ubuntu   -  person GoBusto    schedule 21.01.2015


คำตอบ (1)


openssl verify ไม่คาดหวังว่าใบรับรองจะมีสายโซ่ เชนจะต้องส่งผ่านด้วยอาร์กิวเมนต์ -untrusted คุณสามารถส่งไฟล์เดียวกันไปที่นั่นได้ ความน่าเชื่อถือยังคงถูกกำหนดโดยการค้นหารูทที่เชื่อถือได้ใน -CAfile/-CApath

openssl verify -CApath /etc/ssl/certs -untrusted google_chain.pem google_chain.pem
person zakjan    schedule 22.01.2015