{
  "config": { "version": "1.0.1" },
  "log-debug-mode": {
    "token": [true],
    "sign": [true],
    "app": [true]
  },

  // -------------------------------------------------------------------------
  //  PFX TEST MODU (SADECE GELİŞTİRME — MÜŞTERİDE aktif=false KALMALI)
  //  aktif=true ise akıllı kart taraması atlanır, doğrudan PFX yüklenir.
  // -------------------------------------------------------------------------
  "pfx_test": {
    "aktif":      [false],
    "dosya_yolu": ["lisans/testkurum3@test.com.tr_540425.pfx"],
    "pin":        ["540425"],
    "alias":      [""]
  },

  "windows": {
    "paths": [
      "C:/Windows/System32",
      "C:/Windows/SysWOW64",
      "C:/Program Files",
      "C:/Program Files (x86)",
      "C:/Program Files/Utimaco/CryptoServer/Lib",
      "C:/Program Files/SafeNet",
      "C:/Program Files/SafeNet/Authentication Client",
      "C:/Program Files/AKIS",
      "C:/Program Files/eGuven",
      "C:/Program Files/Bit4id",
      "C:/Program Files (x86)/Bit4id",
      "C:/Program Files/Gemalto",
      "C:/Program Files (x86)/Gemalto",
      "C:/Program Files/Common Files/Gemalto",
      "C:/Program Files/Athena",
      "C:/Program Files (x86)/Athena",
      "C:/Program Files/Charismathics",
      "C:/Program Files (x86)/Charismathics",
      "C:/Program Files/Watchdata",
      "C:/Program Files (x86)/Watchdata",
      "C:/Program Files/Atos",
      "C:/Program Files (x86)/Atos"
    ],
    "drivers": [
      // TÜBİTAK BİLGEM AKİS (KamuSM, e-imza, NES)
      "akisp11.dll",
      "akisp11_64.dll",
      "akisifrep11.dll",

      // Çipli TC Kimlik Kartı (NVI)
      "tckk_pkcs11.dll",

      // SafeNet / Thales eToken (EBG, devlet/banka)
      "etpkcs11.dll",
      "eTPKCS11.dll",
      "aetpkss1.dll",
      "aetpkss11.dll",

      // E-Güven / TÜRKTRUST / Sertifya
      "egvpkcs11.dll",

      // Gemalto Classic + IDPrime
      "gclib.dll",
      "IDPrimePKCS11.dll",
      "idprimepkcs11.dll",

      // Bit4ID middleware (TÜRKKEP, bazı bankalar)
      "bit4xpki.dll",
      "bit4qpki.dll",
      "bit4opki.dll",
      "bit4ppki.dll",

      // Charismathics smart card
      "cmP11.dll",

      // Watchdata ProxKey
      "WDPKCS.dll",

      // Athena ASEDrive
      "asepkcs.dll",

      // Atos / Siemens CardOS
      "cardos11.dll",
      "siecap11.dll",

      // Datakey eski USB tokenlar
      "dkck201.dll",
      "dkck232.dll",

      // OpenSC (açık standart fallback)
      "opensc-pkcs11.dll",

      // Generic PKCS#11 fallback
      "cryptoki.dll"
    ],
    "hsm_drivers": [
      "cs_pkcs11_R2.dll",
      "cknfast.dll",
      "cryptoki.dll"
    ]
  },

  "linux": {
    "paths": [
      "/usr/lib",
      "/opt/hsm/lib"
    ],
    "drivers": [
      "libakisp11.so"
    ],
    "hsm_drivers": [
      "libcs_pkcs11_R2.so",
      "libcknfast.so"
    ]
  },

  "mac": {
    "paths": [
      "/usr/local/lib"
    ],
    "drivers": [
      "libakisp11.dylib"
    ],
    "hsm_drivers": []
  },

  "hata_kurallari": {
    // -------------------------------------------------------------------------
    //  FATAL (KESİN DUR): Bu hatalar gelirse sistemi anında kilitle.
    // Tekrar denersen kart bloke olur (PUK ister) veya güvenlik açığı oluşur.
    // -------------------------------------------------------------------------
    "FATAL": [
      "0xA0", "160",  // CKR_PIN_INCORRECT
      "0xA1", "161",  // CKR_PIN_INVALID
      "0xA2", "162",  // CKR_PIN_LOCKED
      "0xA3", "163",  // CKR_PIN_EXPIRED
      "0xA4", "164",  // CKR_PIN_LOCKED (Alternatif)
      "0x82", "130"   // CKR_KEY_HANDLE_INVALID
    ],

    // -------------------------------------------------------------------------
    //  RETRY (RESETLE VE DENE)
    // -------------------------------------------------------------------------
    "RETRY": [
      // --- Kart Çekildi / Temassızlık ---
      "0xE0", "224",  // CKR_TOKEN_NOT_PRESENT
      "0x3", "3",     // CKR_SLOT_ID_INVALID

      // --- Oturum / Kapasite ---
      "0x190", "400", // CKR_SESSION_COUNT
      "0x191", "401", // CKR_SESSION_HANDLE_INVALID
      "0xB3", "179",  // CKR_SESSION_EXISTS

      // --- Genel / Cihaz ---
      "0x5", "5",     // CKR_GENERAL_ERROR
      "0x6", "6",     // CKR_FUNCTION_FAILED
      "0x30", "48",   // CKR_DEVICE_ERROR
      "0x31", "49",   // CKR_DEVICE_MEMORY

      // --- Anahtar okuma (senin 81 mevzusu) ---
      "0x81", "129",  // CKR_KEY_SIZE_RANGE
      "81",           // ayrıca gelen 81 için

      // --- Bazen başarı yanlışlıkla hata gibi düşerse ---
      "0x0", "0"      // CKR_OK
    ],

    // -------------------------------------------------------------------------
    //  IGNORE
    // -------------------------------------------------------------------------
    "IGNORE": [
      "0x100", "256"  // CKR_TOKEN_WRITE_PROTECTED (imzada yazma yok)
    ]
  },

  "hata_etiketleri": {
    // --- PIN / Kullanıcı hataları (genelde FATAL) ---
    "PIN_INCORRECT": [160, "0xA0"],
    "PIN_INVALID": [161, "0xA1"],
    "PIN_LOCKED": [162, "0xA2", 164, "0xA4"],
    "PIN_EXPIRED": [163, "0xA3"],

    // --- Anahtar / obje ---
    "KEY_HANDLE_INVALID": [130, "0x82"],
    "KEY_SIZE_RANGE": [129, "0x81"],

    // --- Kart / token / slot ---
    "TOKEN_NOT_PRESENT": [224, "0xE0"],
    "SLOT_ID_INVALID": [3, "0x3"],

    // --- Oturum ---
    "SESSION_COUNT": [400, "0x190"],
    "SESSION_HANDLE_INVALID": [401, "0x191"],
    "SESSION_EXISTS": [179, "0xB3"],

    // --- Genel / cihaz ---
    "GENERAL_ERROR": [5, "0x5"],
    "FUNCTION_FAILED": [6, "0x6"],
    "DEVICE_ERROR": [48, "0x30"],
    "DEVICE_MEMORY": [49, "0x31"],

    // --- Özel durumlar ---
    "OK_MISROUTED": [0, "0x0"],
    "WRITE_PROTECTED_IGNORED": [256, "0x100"],

    // Senin ayrıca gördüğün 81 gelirse (0x51) diye etiketlemek istersen:
    "KEY_READ_ERROR_81": [81, "0x51"]
  }
}