pySim-prog.py: add presence/length checks for user-provided SPN
Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0
This commit is contained in:
committed by
Vadim Yanitskiy
parent
6af4c21cdf
commit
840a9e2a76
@@ -274,6 +274,10 @@ def gen_parameters(opts):
|
||||
# Digitize MCC/MNC (5 or 6 digits)
|
||||
plmn_digits = _mcc_mnc_digits(mcc, mnc)
|
||||
|
||||
if opts.name is not None:
|
||||
if len(opts.name) > 16:
|
||||
raise ValueError('Service Provider Name must max 16 characters!');
|
||||
|
||||
# ICCID (19 digits, E.118), though some phase1 vendors use 20 :(
|
||||
if opts.iccid is not None:
|
||||
iccid = opts.iccid
|
||||
|
||||
Reference in New Issue
Block a user