Commit 47ced98d authored by Sietse Ringers's avatar Sietse Ringers

Return error if verifying ABS containing unknown credential types

parent 7b612610
......@@ -63,11 +63,12 @@ func VerifyTimestamp(irmaSignature *IrmaSignedMessage, message string, conf *Con
disclosed := make([][]*big.Int, size)
for i, proof := range irmaSignature.Signature {
proofd := proof.(*gabi.ProofD)
meta := MetadataFromInt(proofd.ADisclosed[1], conf)
sigs[i] = proofd.A
// TODO check for nil
attrcount := len(meta.CredentialType().Attributes) + 2 // plus secret key and metadata
ct := MetadataFromInt(proofd.ADisclosed[1], conf).CredentialType()
if ct == nil {
return errors.New("Cannot verify timestamp: signature contains attributes from unknown credential type")
}
attrcount := len(ct.Attributes) + 2 // plus secret key and metadata
disclosed[i] = make([]*big.Int, attrcount)
for j := 0; j < attrcount; j++ {
val, ok := proofd.ADisclosed[j]
......
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