reduce a bit of duplication in x509 tests (#3183)

1 file changed