@@ -95,8 +95,10 @@ def parse_args():
95
95
subparser_phy = parser_phy .add_subparsers (title = 'commands' , dest = 'subcommand' , required = True )
96
96
parser_phy_vp = subparser_phy .add_parser ('vidpid' , help = 'Sets VID/PID. Use VID:PID format (e.g. 1234:5678)' )
97
97
parser_phy_ledn = subparser_phy .add_parser ('led' , help = 'Sets LED GPIO number.' )
98
+ parser_phy_optwcid = subparser_phy .add_parser ('wcid' , help = 'Enable/Disable Web CCID interface.' )
98
99
parser_phy_vp .add_argument ('value' , help = 'Value of the PHY option.' , metavar = 'VAL' , nargs = '?' )
99
100
parser_phy_ledn .add_argument ('value' , help = 'Value of the PHY option.' , metavar = 'VAL' , nargs = '?' )
101
+ parser_phy_optwcid .add_argument ('value' , choices = ['enable' , 'disable' ], help = 'Enable/Disable Web CCID interface.' , nargs = '?' )
100
102
101
103
parser_secure = subparser .add_parser ('secure' , help = 'Manages security of Pico HSM.' )
102
104
subparser_secure = parser_secure .add_subparsers (title = 'commands' , dest = 'subcommand' , required = True )
@@ -461,14 +463,16 @@ def phy(picohsm, args):
461
463
val = int (sp [0 ],16 ).to_bytes (2 , 'big' ) + int (sp [1 ],16 ).to_bytes (2 , 'big' )
462
464
elif (args .subcommand == 'led' ):
463
465
val = [int (val )]
466
+ elif (args .subcommand == 'wcid' ):
467
+ val = val == 'enable'
464
468
ret = picohsm .phy (args .subcommand , val )
465
469
if (ret ):
466
470
print (f'Current value: { hexlify (ret )} ' )
467
471
else :
468
472
print ('Command executed successfully. Please, restart your Pico Key.' )
469
473
470
474
def main (args ):
471
- sys .stderr .buffer .write (b'Pico HSM Tool v1.12 \n ' )
475
+ sys .stderr .buffer .write (b'Pico HSM Tool v1.14 \n ' )
472
476
sys .stderr .buffer .write (b'Author: Pol Henarejos\n ' )
473
477
sys .stderr .buffer .write (b'Report bugs to https://github.com/polhenarejos/pico-hsm/issues\n ' )
474
478
sys .stderr .buffer .write (b'\n \n ' )
0 commit comments