Skip to content

Initiator: Set identity at a better place #413

@chrysn

Description

@chrysn

Currently we allow .set_identity() on the initiator in two places: right at creation, and between parse_message_2 and verify_message_2 (and require it in one).

I'd like to set the identity after verify_message_2 from a carry-state-where perspective (even though that's not impactful yet because we have way too many Option<> rather than type states): Until verify_message_2, the initiator carries around the full message 2; after setting the initiator's identity, it carries the credential. At some point between receiving message 2 and producing message 3, a client may want to sleep, and thus have an await point, and thus will need to store the initiator on the async stack. Delaying the setting of the identity would allow having that await point (saved as part of the state machine) when the initiator is small, leaving the larger parts only on the stack.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions