While looking for the best way to add multiple Subject Alternative Names (SAN) to a Certificate Signing Request (CSR), this namecheap article provided the following command:
openssl req -new -addext "subjectAltName = \
DNS:additionaldomain1.com,DNS:www.additionaldomain2.com,DNS:www.additionaldomain3.com" \
-addext "certificatePolicies = 1.2.3.4" -newkey rsa:2048 -keyout -keyout server.key \
-nodes -out server.csr
This command makes sense, however there's no mention of why the -addext "certificatePolicies = 1.2.3.4"
options was added. Further investigation of certificate policies leads to providing a required OID, which is explained in another Security StackExchange post.
However, I'm still unclear what the purpose of this value is, and how it should be used. The server which I'm creating this CSR will require several more in the future, so to quote some text from the answer above:
The developer can choose one arbitrarily as long as it doesn't conflict with other OIDs. Some applications/organisations apply a hierarchical structure to OID.
This implies I should use a new/different OID for each CSR I create. What is the best practice here, and how should I implement the certificatePolicies
field?