{"record":{"id":"9b8d044222b4563b","repo":"prestodb/presto","slug":"unexpected-end-of-dn","errorCode":null,"errorMessage":"Unexpected end of DN: ","messagePattern":"Unexpected end of DN: ","errorType":"exception","errorClass":"java.lang.IllegalStateException","httpStatus":null,"severity":"error","filePath":"presto-client/src/main/java/okhttp/internal/tls/DistinguishedNameParser.java","lineNumber":76,"sourceCode":"        for (; pos < length && chars[pos] == ' '; pos++) {\n            // skip preceding space chars, they can present after\n            // comma or semicolon (compatibility with RFC 1779)\n        }\n        if (pos == length) {\n            return null; // reached the end of DN\n        }\n\n        // mark the beginning of attribute type\n        beg = pos;\n\n        // attribute type chars\n        pos++;\n        for (; pos < length && chars[pos] != '=' && chars[pos] != ' '; pos++) {\n            // we don't follow exact BNF syntax here:\n            // accept any char except space and '='\n        }\n        if (pos >= length) {\n            throw new IllegalStateException(\"Unexpected end of DN: \" + dn);\n        }\n\n        // mark the end of attribute type\n        end = pos;\n\n        if (chars[pos] == ' ') {\n            for (; pos < length && chars[pos] != '=' && chars[pos] == ' '; pos++) {\n                // skip trailing space chars between attribute type and '='\n                // (compatibility with RFC 1779)\n            }\n\n            if (chars[pos] != '=' || pos == length) {\n                throw new IllegalStateException(\"Unexpected end of DN: \" + dn);\n            }\n        }\n\n        pos++; //skip '=' char\n","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-client/src/main/java/okhttp/internal/tls/DistinguishedNameParser.java#L58-L94","documentation":"Copied OkHttp DN parser: nextAT hit the end of the distinguished-name string while parsing an attribute type (no '=' terminator found). The TLS certificate's subject/issuer string is truncated or malformed.","triggerScenarios":"Thrown at presto-client/src/main/java/okhttp/internal/tls/DistinguishedNameParser.java:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the certificate DN for trailing commas/semicolons or empty components","Fix the DN string to conform to RFC 2253 formatting"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}