Stack Bounce
Stack Bounce

Reputation: 1

openssl config: partial overwrites possible?

Do I really have to re-define the whole section if I want a filed to be overwritten?


I am about to prepare some templates for a private ca stack; root - inter - leaf. However, they share some common settings. Further I would like to "branch" some of the configs for certain use cases.

Therefore my config stack shall look like:

  1. default.conf (just add sections)
  2. ca_default.conf (just add sections)
  3. req.conf (just add sections)
  4. root.conf (include all above, explicitly and at this order)
    • modify [default], [ca_default] and [req] section PARTIALLY

When I run the openssl req -config root.conf ... command the (1st@req.conf + 2nd(partially)@root.conf) ${req::distinguished_name} falls back to the /etc/ssl/openssl.cnf ${req::distinguished_name} settings.

Is there any way to partially overwrite settings, so I can keep my defaults in one place and the "inheritance" in another file?

Upvotes: 0

Views: 34

Answers (0)

Related Questions