This commit is contained in:
beltram
2023-05-22 12:37:36 +02:00
committed by Herman Slatman
parent 0b68e1bbcf
commit 613e6cae6e

View File

@@ -563,12 +563,12 @@ func wireDPOP01Validate(ctx context.Context, ch *Challenge, db DB, jwk *jose.JSO
return WrapErrorISE(err, "Failed parsing dpop token")
}
order, err := db.GetOrdersByAccountID(ctx, ch.AccountID)
orders, err := db.GetAllOrdersByAccountID(ctx, ch.AccountID)
if err != nil {
return WrapErrorISE(err, "Could not find current order by account id")
}
if err := db.CreateDpop(ctx, order[0], dpop); err != nil {
if err := db.CreateDpop(ctx, orders[0], dpop); err != nil {
return WrapErrorISE(err, "Failed storing DPoP token")
}