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
ede8e739
Commit
ede8e739
authored
Jun 22, 2018
by
Sietse Ringers
Browse files
Test that the credential singleton flag is enforced
parent
75f35fd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
irmaclient/session_test.go
View file @
ede8e739
...
...
@@ -270,6 +270,20 @@ func TestLargeAttribute(t *testing.T) {
test
.
ClearTestStorage
(
t
)
}
func
TestIssuanceSingletonCredential
(
t
*
testing
.
T
)
{
client
:=
parseStorage
(
t
)
jwtcontents
:=
getIssuanceJwt
(
"testip"
,
true
,
""
)
credid
:=
irma
.
NewCredentialTypeIdentifier
(
"irma-demo.MijnOverheid.root"
)
require
.
Len
(
t
,
client
.
attrs
(
credid
),
0
)
sessionHelper
(
t
,
jwtcontents
,
"issue"
,
client
)
require
.
Len
(
t
,
client
.
attrs
(
credid
),
1
)
sessionHelper
(
t
,
jwtcontents
,
"issue"
,
client
)
require
.
Len
(
t
,
client
.
attrs
(
credid
),
1
)
}
/* There is an annoying difference between how Java and Go convert big integers to and from
byte arrays: in Java the sign of the integer is taken into account, but not in Go. This means
that in Java, when converting a bigint to or from a byte array, the most significant bit
...
...
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