I have own set of trusted certificates. I want OpenSSL to trust them only for domain names in given by me domains set.
i.e., I need a trusted set of certificates active only for the given set of domains. In my application, all kind of domains could be used, so I can not just change OpenSSL configuration to use only this alternative certificate bundle.
In other words, suppose I have standard certificate bundle from my operating system (Actually, Fedora 37), and I want this exact set
website1.com, website2.com, website3.com
to be trusted if they have certificate in chain, signed by certificate in separate bundle provided by me (or by system certificate bundle). And all other domains (like google.com) to be validated using only by the system bundle.
Hope explained in details.
I tried reading documentation and random googling. Nothing helped.