Right, so I am completely stumped. Usually when I sign certificates I use an ASN.1 like below to specify specific rules, that can be used for IoT for example.
1.2.3.4=ASN1:SEQUENCE:seq_sect
[seq_sect]
one=SEQUENCE:do_one
two=SEQUENCE:do_two
[do_one]
field.1 = UTF8:field1/*
field.2 = UTF8:field2/*
[do_two]
field.1 = UTF8:field1/*
field.2 = UTF8:field2/*
I usually use a program called xca, but in this case I have been coding with bouncycastle and have been really struggling in importing this into the X509v3CertificateBuilder. I know I should be using .addExtension, but I'm not particularly certain if I should store the rules in a .txt file or if I should store it in an array and somehow parse through it?