phone: Allow to specify the AuKey version
This commit is contained in:
parent
71fb6dc113
commit
fdd4437758
|
@ -166,7 +166,8 @@ classes.'>
|
|||
<category: 'private'>
|
||||
aMsg class messageType = GSM48MMMessage msgAuReq ifTrue: [
|
||||
| auth resp |
|
||||
auth := A3A8 COMP128_v3: self auKey rand: aMsg auth data.
|
||||
auth := A3A8 COMP128: phoneConfig auVer ki: self auKey rand: aMsg auth data.
|
||||
|
||||
resp := GSM48AuthResp new.
|
||||
resp sres data: (auth copyFrom: 1 to: 4).
|
||||
|
||||
|
|
14
TestPhone.st
14
TestPhone.st
|
@ -150,7 +150,7 @@ Object subclass: IPAConfig [
|
|||
]
|
||||
|
||||
Object subclass: PhoneConfig [
|
||||
| imsi auKey |
|
||||
| imsi auKey auVer |
|
||||
|
||||
<comment: 'I am the config of a phone. I do have an IMSI and such.'>
|
||||
|
||||
|
@ -167,10 +167,22 @@ Object subclass: PhoneConfig [
|
|||
|
||||
imsi [ ^ imsi ]
|
||||
auKey [ ^ auKey ]
|
||||
auVer [ ^ auVer ]
|
||||
auKey: anAuKey [
|
||||
auKey := anAuKey.
|
||||
auVer := 3.
|
||||
]
|
||||
|
||||
auKeyV2: anAuKey [
|
||||
auKey := anAuKey.
|
||||
auVer := 2.
|
||||
]
|
||||
|
||||
auKeyV1: anAuKey [
|
||||
auKey := anAuKey.
|
||||
auVer := 1.
|
||||
]
|
||||
|
||||
auKeyByteArray [
|
||||
^ auKey isString
|
||||
ifTrue: [
|
||||
|
|
Reference in New Issue