File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,33 @@ static int tool_pubkey(int argc, const char *argv[])
7171 return EXIT_SUCCESS ;
7272}
7373
74+ static int tool_keyinfo (int argc , const char * argv [])
75+ {
76+ libecdsaauth_key_t * key ;
77+ char * pubkey ;
78+
79+ if (argv [1 ] == NULL )
80+ {
81+ fprintf (stderr , "usage: ecdsatool pubkey privatekey.pem\n" );
82+ return EXIT_FAILURE ;
83+ }
84+
85+ key = libecdsaauth_key_load (argv [1 ]);
86+
87+ printf ("Information on %s:\n" , argv [1 ]);
88+ EC_KEY_print_fp (stdout , key -> eckey , 4 );
89+
90+ libecdsaauth_key_free (key );
91+
92+ return EXIT_SUCCESS ;
93+ }
94+
7495/**************************************************************************************/
7596
7697static tool_applet_t tool_applets [] = {
7798 {"keygen" , tool_keygen },
7899 {"pubkey" , tool_pubkey },
100+ {"keyinfo" , tool_keyinfo },
79101 {NULL , NULL }
80102};
81103
You can’t perform that action at this time.
0 commit comments