Date: Mon, 19 Jan 2015 13:02:44 +0000 From: "Baptiste Daroussin" <bapt@freebsd.org> To: "Mohit Hasija" <mh00122988@techmahindra.com>, pkg@freebsd.org Subject: Re: Please help regarding usage of client certifcates with pkg command used on freeBSD Message-ID: <76584af2ed2d6623840009646a6df861@mail.etoilebsd.net> In-Reply-To: <005efbaf6e8a4d6fa6800a5e25383d26@NODEXCHMBX003.TechMahindra.com> References: <005efbaf6e8a4d6fa6800a5e25383d26@NODEXCHMBX003.TechMahindra.com> <afee7e679b57440a9006c1d5ba6892c1@NODEXCHMBX001.TechMahindra.com>, <9ad51442a3c72408e067ef1d1af8ee6e@mail.etoilebsd.net>
next in thread | previous in thread | raw e-mail | index | archive | help
January 19 2015 1:58 PM, "Mohit Hasija" <mh00122988@techmahindra.com> wrote: > Dear Baptiste, > > we have found from the pkg source code that the environment variables SSL_CLIENT_CERT_FILE and > SSL_CLIENT_KEY_FILE are required to be set before using client certificates with pkg. > > In order to automate the setting of environment variables, before pkg begins https authentication > with a remote repository server, we decided to use plugins feature of pkg.We decided to write a > callback function that would be called at appropriate time and set the environment variables. > However, after much R&D, we could not find any HOOK that could be used to register a callback > function, which could be called before https authentication takes place. > > Hence, we have decided to use pkg_plugin_init() function for setting the environment variables.This > function is called every time a pkg command is executed and hence we can set the environment > variables.In pkg_plugin_shutdown() function, we can remove the environment variables. > > Please suggest any better method to set the environment variables or provide your feedback on our > approach. > PKG_ENV in pkg.conf is exactly designed for that Best regards, Bapt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?76584af2ed2d6623840009646a6df861>
