Skip to content

Browser App

dweller long gone edited this page May 26, 2026 · 2 revisions

Browser App

ASN.1 Definition Sifter includes a standalone browser viewer for exercising the resolver without embedding it into another PkiStudio surface.

Hosted viewer:

https://pkistudio.github.io/asn1defsifter/

Local viewer:

npm run dev -- --port 5173 --strictPort

Then open:

http://localhost:5173/

Layout

The app has four main work areas:

  • Embedded editable PkiStudioJS viewer.
  • Candidate tree pane.
  • Selected candidate details pane.
  • API log pane.

Splitters between the viewer and candidates pane, above selected details, and above the API log let users resize the workspace.

Loading and Editing Input

Use the embedded PkiStudioJS viewer's Load menu to load data. The resolver watches the viewer document and refreshes candidates after load or edit actions.

Supported viewer workflows include:

  • loading ASN.1 data from file or clipboard,
  • editing nodes through the PkiStudioJS context menus,
  • inserting, adding, or deleting supported nodes,
  • sending selected DER to a standalone editable PkiStudioJS viewer tab.

When the viewer closes, the candidate tree and selected details are cleared.

Managing Corpora

Use the top-level Corpora menu to manage the ASN.1 definition corpora used by candidate resolution in the viewer session.

The built-in PkiComponents corpus is active by default. The corpus manager supports:

  • adding ASN.1 definition corpora from a local file,
  • adding ASN.1 definition corpora from clipboard text,
  • editing any corpus, including the built-in corpus,
  • removing corpora from the active list,
  • reverting to the initial built-in PkiComponents corpus,
  • saving the active corpus list as JSON,
  • loading a previously saved corpus list from JSON.

Corpus names must be unique. The managed corpus name is used as the corpus/module name shown in candidate results, selected-candidate JSON, and API log entries.

Save opens a save dialog with corpora.json as the default filename when the browser supports the File System Access API. Browsers without that API fall back to downloading corpora.json. Load validates the JSON shape, duplicate names, non-empty ASN.1 sources, and ASN.1 parser compatibility before replacing the active corpus list.

When input is already loaded, adding, editing, removing, reverting, or loading corpora refreshes the candidate report automatically.

Candidate Tree

The candidate tree shows root and subtree candidate reports. Items expose:

  • candidate type and module names,
  • score and confidence,
  • root or subtree context,
  • hex-only entries for terminal byte values with no ASN.1 candidates.

Terminal BIT STRING or OCTET STRING values that do not have ASN.1 candidates remain inspectable as raw hex instead of being mislabeled.

Selected Candidate Details

Selecting a candidate shows:

  • score and confidence,
  • evidence,
  • diagnostics,
  • ambiguities,
  • matched paths,
  • selected bytes.

The Copy action writes formatted JSON for the selected item, including candidates, evidence, diagnostics, matched paths, and selected bytes.

API Log

The API log records high-level parse and report operations, viewer edit actions, and one line per root candidate.

Candidate log rows include type name, score, confidence, evidence counts, diagnostic counts, ambiguity counts, matched-path counts, and representative messages.

Styling

The viewer follows the PkiStudio family style:

  • translucent shell surfaces,
  • light and dark themes,
  • quiet embedded viewer and candidate frames,
  • opaque node context menus for readability,
  • compact selected-candidate sections that avoid wrapping non-byte content.

Clone this wiki locally