mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-28 06:33:36 +02:00
evmctl: Implement support for EVMCTL_KEY_PASSWORD environment variable
If the user did not use the --pass option to provide a key password, get the key password from the EVMCTL_KEY_PASSWORD environment variable. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
fa2ba9a6e9
commit
6fbb2a305b
4
README
4
README
@ -70,6 +70,10 @@ OPTIONS
|
|||||||
-v increase verbosity level
|
-v increase verbosity level
|
||||||
-h, --help display this help and exit
|
-h, --help display this help and exit
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
|
||||||
|
EVMCTL_KEY_PASSWORD : Private key password to use; do not use --pass option
|
||||||
|
|
||||||
|
|
||||||
INTRODUCTION
|
INTRODUCTION
|
||||||
------------
|
------------
|
||||||
|
@ -2534,6 +2534,9 @@ static void usage(void)
|
|||||||
" --ignore-violations ignore ToMToU measurement violations\n"
|
" --ignore-violations ignore ToMToU measurement violations\n"
|
||||||
" -v increase verbosity level\n"
|
" -v increase verbosity level\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
|
"\n"
|
||||||
|
"Environment variables:\n\n"
|
||||||
|
"EVMCTL_KEY_PASSWORD : Private key password to use; do not use --pass option\n"
|
||||||
"\n");
|
"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2822,6 +2825,9 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!imaevm_params.keypass)
|
||||||
|
imaevm_params.keypass = getenv("EVMCTL_KEY_PASSWORD");
|
||||||
|
|
||||||
if (argv[optind] == NULL)
|
if (argv[optind] == NULL)
|
||||||
usage();
|
usage();
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user