-
Hello, I’m having a difficult time figuring out how to use the templates to create a Certificate Policy Statement URL like I’d do with an openSSL config file as follows:
I’ve used:
in the template file to get the first one but I can’t figure out how to get the CPS.1 element in there. Any assistance would be greatly appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @shane64, because Go's x509.Certificate doesn't allow to add CPSs the only way to do it is by encoding the extension manually. In that case, it would be adding something like: {
"...": "...",
"extensions": [
{"id": "2.5.29.32", "value": "MDcwNQYEVR0gADAtMCsGCCsGAQUFBwIBFh/igJxodHRwOi8vY2EuZXhhbXBsZS5vcmcvQ1BT4oCd"}
]
} That is the base64 of the information encoded in the extension.
One way to do it is to use OpenSSL first and see the raw extension using Programatically and in Go, you can do it by creating the appropriate struct with the necessary tags following RFC5280 4.2.1.4 and using ans1.Marshal() on that, but we do not have a way yet to do something like that using templates. |
Beta Was this translation helpful? Give feedback.
Hi @shane64, because Go's x509.Certificate doesn't allow to add CPSs the only way to do it is by encoding the extension manually. In that case, it would be adding something like:
That is the base64 of the information encoded in the extension.
One way t…