mirror of
https://git.sr.ht/~nabijaczleweli/tzpfms
synced 2025-06-14 23:12:05 +03:00
Fix lib[std]c++ dependency by initialising helper path explicitly
This commit is contained in:
parent
12189bc0d5
commit
8df40d5506
@ -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 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(helper && *helper) {
|
||||||
if(auto err = get_key_material_helper(helper, whom, again, newkey, buf, len_out); err != -1)
|
if(auto err = get_key_material_helper(helper, whom, again, newkey, buf, len_out); err != -1)
|
||||||
return err;
|
return err;
|
||||||
else
|
else
|
||||||
helper = nullptr;
|
helper = "";
|
||||||
}
|
}
|
||||||
return get_key_material_raw(whom, again, newkey, buf, len_out);
|
return get_key_material_raw(whom, again, newkey, buf, len_out);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user