-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support hs2019 signatures #92
Comments
https://docs.gotosocial.org/en/latest/federation/http_signatures/#outgoing-requests |
From export class Parser {
// [...]
/**
* Construct the signature class for a given algorithm.
* Override this method if you want to support additional
* algorithms.
* @param {string} algorithm The algorithm used by the signed request
* @param {object} options
* @param {Buffer} options.signature The signature as a buffer
* @param {string} options.string The string that was signed
* @param {string} options.keyId The ID of the public key to be used for verification
* @returns {Signature}
* @throws {UnkownAlgorithmError} If an unknown algorithm was used
*/
getSignatureClass(algorithm, { signature, string, keyId }) {
if(algorithm === 'rsa-sha256') {
return new Sha256Signature({ signature, string, keyId });
} else {
throw new UnkownAlgorithmError(`Don't know how to verify ${algorithm} signatures.`);
}
}
} |
Following a site from a gotosocial instance throws
UnkownAlgorithmError: Don't know how to verify hs2019 signatures.
#24
The text was updated successfully, but these errors were encountered: