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> wro= te: =0A> Dear Baptiste,=0A> =0A> we have found from the pkg source code t= hat the environment variables SSL_CLIENT_CERT_FILE and=0A> SSL_CLIENT_KEY= _FILE are required to be set before using client certificates with pkg.= =0A> =0A> In order to automate the setting of environment variables, befo= re pkg begins https authentication=0A> with a remote repository server, w= e decided to use plugins feature of pkg.We decided to write a=0A> callbac= k function that would be called at appropriate time and set the environme= nt variables.=0A> However, after much R&D, we could not find any HOOK tha= t could be used to register a callback=0A> function, which could be calle= d before https authentication takes place.=0A> =0A> Hence, we have decide= d to use pkg_plugin_init() function for setting the environment variables= .This=0A> function is called every time a pkg command is executed and hen= ce we can set the environment=0A> variables.In pkg_plugin_shutdown() func= tion, we can remove the environment variables.=0A> =0A> Please suggest an= y better method to set the environment variables or provide your feedback= on our=0A> approach.=0A> =0A=0APKG_ENV in pkg.conf is exactly designed f= or that=0A=0ABest regards,=0ABapt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?76584af2ed2d6623840009646a6df861>