Merge pull request #90 from baloo/baloo/ctap/adjust-comments

ctap: adjust comments about clientdata hashing
This commit is contained in:
J.C. Jones 2019-10-09 13:33:16 -07:00 коммит произвёл GitHub
Родитель 587f6f784a f07f8cb4d6
Коммит 20becda783
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -218,10 +218,11 @@ impl<'de> Deserialize<'de> for ClientDataHash {
impl CollectedClientData {
pub fn hash(&self) -> json::Result<ClientDataHash> {
// TODO(baloo): this could use a bit more spec, there is no ordering specified. Are spaces
// allowed? Is this needed for support between vendors? Does it need to be
// stable across browsers? Maybe send an email to the mailing list.
// https://w3c.github.io/webauthn/#collectedclientdata-json-serialized-client-data
// WebIDL's dictionary definition specifies that the order of the struct
// is exactly as the WebIDL specification declares it, with an algorithm
// for partial dictionaries, so that's how interop works for these
// things.
// See: https://heycam.github.io/webidl/#dfn-dictionary
let data = json::to_vec(&self)?;
let mut hasher = Sha256::new();