{"record":{"id":"1b6c3bcda45a6546","repo":"sqlmapproject/sqlmap","slug":"http-pki-authentication-require-usage-of-option","errorCode":null,"errorMessage":"HTTP PKI authentication require usage of option `--auth-file`","messagePattern":"HTTP PKI authentication require usage of option `--auth-file`","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":1519,"sourceCode":"\n        if authType in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST):\n            regExp = \"^(.*?):(.*?)$\"\n            errMsg = \"HTTP %s authentication credentials \" % authType\n            errMsg += \"value must be in format 'username:password'\"\n        elif authType == AUTH_TYPE.BEARER:\n            conf.httpHeaders.append((HTTP_HEADER.AUTHORIZATION, \"Bearer %s\" % conf.authCred.strip()))\n            return\n        elif authType in (AUTH_TYPE.NTLM, AUTH_TYPE.NEGOTIATE):\n            # Note: the DOMAIN\\username part is colon-free, so the password group takes the full\n            # remainder (a greedy first group would otherwise swallow colons inside the password).\n            # For Negotiate, DOMAIN is the Kerberos realm.\n            regExp = \"^([^:]*\\\\\\\\[^:]*):(.*)$\"\n            errMsg = \"HTTP %s authentication credentials value must \" % authType\n            errMsg += \"be in format 'DOMAIN\\\\username:password'\"\n        elif authType == AUTH_TYPE.PKI:\n            errMsg = \"HTTP PKI authentication require \"\n            errMsg += \"usage of option `--auth-file`\"\n            raise SqlmapSyntaxException(errMsg)\n\n        aCredRegExp = re.search(regExp, conf.authCred)\n\n        if not aCredRegExp:\n            raise SqlmapSyntaxException(errMsg)\n\n        conf.authUsername = aCredRegExp.group(1)\n        conf.authPassword = aCredRegExp.group(2)\n\n        kb.passwordMgr = _urllib.request.HTTPPasswordMgrWithDefaultRealm()\n\n        _setAuthCred()\n\n        if authType == AUTH_TYPE.BASIC:\n            authHandler = SmartHTTPBasicAuthHandler(kb.passwordMgr)\n\n        elif authType == AUTH_TYPE.DIGEST:\n            authHandler = _urllib.request.HTTPDigestAuthHandler(kb.passwordMgr)","sourceCodeStart":1501,"sourceCodeEnd":1537,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L1501-L1537","documentation":"Error \"HTTP PKI authentication require usage of option `--auth-file`\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/core/option.py:1519 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}