shrpx: Fix bug in certificate lookup