Commit ede8e739 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Test that the credential singleton flag is enforced

parent 75f35fd2
......@@ -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
......
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