Skip to content
GitLab
Menu
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
79f50391
Commit
79f50391
authored
Aug 26, 2018
by
Sietse Ringers
Browse files
Support no-attribute disclosures in verification of disclosure proofs and signatures
parent
94e6bdc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
verify.go
View file @
79f50391
...
...
@@ -147,18 +147,30 @@ func (pl ProofList) DisclosedAttributes(configuration *Configuration, disjunctio
}
for
k
,
v
:=
range
proofd
.
ADisclosed
{
if
k
<
2
{
continue
//
skip metadata attribut
e
if
k
==
0
{
continue
//
Should never be disclosed, but skip it to be sur
e
}
attrid
:=
credtype
.
Attributes
[
k
-
2
]
.
GetAttributeTypeIdentifier
()
attrval
:=
decodeAttribute
(
v
,
metadata
.
Version
())
attr
:=
&
DisclosedAttribute
{
var
attrid
AttributeTypeIdentifier
var
attrval
*
string
var
attr
*
DisclosedAttribute
if
k
==
1
{
attrid
=
NewAttributeTypeIdentifier
(
credtype
.
Identifier
()
.
String
())
p
:=
"present"
attrval
=
&
p
}
else
{
attrid
=
credtype
.
Attributes
[
k
-
2
]
.
GetAttributeTypeIdentifier
()
attrval
=
decodeAttribute
(
v
,
metadata
.
Version
())
}
attr
=
&
DisclosedAttribute
{
Value
:
translateAttribute
(
attrval
),
Identifier
:
attrid
,
Status
:
AttributeProofStatusExtra
,
}
extraAttrs
[
attrid
]
=
attr
if
k
<
2
{
// Never add metadata (i.e. no-attribute disclosure) as extra
extraAttrs
[
attrid
]
=
attr
}
if
len
(
disjunctions
)
==
0
{
continue
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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