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

src,crypto: avoid tristate Maybe<bool> in ExportJWKEcKey() #42223

Commits on Mar 5, 2022

  1. src,crypto: avoid tristate Maybe<bool> in ExportJWKEcKey()

    The function currently uses the return value to convey whether an
    exception was thrown while it was running by using either Just(true) or
    Nothing<bool>(). Unfortunately, Maybe<bool> also has a third state -
    Just(false), which doesn't make any sense here. So this change avoids
    the possibility of a tristate return value by making use of Maybe<void>
    which only has two valid states - JustVoid() / Nothing<void>(), which
    fits right in.
    
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    3c99003 View commit details
    Browse the repository at this point in the history