Commit 29bc963a authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Also fetch timestamp in keyshare ABS sessions

parent 0ddf8208
......@@ -524,7 +524,7 @@ func (client *Client) groupCredentials(choice *irma.DisclosureChoice) (map[irma.
}
// ProofBuilders constructs a list of proof builders for the specified attribute choice.
func (client *Client) ProofBuilders(choice *irma.DisclosureChoice) (gabi.ProofBuilderList, error) {
func (client *Client) ProofBuilders(choice *irma.DisclosureChoice, request irma.IrmaSession, issig bool) (gabi.ProofBuilderList, error) {
todisclose, err := client.groupCredentials(choice)
if err != nil {
return nil, err
......@@ -538,15 +538,6 @@ func (client *Client) ProofBuilders(choice *irma.DisclosureChoice) (gabi.ProofBu
}
builders = append(builders, cred.Credential.CreateDisclosureProofBuilder(list))
}
return builders, nil
}
// Proofs computes disclosure proofs containing the attributes specified by choice.
func (client *Client) Proofs(choice *irma.DisclosureChoice, request irma.IrmaSession, issig bool) (gabi.ProofList, error) {
builders, err := client.ProofBuilders(choice)
if err != nil {
return nil, err
}
if issig {
var sigs []*big.Int
......@@ -565,6 +556,16 @@ func (client *Client) Proofs(choice *irma.DisclosureChoice, request irma.IrmaSes
}
}
return builders, nil
}
// Proofs computes disclosure proofs containing the attributes specified by choice.
func (client *Client) Proofs(choice *irma.DisclosureChoice, request irma.IrmaSession, issig bool) (gabi.ProofList, error) {
builders, err := client.ProofBuilders(choice, request, issig)
if err != nil {
return nil, err
}
return builders.BuildProofList(request.GetContext(), request.GetNonce(), issig), nil
}
......@@ -590,7 +591,7 @@ func (client *Client) IssuanceProofBuilders(request *irma.IssuanceRequest) (gabi
proofBuilders = append(proofBuilders, credBuilder)
}
disclosures, err := client.ProofBuilders(request.Choice)
disclosures, err := client.ProofBuilders(request.Choice, request, false)
if err != nil {
return nil, err
}
......
......@@ -130,9 +130,9 @@ func (session *session) getBuilders() (gabi.ProofBuilderList, error) {
switch session.Action {
case irma.ActionSigning:
fallthrough
builders, err = session.client.ProofBuilders(session.choice, session.irmaSession, true)
case irma.ActionDisclosing:
builders, err = session.client.ProofBuilders(session.choice)
builders, err = session.client.ProofBuilders(session.choice, session.irmaSession, false)
case irma.ActionIssuing:
builders, err = session.client.IssuanceProofBuilders(session.irmaSession.(*irma.IssuanceRequest))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment