sysmo_usimsjs1: check ADM1 length
The length of the ADM1 key is currently not checked. The key is 8 digits long for all sysmo-usim-sjs1 cards. Lets make sure that the length is checked before trying to authenticate. Change-Id: I10a89d8343c889f6c1b2cf3fc67d08dcf08790cf
This commit is contained in:
parent
83760e2c22
commit
70b7fcde40
|
@ -236,6 +236,10 @@ def sysmo_usim_admin_auth(sim, adm1, force = False):
|
||||||
print " (double check ADM1 and use option -f to override)"
|
print " (double check ADM1 and use option -f to override)"
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if(len(adm1) != 8):
|
||||||
|
print " * Error: Short ADM1, a valid ADM1 is 8 digits long!"
|
||||||
|
return False
|
||||||
|
|
||||||
# Try to authenticate
|
# Try to authenticate
|
||||||
try:
|
try:
|
||||||
print " * Authenticating..."
|
print " * Authenticating..."
|
||||||
|
|
Loading…
Reference in New Issue