Lines Matching +full:- +full:e
3 # Copyright 2017-2020 Linaro Limited
4 # Copyright 2019-2023 Arm Limited
6 # SPDX-License-Identifier: Apache-2.0
12 # http://www.apache.org/licenses/LICENSE-2.0
75 valid_hash_encodings = ['lang-c', 'raw']
76 valid_encodings = ['lang-c', 'lang-rust', 'pem', 'raw']
78 'rsa-2048': gen_rsa2048,
79 'rsa-3072': gen_rsa3072,
80 'ecdsa-p256': gen_ecdsa_p256,
81 'ecdsa-p384': gen_ecdsa_p384,
102 # TODO: better handling of invalid pass-phrase
106 passwd = getpass.getpass("Enter key passphrase: ").encode('utf-8')
118 # Password must be bytes, always use UTF-8 for consistent
120 return passwd.encode('utf-8')
123 @click.option('-p', '--password', is_flag=True,
125 @click.option('-t', '--type', metavar='type', required=True,
128 @click.option('-k', '--key', metavar='filename', required=True)
135 @click.option('-l', '--lang', metavar='lang',
138 '`--encoding` option. '
140 @click.option('-e', '--encoding', metavar='encoding',
143 @click.option('-k', '--key', metavar='filename', required=True)
144 @click.option('-o', '--output', metavar='output', required=False,
150 raise click.UsageError('Please use only one of `--encoding/-e` '
151 'or `--lang/-l`')
154 # `default=valid_encodings[0]` should be added to `-e` param.
162 elif lang == 'c' or encoding == 'lang-c':
164 elif lang == 'rust' or encoding == 'lang-rust':
174 @click.option('-e', '--encoding', metavar='encoding',
180 @click.option('-k', '--key', metavar='filename', required=True)
181 @click.option('-o', '--output', metavar='output', required=False,
194 elif encoding == 'lang-c':
202 @click.option('--minimal', default=False, is_flag=True,
207 @click.option('-k', '--key', metavar='filename', required=True)
208 @click.option('-f', '--format',
220 X25519UsageError) as e:
221 raise click.UsageError(e)
225 @click.option('-k', '--key', metavar='filename')
251 @click.option('-o', '--outfile', metavar='filename', required=False,
253 @click.option('-s', '--silent', default=False, is_flag=True,
266 except ValueError as e:
267 raise click.BadParameter("{}".format(e))
288 "Minimum value for -H/--header-size is {}".format(min_hdr_size))
299 raw_versions = re.findall(r",\s*([0-9.+]+)\)", value)
307 except ValueError as e:
308 raise click.BadParameter("{}".format(e))
337 @click.option('--non-bootable', default=False, is_flag=True,
338 help='Mark the image as non-bootable.')
339 @click.option('--custom-tlv', required=False, nargs=2, default=[],
345 @click.option('-R', '--erased-val', type=click.Choice(['0', '0xff']),
348 @click.option('-x', '--hex-addr', type=BasedIntParamType(), required=False,
350 @click.option('-L', '--load-addr', type=BasedIntParamType(), required=False,
352 @click.option('-F', '--rom-fixed', type=BasedIntParamType(), required=False,
354 @click.option('--save-enctlv', default=False, is_flag=True,
358 @click.option('-E', '--encrypt', metavar='filename',
360 '(Not supported in direct-xip or ram-load mode.)')
361 @click.option('--encrypt-keylen', default='128',
365 @click.option('--compression', default='disabled',
370 @click.option('-c', '--clear', required=False, is_flag=True, default=False,
371 help='Output a non-encrypted image with encryption capabilities,'
374 @click.option('-e', '--endian', type=click.Choice(['little', 'big']),
376 @click.option('--overwrite-only', default=False, is_flag=True,
377 help='Use overwrite-only instead of swap upgrades')
378 @click.option('--boot-record', metavar='sw_type', help='Create CBOR encoded '
380 'software component (e.g. CoFM for coprocessor firmware). '
382 @click.option('-M', '--max-sectors', type=int,
385 @click.option('--confirm', default=False, is_flag=True,
387 '--pad)')
388 @click.option('--pad', default=False, is_flag=True,
389 help='Pad image to --slot-size bytes, adding trailer magic')
390 @click.option('-S', '--slot-size', type=BasedIntParamType(), required=True,
393 @click.option('--pad-header', default=False, is_flag=True,
394 help='Add --header-size zeroed bytes at the beginning of the '
396 @click.option('-H', '--header-size', callback=validate_header_size,
398 @click.option('--pad-sig', default=False, is_flag=True,
399 help='Add 0-2 bytes of padding to ECDSA signature '
401 @click.option('-d', '--dependencies', callback=get_dependencies,
404 @click.option('-s', '--security-counter', callback=validate_security_counter,
407 @click.option('-v', '--version', callback=validate_version, required=True)
408 @click.option('--align', type=click.Choice(['1', '2', '4', '8', '16', '32']),
412 @click.option('--max-align', type=click.Choice(['8', '16', '32']),
417 @click.option('--public-key-format', type=click.Choice(['hash', 'full']),
420 @click.option('-k', '--key', metavar='filename')
421 @click.option('--fix-sig', metavar='filename',
424 @click.option('--fix-sig-pubkey', metavar='filename',
426 @click.option('--sig-out', metavar='filename',
429 @click.option('--sha', 'user_sha', type=click.Choice(valid_sha), default='auto',
432 @click.option('--vector-to-sign', type=click.Choice(['payload', 'digest']),
448 # Confirmed but non-padded images don't make much sense, because
477 # Get list of custom protected TLVs from the command-line
493 custom_tlvs[tag] = value.encode('utf-8')
589 context_settings=dict(help_option_names=['-h', '--help']))