The following exit codes and messages are displayed based on success or failure of th_keygen2. Developers can check the program exit code for the value to ensure the operation completed successful. If the operation failed, the error message will be printed to standard output and one of the following non-zero exit codes will be set.
Exit Code values:
0 = KEYGEN_ECODE_NONE
(key is displayed)
1 = KEYGEN_ECODE_YEAR_TO_LOW
"Expire year cannot be less than 2003"
2 = KEYGEN_ECODE_YEAR_TO_HIGH
"Expire year cannot be greater than 2259"
3 = KEYGEN_ECODE_BAD_MONTH
"Expiration month must be 1-12"
4 = KEYGEN_ECODE_BAD_DAY
"Expiration day must be 1-31"
5 = KEYGEN_ECODE_BAD_EXPIRE_AFTER
"-expire_after days must be 0-4095"
6 = KEYGEN_ECODE_BAD_MAX_RUNS
"max_runs must be 0-16777216"