refactor x509 extension creation to make it a bit more reusable

Unfortunately X509 certs and CSRs add extensions differently, so
we can't reuse quite as much as we'd like to...
1 file changed