ssl_calls: fix to read certificate chains