eclipse-vertx/vert.x · error · VertxException

Invalid DER: object is not integer

Error message

Invalid DER: object is not integer

What it means

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.

Source

Thrown at vertx-core/src/main/java/io/vertx/core/net/impl/pkcs1/PrivateKeyParser.java:464

     * @throws VertxException
     */
    public DerParser getParser() throws VertxException {
      if (!isConstructed()) {
        throw new VertxException("Invalid DER: can't parse primitive entity");
      }

      return new DerParser(value);
    }

    /**
     * Get the value as integer
     *
     * @return BigInteger
     * @throws VertxException
     */
    public BigInteger getInteger() throws VertxException {
      if (type != DerParser.INTEGER) {
        throw new VertxException("Invalid DER: object is not integer");
      }

      return new BigInteger(value);
    }

    public byte[] getObjectIdentifier() throws VertxException {

      switch(type) {
      case DerParser.OBJECT_IDENTIFIER:
        return value;
      default:
        throw new VertxException("Invalid DER: object is not an Object Identifier");
      }
    }

    /**
     * Get value as string. Most strings are treated
     * as Latin-1.

View on GitHub (pinned to fb308bd8c3)

Solutions

  1. Re-export the private key in a supported format (PKCS#1/PKCS#8 PEM)
  2. Verify the key file is not truncated or corrupted
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/net/impl/pkcs1/PrivateKeyParser.java:464 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06). Data as JSON: /api/errors/6327feb0160da574. Report an issue: GitHub.