Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using openssl alternate config file from bash?

Tags:

openssl

I would not like (or cannot) modify the default .cnf openssl config file.

How do tell the openssl command line tool to use a different .cnf file at another location - not the default?


1 Answers

You can override openssl configuration using one of the actions:

  • Set OPENSSL_CONF environment variable to point to your custom configuration file
  • Use -config option with the commands handling certificate (e.g. req, ca...)
  • Most of the definition in the openssl.cnf can be overridden using command line option.

You can also look at man x509v3_config.

like image 79
oliv Avatar answered Oct 31 '25 13:10

oliv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!