mirror of
https://github.com/yibaiba/hideck.git
synced 2026-12-05 08:01:10 +00:00
Why: the reconstructed runtime used empty SIM interfaces and built SWu configs without the production AKA provider, while missing providers were hidden behind a delayed-error placeholder. Why this works: share the engine SIM contract, expose the injected provider through SIMAdapter, require it at the start boundary, bind the resolved USIM/ISIM preference, and pass the same object into SWu. Remaining: replace runtimehost placeholder state transitions with the real SWu lifecycle.
25 lines
890 B
Go
25 lines
890 B
Go
package sim
|
|
|
|
import (
|
|
"errors"
|
|
|
|
swusim "github.com/iniwex5/vowifi-go/engine/sim"
|
|
)
|
|
|
|
const (
|
|
AKAAppPreferenceUSIM = "usim" // 优先使用 USIM 卡进行认证
|
|
AKAAppPreferenceUSIMStrict = "usim_strict" // 强制且仅能使用 USIM 卡进行认证
|
|
AKAAppPreferenceAuto = "auto" // 自动选择(ISIM 优先,回退 USIM)
|
|
AKAAppPreferenceISIM = "isim" // 优先使用 ISIM 卡进行认证
|
|
AKAAppPreferenceISIMStrict = "isim_strict" // 强制且仅能使用 ISIM 卡进行认证
|
|
)
|
|
|
|
// ErrAPDUBusy 指示 APDU 通道处于繁忙状态,无法响应本次 AKA 计算请求
|
|
var ErrAPDUBusy = errors.New("apdu busy")
|
|
|
|
// AKAResult 复用 swu-go 的统一 AKA 结果类型,避免在公共边界重复定义。
|
|
type AKAResult = swusim.AKAResult
|
|
|
|
// AKAProvider 复用 swu-go 的统一 AKAProvider 契约。
|
|
type AKAProvider = swusim.AKAProvider
|