Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
29bc963a
Commit
29bc963a
authored
May 25, 2018
by
Sietse Ringers
Browse files
Also fetch timestamp in keyshare ABS sessions
parent
0ddf8208
Changes
2
Hide whitespace changes
Inline
Side-by-side
irmaclient/client.go
View file @
29bc963a
...
...
@@ -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
}
...
...
irmaclient/session.go
View file @
29bc963a
...
...
@@ -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
))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment