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
bb0d9f90
Commit
bb0d9f90
authored
Nov 12, 2019
by
Sietse Ringers
Browse files
refactor: move revocation record PublicKeyIndex field from gabi to here
parent
1649a6d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
revocation.go
View file @
bb0d9f90
...
@@ -42,6 +42,7 @@ type (
...
@@ -42,6 +42,7 @@ type (
RevocationRecord
struct
{
RevocationRecord
struct
{
revocation
.
Record
`gorm:"embedded"`
revocation
.
Record
`gorm:"embedded"`
PublicKeyIndex
uint
CredType
CredentialTypeIdentifier
`gorm:"primary_key"`
CredType
CredentialTypeIdentifier
`gorm:"primary_key"`
}
}
...
@@ -88,12 +89,12 @@ func (rs *RevocationStorage) EnableRevocation(typ CredentialTypeIdentifier) erro
...
@@ -88,12 +89,12 @@ func (rs *RevocationStorage) EnableRevocation(typ CredentialTypeIdentifier) erro
}
}
r
:=
&
RevocationRecord
{
r
:=
&
RevocationRecord
{
Record
:
revocation
.
Record
{
Record
:
revocation
.
Record
{
PublicKeyIndex
:
sk
.
Counter
,
Message
:
msg
,
Message
:
msg
,
StartIndex
:
acc
.
Index
,
StartIndex
:
acc
.
Index
,
EndIndex
:
acc
.
Index
,
EndIndex
:
acc
.
Index
,
},
},
CredType
:
typ
,
PublicKeyIndex
:
sk
.
Counter
,
CredType
:
typ
,
}
}
if
err
=
rs
.
AddRevocationRecord
(
r
);
err
!=
nil
{
if
err
=
rs
.
AddRevocationRecord
(
r
);
err
!=
nil
{
...
@@ -261,12 +262,12 @@ func (rs *RevocationStorage) revokeAttr(tx revStorage, typ CredentialTypeIdentif
...
@@ -261,12 +262,12 @@ func (rs *RevocationStorage) revokeAttr(tx revStorage, typ CredentialTypeIdentif
}
}
record
:=
&
RevocationRecord
{
record
:=
&
RevocationRecord
{
Record
:
revocation
.
Record
{
Record
:
revocation
.
Record
{
StartIndex
:
newAcc
.
Index
,
StartIndex
:
newAcc
.
Index
,
EndIndex
:
newAcc
.
Index
,
EndIndex
:
newAcc
.
Index
,
PublicKeyIndex
:
sk
.
Counter
,
Message
:
updateMsg
,
Message
:
updateMsg
,
},
},
CredType
:
typ
,
PublicKeyIndex
:
sk
.
Counter
,
CredType
:
typ
,
}
}
if
err
=
rs
.
addRevocationRecord
(
tx
,
record
,
true
);
err
!=
nil
{
if
err
=
rs
.
addRevocationRecord
(
tx
,
record
,
true
);
err
!=
nil
{
return
err
return
err
...
...
Write
Preview
Supports
Markdown
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