We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d3f28e5 + 2d9249b commit dc2f62bCopy full SHA for dc2f62b
models/migrations/v1_16/v210.go
@@ -4,7 +4,6 @@
4
package v1_16 //nolint
5
6
import (
7
- "crypto/elliptic"
8
"encoding/base32"
9
"fmt"
10
"strings"
@@ -123,13 +122,17 @@ func RemigrateU2FCredentials(x *xorm.Engine) error {
123
122
if err != nil {
124
continue
125
}
+ pubKey, err := parsed.PubKey.ECDH()
126
+ if err != nil {
127
+ continue
128
+ }
129
remigrated := &webauthnCredential{
130
ID: reg.ID,
131
Name: reg.Name,
132
LowerName: strings.ToLower(reg.Name),
133
UserID: reg.UserID,
134
CredentialID: base32.HexEncoding.EncodeToString(parsed.KeyHandle),
- PublicKey: elliptic.Marshal(elliptic.P256(), parsed.PubKey.X, parsed.PubKey.Y),
135
+ PublicKey: pubKey.Bytes(),
136
AttestationType: "fido-u2f",
137
AAGUID: []byte{},
138
SignCount: reg.Counter,
0 commit comments