Skip to content

Template help - policyIdentifiers #907

Answered by maraino
shane64 asked this question in Q&A
Discussion options

You must be logged in to vote

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.

0000 - 30 37 30 35 06 04 55 1d-20 00 30 2d 30 2b 06 08   0705..U. .0-0+..
0010 - 2b 06 01 05 05 07 02 01-16 1f e2 80 9c 68 74 74   +............htt
0020 - 70 3a 2f 2f 63 61 2e 65-78 61 6d 70 6c 65 2e 6f   p://ca.example.o
0030 - 72 67 2f 43 50 53 e2 80-9d                        rg/CPS...

One way t…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@shane64
Comment options

@gwe32
Comment options

Answer selected by shane64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants