Please help regarding usage of client certifcates with pkg command used on freeBSD

Baptiste Daroussin bapt at freebsd.org
Mon Jan 19 13:02:48 UTC 2015


January 19 2015 1:58 PM, "Mohit Hasija" <mh00122988 at 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


More information about the freebsd-pkg mailing list