Use case: load signing cert from P12/PFX in browser #24

Closed
EduarD3V wants to merge 0 commits from issue/5-use-case-load-signing-cert-fro into bullet-develop
Owner

Implements #5.

Refs #5

Automated by bullet: reviewed (independent model) → gates green on merged tree. Auto-merge follows.

Implements **#5**. Refs #5 Automated by bullet: reviewed (independent model) → gates green on merged tree. Auto-merge follows.
Review finding: "CertPicker kept the previous file's certificate list (and
enabled Firmar) after a different keystore file was picked" — 27d86a5 cleared
the list in the file-change handler, which covers the settled load only. A load
still running when the file changed repopulated the list from the superseded
file, so the displayed signer and the enabled Firmar button again belonged to
another file (reproduced: pick a file, start the load, pick a second file).

CertPicker now tags every load with the file generation it started from and
discards results, errors and the loading flag belonging to a superseded
generation; App.test.ts adds the regression test (red before this commit).
Removing the document while a keystore load was still running left the late
onpick(session.signer) to repopulate App.cert after clearFile(), so the next
document enabled signing with a certificate that was never loaded for it
(reproduced: gated load, remove document mid-load, pick a new document ->
Firmar enabled).

CertPicker now bumps its load generation in onDestroy, which invalidates the
pending load the same way a file change does. Regression test in App.test.ts
(gated via mocked loadSignerSession, red before this commit).
EduarD3V closed this pull request 2026-10-14 15:30:42 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
EduarD3V/AutoFirme!24
No description provided.