ssl-proxy: simplify scanning of signing policy files

remove code duplication

(cherry picked from commit d851ae2f25fe2318f5e282ef67b587b4cdebf578)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>