eclipse-vertx/vert.x · error · VertxException

Invalid DER: object is not an Object Identifier

Error message

Invalid DER: object is not an Object Identifier

What it means

DER structure mismatch in PrivateKeyParser: a DER element was expected to be an OBJECT IDENTIFIER (e.g. the EC curve OID) but its ASN.1 tag differs. The input at fault is the DER-encoded key material being parsed; usually a malformed or incompatible key encoding.

Source

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

     *
     * @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.
     *
     * @return Java string
     * @throws VertxException
     */
    public String getString() throws VertxException {

      String encoding;

      switch (type) {

        // Not all are Latin-1 but it's the closest thing
        case DerParser.NUMERIC_STRING:

View on GitHub (pinned to fb308bd8c3)

Solutions

  1. Re-export the key with a standard tool so OIDs are properly DER-encoded
  2. Confirm the key uses a supported algorithm/curve
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/net/impl/pkcs1/PrivateKeyParser.java:476 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/6d11a3336e638cf2. Report an issue: GitHub.