File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -289,10 +289,22 @@ void do_fetch(size_t num)
289289static void
290290usage (const char * progname )
291291{
292- printf ("Usage: %s [-t]" PQ_USAGE_OPT " threadcount\n"
292+ printf ("Usage: %s [-t] [-f TYPE:ALGORITHM] " PQ_USAGE_OPT " threadcount\n"
293293 "-t - terse output\n"
294- PQ_USAGE_DESC ,
294+ "-f - fetch only the specified algorithm\n"
295+ PQ_USAGE_DESC
296+ "\nEnvironment variables:\n"
297+ " EVP_FETCH_TYPE - if no -f option is provided, fetch only\n"
298+ " the specified TYPE:ALGORITHM\n" ,
295299 progname );
300+
301+ printf ("\nAvailable TYPE:ALGORITHM combinations:\n" );
302+ for (size_t i = 0 ; i < ARRAY_SIZE (fetch_entries ); i ++ ) {
303+ const fetch_type_t ft = fetch_entries [i ].ftype ;
304+
305+ if (ft >= 0 && ft < ARRAY_SIZE (type_map ) && type_map [ft ] != NULL )
306+ printf (" %s:%s\n" , type_map [ft ], fetch_entries [i ].alg );
307+ }
296308}
297309
298310int main (int argc , char * argv [])
@@ -307,11 +319,14 @@ int main(int argc, char *argv[])
307319 char * fetch_type = getenv ("EVP_FETCH_TYPE" );
308320 int opt ;
309321
310- while ((opt = getopt (argc , argv , "t " PQ_GETOPT )) != -1 ) {
322+ while ((opt = getopt (argc , argv , "tf: " PQ_GETOPT )) != -1 ) {
311323 switch (opt ) {
312324 case 't' :
313325 terse = 1 ;
314326 break ;
327+ case 'f' :
328+ fetch_type = optarg ;
329+ break ;
315330#ifdef OPENSSL_DO_PQ
316331 case 'q' :
317332 pq = 1 ;
You can’t perform that action at this time.
0 commit comments