{"record":{"id":"6327feb0160da574","repo":"eclipse-vertx/vert.x","slug":"invalid-der-object-is-not-integer","errorCode":null,"errorMessage":"Invalid DER: object is not integer","messagePattern":"Invalid DER: object is not integer","errorType":"exception","errorClass":"VertxException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/net/impl/pkcs1/PrivateKeyParser.java","lineNumber":464,"sourceCode":"     * @throws VertxException\n     */\n    public DerParser getParser() throws VertxException {\n      if (!isConstructed()) {\n        throw new VertxException(\"Invalid DER: can't parse primitive entity\");\n      }\n\n      return new DerParser(value);\n    }\n\n    /**\n     * Get the value as integer\n     *\n     * @return BigInteger\n     * @throws VertxException\n     */\n    public BigInteger getInteger() throws VertxException {\n      if (type != DerParser.INTEGER) {\n        throw new VertxException(\"Invalid DER: object is not integer\");\n      }\n\n      return new BigInteger(value);\n    }\n\n    public byte[] getObjectIdentifier() throws VertxException {\n\n      switch(type) {\n      case DerParser.OBJECT_IDENTIFIER:\n        return value;\n      default:\n        throw new VertxException(\"Invalid DER: object is not an Object Identifier\");\n      }\n    }\n\n    /**\n     * Get value as string. Most strings are treated\n     * as Latin-1.","sourceCodeStart":446,"sourceCodeEnd":482,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/net/impl/pkcs1/PrivateKeyParser.java#L446-L482","documentation":"DER structure mismatch in PrivateKeyParser (pkcs1 helper): a DER element parsed as part of an EC/RSA key was expected to be an INTEGER but carries a different ASN.1 tag. The input at fault is the PEM/DER private key being decoded; typically a corrupted or wrong-format key.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/net/impl/pkcs1/PrivateKeyParser.java:464 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-export the private key in a supported format (PKCS#1/PKCS#8 PEM)","Verify the key file is not truncated or corrupted"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}