Packetrove Certificates API

Diagnostics for supplied public certificate bundles.

GitHub OpenAPI

Operations 1

POST /v1/certificate-bundle Inspect a PEM certificate bundle and optional DNS hostname #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/packetrove-com:packetrove-com-certificates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

packetrove-com-certificates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Packetrove Certificates API
  version: 0.8.0
  license:
    name: MIT
    url: https://opensource.org/license/mit/
  description: Network tools for humans and agents, including local calculations and request-based diagnostics. Address counts are decimal strings for exact IPv6 representation.
servers:
- url: /
  description: The host serving this specification
security: []
tags:
- name: Certificates
  description: Diagnostics for supplied public certificate bundles.
paths:
  /v1/certificate-bundle:
    post:
      operationId: certificate-bundle
      tags:
      - Certificates
      summary: Inspect a PEM certificate bundle and optional DNS hostname
      description: Accept up to 16 CERTIFICATE blocks in at most 49152 UTF-8 PEM bytes, with only whitespace between blocks. Private keys are rejected. Preserve original zero-based positions and verify candidate signatures separately from issuer CA and keyCertSign constraints. Distinguish failed, unsupported, and unavailable checks. Missing selected-leaf issuers and blocked requested hostname checks are warnings; other missing issuers are informational because roots are commonly omitted. All explicitly rejected supplied issuer candidates for the selected leaf produce an error. Unknown checks and key-identifier mismatches alone do not produce that error. A failed candidate does not invalidate another viable link. Verified self-issued CA key rollover is informational; verification with the certificate's own public key remains separate. Multiple leaves require an explicit leafIndex for hostname checking. Check ASCII DNS SAN names, with a complete leftmost wildcard matching one label and no Common Name fallback. Evaluation uses the server clock; documentation examples use a fixed illustrative time. Remote calls transmit certificates and optional hostname to the server; inputs, results, and certificate details are excluded from application logs. No full RFC 5280 path validation, client trust, revocation checking, live probing, or proof of deployment safety. JSON transport bodies remain limited to 65536 bytes.
      security: []
      requestBody:
        required: true
        content:
          application/json:
            examples:
              example1:
                summary: Synthetic leaf, intermediate, and root
                value:
                  pem: '-----BEGIN CERTIFICATE-----

                    MIICCjCCAbCgAwIBAgIBCDAKBggqhkjOPQQDAjBEMRowGAYDVQQDExFEZW1vIElu

                    dGVybWVkaWF0ZTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBs

                    ZXMwHhcNMjAwMTAxMDAwMDAwWhcNNDAwMTAxMDAwMDAwWjBGMRwwGgYDVQQDExNz

                    ZXJ2aWNlLmV4YW1wbGUuY29tMSYwJAYDVQQKEx1QYWNrZXRyb3ZlIFN5bnRoZXRp

                    YyBFeGFtcGxlczBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABB5fn3dU7OLbmhjX

                    p3yyIx+2XV+Tm2SLDoKzqkh1tghkRRujbnOabparI3MRHv4xHE6OePpzrbjxRhRP

                    6zFolZWjgZAwgY0wDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O

                    BBYEFAfVEb9iWb+ZcGsM/Kn4GuAuzRDBMB8GA1UdIwQYMBaAFLVIZXp5pvnton0C

                    EDqX/742N1ieMC0GA1UdEQQmMCSCE3NlcnZpY2UuZXhhbXBsZS5jb22CDSouZXhh

                    bXBsZS5uZXQwCgYIKoZIzj0EAwIDSAAwRQIgVEcSRPkS5CuPS5aocD9DJHzXlrc1

                    PdUma+rZtx2bN0UCIQD1C3NNIDmH1Xy4oJhwfKWcITyxyIXmlcK9pUiMjD+qdg==

                    -----END CERTIFICATE-----

                    -----BEGIN CERTIFICATE-----

                    MIIB1zCCAX2gAwIBAgIBAzAKBggqhkjOPQQDAjA+MRQwEgYDVQQDEwtEZW1vIFJv

                    b3QgQTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBsZXMwHhcN

                    MjAwMTAxMDAwMDAwWhcNNDAwMTAxMDAwMDAwWjBEMRowGAYDVQQDExFEZW1vIElu

                    dGVybWVkaWF0ZTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBs

                    ZXMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARt9zn152ODLv2A7zMzZjK+5+8h

                    iuosIcwmRwEhVU/hxg0g22S/EppbLGahIl9r+gyjv1Z9cm4AYzWJ21qQ8xkpo2Yw

                    ZDASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwICBDAdBgNVHQ4EFgQU

                    tUhlenmm+e2ifQIQOpf/vjY3WJ4wHwYDVR0jBBgwFoAUG028VQAIWmJos9X4aPvx

                    ebvw8dEwCgYIKoZIzj0EAwIDSAAwRQIhAJuznXANK1Rdaa0ukjaLMvVEx8L1vLVz

                    8o4jwLtPmbFKAiB6koDuWdkdLRxnMQ43X2ze1SRy665HHyfQemuCjzrQjw==

                    -----END CERTIFICATE-----

                    -----BEGIN CERTIFICATE-----

                    MIIBsDCCAVagAwIBAgIBATAKBggqhkjOPQQDAjA+MRQwEgYDVQQDEwtEZW1vIFJv

                    b3QgQTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBsZXMwHhcN

                    MjAwMTAxMDAwMDAwWhcNNDAwMTAxMDAwMDAwWjA+MRQwEgYDVQQDEwtEZW1vIFJv

                    b3QgQTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBsZXMwWTAT

                    BgcqhkjOPQIBBggqhkjOPQMBBwNCAAS+Zp+N67NDEXRI1BrIw/iBk6raReb/UqYN

                    sOaEVJZANsmih5h7VYPyJnAn5eJbU4uE/ebeZ7aSrFvHOu7EplDZo0UwQzASBgNV

                    HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUG028VQAI

                    WmJos9X4aPvxebvw8dEwCgYIKoZIzj0EAwIDSAAwRQIhAJk5L1v5StGaAboH6L4Z

                    KOA71UEUUb2Y0pIbQsBL7Uq2AiBgIVRaev+zDSY0jTRmgIWTkR+49B/E3WWeOfBm

                    mMB+/Q==

                    -----END CERTIFICATE-----'
                  hostname: service.example.com
              example2:
                summary: Synthetic served bundle with omitted root
                value:
                  pem: '-----BEGIN CERTIFICATE-----

                    MIICCjCCAbCgAwIBAgIBCDAKBggqhkjOPQQDAjBEMRowGAYDVQQDExFEZW1vIElu

                    dGVybWVkaWF0ZTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBs

                    ZXMwHhcNMjAwMTAxMDAwMDAwWhcNNDAwMTAxMDAwMDAwWjBGMRwwGgYDVQQDExNz

                    ZXJ2aWNlLmV4YW1wbGUuY29tMSYwJAYDVQQKEx1QYWNrZXRyb3ZlIFN5bnRoZXRp

                    YyBFeGFtcGxlczBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABB5fn3dU7OLbmhjX

                    p3yyIx+2XV+Tm2SLDoKzqkh1tghkRRujbnOabparI3MRHv4xHE6OePpzrbjxRhRP

                    6zFolZWjgZAwgY0wDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O

                    BBYEFAfVEb9iWb+ZcGsM/Kn4GuAuzRDBMB8GA1UdIwQYMBaAFLVIZXp5pvnton0C

                    EDqX/742N1ieMC0GA1UdEQQmMCSCE3NlcnZpY2UuZXhhbXBsZS5jb22CDSouZXhh

                    bXBsZS5uZXQwCgYIKoZIzj0EAwIDSAAwRQIgVEcSRPkS5CuPS5aocD9DJHzXlrc1

                    PdUma+rZtx2bN0UCIQD1C3NNIDmH1Xy4oJhwfKWcITyxyIXmlcK9pUiMjD+qdg==

                    -----END CERTIFICATE-----

                    -----BEGIN CERTIFICATE-----

                    MIIB1zCCAX2gAwIBAgIBAzAKBggqhkjOPQQDAjA+MRQwEgYDVQQDEwtEZW1vIFJv

                    b3QgQTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBsZXMwHhcN

                    MjAwMTAxMDAwMDAwWhcNNDAwMTAxMDAwMDAwWjBEMRowGAYDVQQDExFEZW1vIElu

                    dGVybWVkaWF0ZTEmMCQGA1UEChMdUGFja2V0cm92ZSBTeW50aGV0aWMgRXhhbXBs

                    ZXMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARt9zn152ODLv2A7zMzZjK+5+8h

                    iuosIcwmRwEhVU/hxg0g22S/EppbLGahIl9r+gyjv1Z9cm4AYzWJ21qQ8xkpo2Yw

                    ZDASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwICBDAdBgNVHQ4EFgQU

                    tUhlenmm+e2ifQIQOpf/vjY3WJ4wHwYDVR0jBBgwFoAUG028VQAIWmJos9X4aPvx

                    ebvw8dEwCgYIKoZIzj0EAwIDSAAwRQIhAJuznXANK1Rdaa0ukjaLMvVEx8L1vLVz

                    8o4jwLtPmbFKAiB6koDuWdkdLRxnMQ43X2ze1SRy665HHyfQemuCjzrQjw==

                    -----END CERTIFICATE-----'
                  hostname: service.example.com
            schema:
              $ref: '#/components/schemas/CertificateBundleRequest'
      responses:
        '200':
          description: Certificates in original order, independently checked candidate issuer links, leaf selection, and findings with evidence and next actions.
          headers:
            Cache-Control:
              description: Do not store certificate inputs or results.
              schema:
                type: string
                const: no-store
          content:
            application/json:
              examples:
                example1:
                  summary: Synthetic leaf, intermediate, and root
                  value:
                    evaluatedAt: '2026-10-04T06:00:00.000Z'
                    certificates:
                    - index: 0
                      line: 1
                      subject: CN=service.example.com, O=Packetrove Synthetic Examples
                      issuer: CN=Demo Intermediate, O=Packetrove Synthetic Examples
                      commonName: service.example.com
                      serialNumber: 08
                      sans:
                      - type: dns
                        value: service.example.com
                      - type: dns
                        value: '*.example.net'
                      notBefore: '2020-01-01T00:00:00.000Z'
                      notAfter: '2040-01-01T00:00:00.000Z'
                      ca: false
                      basicConstraintsPresent: true
                      keyCertSign: false
                      fingerprintSha256: DF:1C:D6:9A:55:27:32:F6:32:16:B5:27:34:9F:04:B6:32:DD:1E:BB:A9:E8:EF:17:3B:38:B3:97:30:55:B4:BE
                      signatureAlgorithm: ECDSA / SHA-256
                      selfSignature: null
                    - index: 1
                      line: 14
                      subject: CN=Demo Intermediate, O=Packetrove Synthetic Examples
                      issuer: CN=Demo Root A, O=Packetrove Synthetic Examples
                      commonName: Demo Intermediate
                      serialNumber: '03'
                      sans: []
                      notBefore: '2020-01-01T00:00:00.000Z'
                      notAfter: '2040-01-01T00:00:00.000Z'
                      ca: true
                      basicConstraintsPresent: true
                      keyCertSign: true
                      fingerprintSha256: 50:0B:A0:34:32:D4:4E:BB:D0:9C:4F:D8:14:47:1B:9B:63:82:C8:1C:72:D5:CE:88:AB:7C:3D:7D:49:22:AB:46
                      signatureAlgorithm: ECDSA / SHA-256
                      selfSignature: null
                    - index: 2
                      line: 26
                      subject: CN=Demo Root A, O=Packetrove Synthetic Examples
                      issuer: CN=Demo Root A, O=Packetrove Synthetic Examples
                      commonName: Demo Root A
                      serialNumber: '01'
                      sans: []
                      notBefore: '2020-01-01T00:00:00.000Z'
                      notAfter: '2040-01-01T00:00:00.000Z'
                      ca: true
                      basicConstraintsPresent: true
                      keyCertSign: true
                      fingerprintSha256: 42:B6:C1:BF:13:27:15:4E:7E:EF:E3:7A:82:A3:FF:3A:05:1B:E2:4D:B5:F1:EF:71:A6:E4:7F:17:F1:4C:7D:69
                      signatureAlgorithm: ECDSA / SHA-256
                      selfSignature: verified
                    relationships:
                    - childIndex: 0
                      issuerIndex: 1
                      signature: verified
                      issuerEligible: true
                      keyIdentifierMatch: true
                    - childIndex: 1
                      issuerIndex: 2
                      signature: verified
                      issuerEligible: true
                      keyIdentifierMatch: true
                    leafIndexes:
                    - 0
                    selectedLeafIndex: 0
                    hostname:
                      expected: service.example.com
                      status: matched
                    findings:
                    - code: SELF_SIGNED_CERTIFICATE
                      severity: info
                      certificateIndexes:
                      - 2
                      observed: The certificate verifies with its own public key.
                      evidence:
                        subject: CN=Demo Root A, O=Packetrove Synthetic Examples
                        signature: verified
                      nextAction: A self-signature does not establish client trust. Check the intended trust configuration separately.
                    - code: HOSTNAME_MATCH
                      severity: info
                      certificateIndexes:
                      - 0
                      observed: The expected hostname matches a DNS SAN on the selected leaf.
                      evidence:
                        expectedHostname: service.example.com
                        dnsSubjectAlternativeNames: service.example.com, *.example.net
                      nextAction: This identity check does not establish chain validity or client trust.
                example2:
                  summary: Synthetic served bundle with omitted root
                  value:
                    evaluatedAt: '2026-10-04T06:00:00.000Z'
                    certificates:
                    - index: 0
                      line: 1
                      subject: CN=service.example.com, O=Packetrove Synthetic Examples
                      issuer: CN=Demo Intermediate, O=Packetrove Synthetic Examples
                      commonName: service.example.com
                      serialNumber: 08
                      sans:
                      - type: dns
                        value: service.example.com
                      - type: dns
                        value: '*.example.net'
                      notBefore: '2020-01-01T00:00:00.000Z'
                      notAfter: '2040-01-01T00:00:00.000Z'
                      ca: false
                      basicConstraintsPresent: true
                      keyCertSign: false
                      fingerprintSha256: DF:1C:D6:9A:55:27:32:F6:32:16:B5:27:34:9F:04:B6:32:DD:1E:BB:A9:E8:EF:17:3B:38:B3:97:30:55:B4:BE
                      signatureAlgorithm: ECDSA / SHA-256
                      selfSignature: null
                    - index: 1
                      line: 14
                      subject: CN=Demo Intermediate, O=Packetrove Synthetic Examples
                      issuer: CN=Demo Root A, O=Packetrove Synthetic Examples
                      commonName: Demo Intermediate
                      serialNumber: '03'
                      sans: []
                      notBefore: '2020-01-01T00:00:00.000Z'
                      notAfter: '2040-01-01T00:00:00.000Z'
                      ca: true
                      basicConstraintsPresent: true
                      keyCertSign: true
                      fingerprintSha256: 50:0B:A0:34:32:D4:4E:BB:D0:9C:4F:D8:14:47:1B:9B:63:82:C8:1C:72:D5:CE:88:AB:7C:3D:7D:49:22:AB:46
                      signatureAlgorithm: ECDSA / SHA-256
                      selfSignature: null
                    relationships:
                    - childIndex: 0
                      issuerIndex: 1
                      signature: verified
                      issuerEligible: true
                      keyIdentifierMatch: true
                    leafIndexes:
                    - 0
                    selectedLeafIndex: 0
                    hostname:
                      expected: service.example.com
                      status: matched
                    findings:
                    - code: ISSUER_NOT_IN_BUNDLE
                      severity: info
                      certificateIndexes:
                      - 1
                      observed: No certificate with the encoded issuer name was found in this input.
                      evidence:
                        issuer: CN=Demo Root A, O=Packetrove Synthetic Examples
                      nextAction: If a server actually serves this bundle, check its full-chain configuration. Roots are normally omitted; this observation alone does not prove a broken chain.
                    - code: HOSTNAME_MATCH
                      severity: info
                      certificateIndexes:
                      - 0
                      observed: The expected hostname matches a DNS SAN on the selected leaf.
                      evidence:
                        expectedHostname: service.example.com
                        dnsSubjectAlternativeNames: service.example.com, *.example.net
                      nextAction: This identity check does not establish chain validity or client trust.
              schema:
                $ref: '#/components/schemas/CertificateBundleResult'
        '400':
          description: Invalid request, empty or malformed PEM/DER, rejected private-key or unsupported blocks, input limits, invalid hostname, or invalid leaf selection. PEM issues include original line and UTF-16 offsets without echoing input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '405':
          description: Method is not supported for this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request body exceeds 64 KiB.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Expected an application/json request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected internal failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
              - INVALID_INPUT
              - MIXED_ADDRESS_FAMILIES
              - INVALID_JSON
              - PAYLOAD_TOO_LARGE
              - UNSUPPORTED_MEDIA_TYPE
              - NOT_FOUND
              - METHOD_NOT_ALLOWED
              - INTERNAL_ERROR
              - CLIENT_IP_UNAVAILABLE
              - NETWORK_ERROR
              - INVALID_RESPONSE
            message:
              type: string
            issues:
              type: array
              items:
                type: object
                properties:
                  index:
                    type: integer
                    minimum: 0
                    description: Zero-based index in inputs, or in the identified include/exclude list.
                  list:
                    type: string
                    minLength: 1
                    description: The input list containing the invalid entry. Existing subtraction errors use include or exclude.
                  field:
                    type: string
                    minLength: 1
                    description: The input field containing the invalid value. Existing range errors use start or end.
                  path:
                    type: array
                    items:
                      anyOf:
                      - type: string
                        minLength: 1
                      - type: integer
                        minimum: 0
                    description: Input field names and zero-based array indices, from the request root. An empty path identifies the whole request. Takes precedence over legacy field, list, and index locations.
                  message:
                    type: string
                  location:
                    type: object
                    properties:
                      line:
                        type: integer
                        minimum: 1
                      offset:
                        type: integer
                        minimum: 0
                      end:
                        type: integer
                        minimum: 0
                    required:
                    - line
                    - offset
                    - end
                    additionalProperties: false
                    description: 'Original text location: one-based line and zero-based UTF-16 start/end offsets. Certificate PEM errors use this to identify rejected material without echoing it.'
                required:
                - message
                additionalProperties: false
          required:
          - code
          - message
          additionalProperties: false
      required:
      - error
      additionalProperties: false
    CertificateBundleResult:
      type: object
      properties:
        evaluatedAt:
          type: string
          format: date-time
          description: Evaluation time from this runtime clock, not a deployment observation.
        certificates:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
                minimum: 0
                maximum: 15
                description: Zero-based original input position; duplicates retain their positions.
              line:
                type: integer
                minimum: 1
                description: One-based input line of the BEGIN boundary.
              subject:
                type: string
              issuer:
                type: string
              commonName:
                type:
                - string
                - 'null'
              serialNumber:
                type: string
              sans:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                    value:
                      type: string
                  required:
                  - type
                  - value
                  additionalProperties: false
              notBefore:
                type: string
                format: date-time
              notAfter:
                type: string
                format: date-time
              ca:
                type: boolean
              basicConstraintsPresent:
                type: boolean
              keyCertSign:
                type:
                - boolean
                - 'null'
              fingerprintSha256:
                type: string
                pattern: ^(?:[0-9A-F]{2}:){31}[0-9A-F]{2}$
              signatureAlgorithm:
                type: string
              selfSignature:
                type:
                - string
                - 'null'
                enum:
                - verified
                - failed
                - unsupported
                - unavailable
                - null
                description: Verification with this certificate's own public key when Subject and Issuer names match. Failed or incomplete verification does not exclude a valid self-issued key-rollover certificate signed by a different key.
            required:
            - index
            - line
            - subject
            - issuer
            - commonName
            - serialNumber
            - sans
            - notBefore
            - notAfter
            - ca
            - basicConstraintsPresent
            - keyCertSign
            - fingerprintSha256
            - signatureAlgorithm
            - selfSignature
            additionalProperties: false
          minItems: 1
          maxItems: 16
        relationships:
          type: array
          items:
            type: object
            properties:
              childIndex:
                type: integer
                minimum: 0
                maximum: 15
              issuerIndex:
                type: integer
                minimum: 0
                maximum: 15
              signature:
                type: string
                enum:
                - verified
                - failed
                - unsupported
                - unavailable
              issuerEligible:
                type: boolean
                description: basicConstraints CA=true and, if present, Key Usage permits keyCertSign. Does not include validity, trust, or full path constraints.
              keyIdentifierMatch:
                type:
                - boolean
                - 'null'
            required:
            - childIndex
            - issuerIndex
            - signature
            - issuerEligible
            - keyIdentifierMatch
            additionalProperties: false
          maxItems: 240
        leafIndexes:
          type: array
          items:
            type: integer
            minimum: 0
            maximum: 15
          maxItems: 16
          description: First occurrences of distinct non-CA certificates; these are possible leaves, not a verified deployment selection.
        selectedLeafIndex:
          type:
          - integer
          - 'null'
          minimum: 0
          maximum: 15
        hostname:
          type:
          - object
          - 'null'
          properties:
            expected:
              type: string
            status:
              type: string
              enum:
              - matched
              - mismatched
              - ambiguous
              - no-leaf
          required:
          - expected
          - status
          additionalProperties: false
        findings:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                - DUPLICATE_CERTIFICATE
                - CERTIFICATE_EXPIRED
                - CERTIFICATE_NOT_YET_VALID
                - SELF_SIGNED_CERTIFICATE
                - SELF_ISSUED_CERTIFICATE
                - SELF_SIGNATURE_FAILED
                - SIGNATURE_UNSUPPORTED
                - SIGNATURE_CHECK_UNAVAILABLE
                - ISSUER_NOT_IN_BUNDLE
                - LEAF_ISSUER_NOT_IN_BUNDLE
                - CANDIDATE_SIGNATURE_FAILED
                - LEAF_ISSUER_CANDIDATES_REJECTED
                - ISSUER_NOT_CA
                - ISSUER_KEY_USAGE_REJECTED
                - ISSUER_KEY_ID_MISMATCH
                - MULTIPLE_ISSUERS
                - LEAF_SELECTION_REQUIRED
                - NO_LEAF_CERTIFICATE
                - HOSTNAME_MATCH
                - HOSTNAME_MISMATCH
              severity:
                type: string
                enum:
                - error
                - warning
                - info
                description: 'Error: a confirmed issue with identified certificates or all supplied issuer candidates for the selected leaf. Warning: a candidate issue or an incomplete requested check. Info: a structural or successful observation. No severity establishes client trust or invalidates every possible path.'
              certificateIndexes:
                type: array
                items:
                  type: integer
                  minimum: 0
                  maximum: 15
                maxItems: 16
              observed:
                type: string
              evidence:
                type: object
                additionalProperties:
                  anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: 'null'
              nextAction:
                type: string
            required:
            - code
            - severity
            - certificateIndexes
            - observed
            - evidence
            - nextAction
            additionalProperties: false
      required:
      - evaluatedAt
      - certificates
      - relationships
      - leafIndexes
      - selectedLeafIndex
      - hostname
      - findings
      additionalProperties: false
      description: Structural and cryptographic observations about the supplied bundle. Not full RFC 5280 path validation, client trust, revocation checking, or deployment safety. Candidate failures do not invalidate other paths.
    CertificateBundleRequest:
      type: object
      properties:
        pem:
          type: string
          maxLength: 49152
          description: One or more PEM CERTIFICATE blocks, with only whitespace between blocks. At most 48 KiB of UTF-8 and 16 blocks. Private keys and other block types are rejected.
        hostname:
          type: string
          maxLength: 255
          description: Optional ASCII DNS hostname, including pre-converted IDNA A-labels. No URL, port, IP address, or wildcard. Blank skips identity checking.
        leafIndex:
          type: integer
          minimum: 0
          maximum: 15
          description: Zero-based original position of a non-CA certificate. Required to resolve multiple possible leaves for hostname checking.
      required:
      - pem
      additionalProperties: false