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
c06eb1fc
Commit
c06eb1fc
authored
Apr 13, 2019
by
Sietse Ringers
Browse files
fix: nil deref in registration issuance
parent
28336521
Changes
1
Hide whitespace changes
Inline
Side-by-side
irmaclient/client.go
View file @
c06eb1fc
...
...
@@ -496,13 +496,13 @@ type attributeGroup struct {
func
(
client
*
Client
)
groupCredentials
(
choice
*
irma
.
DisclosureChoice
)
(
[]
attributeGroup
,
irma
.
DisclosedAttributeIndices
,
error
,
)
{
todisclose
:=
make
([]
attributeGroup
,
0
,
len
(
choice
.
Attributes
))
if
choice
==
nil
||
choice
.
Attributes
==
nil
{
return
todisclose
,
irma
.
DisclosedAttributeIndices
{},
nil
return
[]
attributeGroup
{}
,
irma
.
DisclosedAttributeIndices
{},
nil
}
// maps an irma.CredentialIdentifier to its index in the final ProofList
credIndices
:=
make
(
map
[
irma
.
CredentialIdentifier
]
int
)
todisclose
:=
make
([]
attributeGroup
,
0
,
len
(
choice
.
Attributes
))
attributeIndices
:=
make
(
irma
.
DisclosedAttributeIndices
,
len
(
choice
.
Attributes
))
for
i
,
attribute
:=
range
choice
.
Attributes
{
var
credIndex
int
...
...
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