Fix lib[std]c++ dependency by initialising helper path explicitly

This commit is contained in:
наб 2021-11-15 19:12:19 +01:00
parent 12189bc0d5
commit 8df40d5506
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1

View File

@ -213,12 +213,14 @@ static int get_key_material_raw(const char * whom, bool again, bool newkey, uint
}
static int get_key_material_dispatch(const char * whom, bool again, bool newkey, uint8_t *& buf, size_t & len_out) {
static const char * helper = getenv("TZPFMS_PASSPHRASE_HELPER");
static const char * helper{};
if(!helper)
helper = getenv("TZPFMS_PASSPHRASE_HELPER");
if(helper && *helper) {
if(auto err = get_key_material_helper(helper, whom, again, newkey, buf, len_out); err != -1)
return err;
else
helper = nullptr;
helper = "";
}
return get_key_material_raw(whom, again, newkey, buf, len_out);
}