I need to specify the registeredID in certificate.
So I add this in config file, when sign certificate using OpenSSL.
[ alternate_names ]
DNS.1 = localhost
RID.1 = 1.2.3.4.5.5
Here, 1.2.3.4.5.5
is OID.
I followed How to format an OID Subject Alt Name entry in a openssl.cnf file in Stack Overflow.
Now, I want to generate certificate in Go. Below one is my current config
cfg := cert.Config{
CommonName: name,
Organization: []string{"Elasticsearch Operator"},
AltNames: cert.AltNames{
DNSNames: []string{
"localhost",
},
},
Usages: []x509.ExtKeyUsage{
x509.ExtKeyUsageServerAuth,
x509.ExtKeyUsageClientAuth,
},
}
In this configuration, how can I add OID number.