Skip to content

Expose the raw HHD UC challenge as tanChallengeHhdUc (chipTAN flicker codes) - #41

Merged
robocode13 merged 1 commit into
robocode13:mainfrom
catallo:expose-challenge-hhduc
Oct 28, 2026
Merged

robocode13 merged 1 commit into
robocode13:mainfrom
catallo:expose-challenge-hhduc

Conversation

@catallo

@catallo catallo commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

What

Adds tanChallengeHhdUc to ClientResponse: the raw challengeHhdUc string from the HITAN segment, untouched.

Why

For chipTAN methods (e.g. Sparkasse "chipTAN optisch", HITANS v6, HHD1.3.2OPT) the bank uses the HHD UC field for the flicker code data, not for an image container. A real challenge from Sparkasse Duisburg looks like this:

HITAN:5:6:5+4++7659-...+Sie möchten sich "auf einem neuen Gerät anmelden"?: Bitte bestätigen Sie den "Startcode 80094782" mit der Taste "OK".+@12@100880094782++Kartennummer ******6322'

100880094782 is an HHD 1.3 code (LC 10, start code 80094782) that a client renders as the optical flicker animation for the TAN generator. Today the response only exposes tanPhoto, i.e. the result of parseHHDUC(), which interprets the field as a photoTAN image container (length-prefixed MIME type + image). For chipTAN data that yields garbage and the original string is lost, so a client cannot drive chipTAN optisch without re-decoding the message outside the library.

Change

  • ClientResponse.tanChallengeHhdUc?: string set from hitan.challengeHhdUc in handleBaseResponse()
  • tanPhoto unchanged (still correct for photoTAN banks)
  • README: short note in the TAN section

Backwards compatible, no behaviour change for existing fields. pnpm run build and pnpm test pass.

Tested end to end against Sparkasse Duisburg (BLZ 35050000): the exposed value renders to a flicker code that the TAN generator accepts, and the resulting TAN completes the dialog.

@robocode13

Copy link
Copy Markdown
Owner

Thank you for the contribution. I will make a new version soon.

@robocode13
robocode13 merged commit 7e7de30 into robocode13:main Oct 28, 2026
3 checks passed
@catallo
catallo deleted the expose-challenge-hhduc branch October 28, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants