Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made SendKeyForAccountFlow return the created key too. #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xavierlepretre
Copy link

Added tests too.

Unlike ProvideKeyFlow, SendKeyForAccountFlow does not return the created key. This pull request fixes that.

The use case is where both ends of the flow come to agreement about which key to use.

Because both ends need to know the key created, it was not possible to use RequestKeyForAccountFlow, and instead RequestKeyFlow was used.

@roastario roastario self-requested a review May 21, 2020 10:07
Copy link
Contributor

@roastario roastario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you throw an exception on the responder flow, it is quite a bit harder to figure out what the actual issue is due to the way that errors are masked from initiators.

@xavierlepretre could you restore the existing FOUND/NOT_FOUND response, and then looks good to me.

@xavierlepretre
Copy link
Author

xavierlepretre commented May 21, 2020

@roastario

  1. I thought that with a FlowException thrown in the responder, it was propagated back to the initiator, which is waiting for a reply.
  2. If I reinstate the found / not found state, the responder will have to return a PublicKey? while the initiator can return a PublicKey. Unless the responder sends back "not found" and then throws (not sure about the implications of this double action). Is any ok?

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