Add comment

This commit is contained in:
Brendan Abolivier 2017-09-12 11:14:48 +01:00
parent f1fce55697
commit 4edbc47ff8
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -254,6 +254,7 @@ func queryIDServerStoreInvite(
// queryIDServerPubKey requests a public key identified with a given ID to the // queryIDServerPubKey requests a public key identified with a given ID to the
// a given identity server and returns the matching base64-decoded public key. // a given identity server and returns the matching base64-decoded public key.
// We assume that the ID server is trusted at this point.
// Returns an error if the request couldn't be sent, if its body couldn't be parsed // Returns an error if the request couldn't be sent, if its body couldn't be parsed
// or if the key couldn't be decoded from base64. // or if the key couldn't be decoded from base64.
func queryIDServerPubKey(idServerName string, keyID string) ([]byte, error) { func queryIDServerPubKey(idServerName string, keyID string) ([]byte, error) {
@ -280,6 +281,7 @@ func queryIDServerPubKey(idServerName string, keyID string) ([]byte, error) {
// If no signature can be found for the ID server's domain, returns an error, else // If no signature can be found for the ID server's domain, returns an error, else
// iterates over the signature for the said domain, retrieves the matching public // iterates over the signature for the said domain, retrieves the matching public
// key, and verify it. // key, and verify it.
// We assume that the ID server is trusted at this point.
// Returns nil if all the verifications succeeded. // Returns nil if all the verifications succeeded.
// Returns an error if something failed in the process. // Returns an error if something failed in the process.
func checkIDServerSignatures(body *MembershipRequest, res *idServerLookupResponse) error { func checkIDServerSignatures(body *MembershipRequest, res *idServerLookupResponse) error {