Hi,

I've been testing SIM locks with Ofono and it looks to me that method
is_valid_pin in src/common.c has somewhat too tight rules for PIN
lenghts. SIM or subsidy lock codes can be longer than 8 digits (as
dictated in 22.022 chapter 14)

There are several ways to fix this. My current favourite is changing the
is_valid_pin so that it takes the actual return value of
sim_string_to_passwd instead of pin_type enumaration as parameter and
checks with 16-digit limit the SIM locks.

Other option that comes to my mind would be separate a valid check
method for SIM locks. 

As third option I suggest adding fifth value to pin_type enumeration and
give that as a parameter for is_valid_pin to make it use different
limits. It would require more specific code type recognition in calling
function though. 

Opinions? Other ideas?

Br, 
-Jussi 

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to