Module email

Module email 

Source
Expand description

Email challenge — CA sends a one-time code to an email address, client submits it.

This is the primary challenge type described in the NDNCERT paper (ndn-0050-1). It is a two-round exchange:

Round 1 — First CHALLENGE request: client provides { "email": "user@example.com" }. CA generates a 6-digit OTP, sends it to the address, stores a hash + expiry, and responds with Processing status.

Round 2 — Second CHALLENGE request: client provides { "email": "...", "code": "123456" }. CA checks the hash and remaining attempts.

§Email delivery

The EmailSender trait is deliberately transport-agnostic so callers can plug in any delivery mechanism (SMTP via lettre, HTTP webhook, mock for tests).

Structs§

EmailChallenge
NDNCERT email challenge handler.

Traits§

EmailSender
Abstraction over email delivery.