From 33ded5555d8f923b0b3f3d7745fca25b6a1599ac Mon Sep 17 00:00:00 2001 From: ale Date: Wed, 27 Mar 2019 08:49:48 +0000 Subject: [PATCH] Update deps (fix u2f encoding error) --- .../ai3/go-common/ldap/compositetypes/composite_types.go | 9 +++++---- vendor/vendor.json | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/vendor/git.autistici.org/ai3/go-common/ldap/compositetypes/composite_types.go b/vendor/git.autistici.org/ai3/go-common/ldap/compositetypes/composite_types.go index 32a1978..80f1366 100644 --- a/vendor/git.autistici.org/ai3/go-common/ldap/compositetypes/composite_types.go +++ b/vendor/git.autistici.org/ai3/go-common/ldap/compositetypes/composite_types.go @@ -103,7 +103,8 @@ func UnmarshalEncryptedKey(s string) (*EncryptedKey, error) { // // The serialized format follows part of the U2F standard and just // stores 64 bytes of the public key immediately followed by the key -// handle data, with no encoding. +// handle data, with no encoding. Note that the public key itself is a +// serialization of the elliptic curve parameters. // // The data in U2FRegistration is still encoded, but it can be turned // into a usable form (github.com/tstranex/u2f.Registration) later. @@ -122,13 +123,13 @@ func (r *U2FRegistration) Marshal() string { // UnmarshalU2FRegistration parses a U2FRegistration from its serialized format. func UnmarshalU2FRegistration(s string) (*U2FRegistration, error) { - if len(s) < 64 { + if len(s) < 65 { return nil, errors.New("badly encoded u2f registration") } b := []byte(s) return &U2FRegistration{ - PublicKey: b[:64], - KeyHandle: b[64:], + PublicKey: b[:65], + KeyHandle: b[65:], }, nil } diff --git a/vendor/vendor.json b/vendor/vendor.json index fd49571..4ea5d9a 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -21,10 +21,10 @@ "revisionTime": "2019-02-17T09:01:06Z" }, { - "checksumSHA1": "X14iCbFCOfaIai/TPi4VJ/OBZjc=", + "checksumSHA1": "ETt1H7ZXeT+mOGVuWDvgGBVx98k=", "path": "git.autistici.org/ai3/go-common/ldap/compositetypes", - "revision": "301958e3493e263eb6ea269bf7b8644fbcd97394", - "revisionTime": "2019-03-21T10:42:03Z" + "revision": "95125bd587550f8f2ae1e7c412bb0ef94671f014", + "revisionTime": "2019-03-27T08:48:39Z" }, { "checksumSHA1": "mfFIqmwojDqQdJvjLI3y7YCQ+2c=", -- GitLab