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
0a562a37
Commit
0a562a37
authored
May 24, 2018
by
Sietse Ringers
Browse files
Fix improper error message in case of wrong message in ABS
parent
6955da45
Changes
1
Hide whitespace changes
Inline
Side-by-side
verify.go
View file @
0a562a37
...
...
@@ -288,7 +288,17 @@ func verify(configuration *Configuration, proofList gabi.ProofList, context *big
// Verify a signature proof and check if the attributes match the attributes in the original request
func
VerifySig
(
configuration
*
Configuration
,
irmaSignature
*
IrmaSignedMessage
,
sigRequest
*
SignatureRequest
)
*
SignatureProofResult
{
// First, verify the timestamp, if any
// First check if this signature matches the request
sigRequest
.
Timestamp
=
irmaSignature
.
Timestamp
if
!
irmaSignature
.
MatchesNonceAndContext
(
sigRequest
)
{
return
&
SignatureProofResult
{
ProofResult
:
&
ProofResult
{
ProofStatus
:
UNMATCHED_REQUEST
,
},
}
}
// Verify the timestamp
if
irmaSignature
.
Timestamp
!=
nil
{
if
err
:=
VerifyTimestamp
(
irmaSignature
,
sigRequest
.
Message
,
configuration
);
err
!=
nil
{
return
&
SignatureProofResult
{
...
...
@@ -297,16 +307,6 @@ func VerifySig(configuration *Configuration, irmaSignature *IrmaSignedMessage, s
},
}
}
sigRequest
.
Timestamp
=
irmaSignature
.
Timestamp
}
// Then, check if nonce and context of the signature match those of the signature request
if
!
irmaSignature
.
MatchesNonceAndContext
(
sigRequest
)
{
return
&
SignatureProofResult
{
ProofResult
:
&
ProofResult
{
ProofStatus
:
UNMATCHED_REQUEST
,
},
}
}
// Now, cryptographically verify the signature
...
...
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