Skip to content

Commit

Permalink
Make doc clearer on getCrossSigningKeyId (#4477)
Browse files Browse the repository at this point in the history
* Make doc clearer on getCrossSigningKeyId

I was trying to work out why this was being used in a check. It
turns out it only returns the key ID if the private part is stored
locally, which seems very much non-obvious.

* Better doc

* Formatting & clarity

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
  • Loading branch information
dbkr and richvdh authored Nov 4, 2024
1 parent a197afe commit 794f044
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/crypto-api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,13 @@ export interface CryptoApi {
isCrossSigningReady(): Promise<boolean>;

/**
* Get the ID of one of the user's cross-signing keys.
* Get the ID of one of the user's cross-signing keys, if both private and matching
* public parts of that key are available (ie. cached in the local crypto store).
*
* The public part may not be available if a `/keys/query` request has not yet been
* performed, or if the device that created the keys failed to publish them.
*
* If either part of the keypair is not available, this will return `null`.
*
* @param type - The type of key to get the ID of. One of `CrossSigningKey.Master`, `CrossSigningKey.SelfSigning`,
* or `CrossSigningKey.UserSigning`. Defaults to `CrossSigningKey.Master`.
Expand Down

0 comments on commit 794f044

Please sign in to comment.