File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 4
4
package v1_16 //nolint
5
5
6
6
import (
7
- "crypto/elliptic"
8
7
"encoding/base32"
9
8
"fmt"
10
9
"strings"
@@ -123,13 +122,17 @@ func RemigrateU2FCredentials(x *xorm.Engine) error {
123
122
if err != nil {
124
123
continue
125
124
}
125
+ pubKey , err := parsed .PubKey .ECDH ()
126
+ if err != nil {
127
+ continue
128
+ }
126
129
remigrated := & webauthnCredential {
127
130
ID : reg .ID ,
128
131
Name : reg .Name ,
129
132
LowerName : strings .ToLower (reg .Name ),
130
133
UserID : reg .UserID ,
131
134
CredentialID : base32 .HexEncoding .EncodeToString (parsed .KeyHandle ),
132
- PublicKey : elliptic . Marshal ( elliptic . P256 (), parsed . PubKey . X , parsed . PubKey . Y ),
135
+ PublicKey : pubKey . Bytes ( ),
133
136
AttestationType : "fido-u2f" ,
134
137
AAGUID : []byte {},
135
138
SignCount : reg .Counter ,
You can’t perform that action at this time.
0 commit comments