[PATCH 4.9 06/39] PKCS#7: fix certificate chain verification