Eg. if someones sends crap to scep_certrep it replies that it cannot read the transactionID. First, it should check if it is really getting a valid PKCS7 structure before trying to evaluate attributes.
It already kind of does, doesn't it? We use d2i_PKCS7 so the message must be readable as a PKCS#7. Then we check for the correct tpyes and presence of parameters. Do you think we need more here?
Eg. if someones sends crap to scep_certrep it replies that it cannot read the transactionID. First, it should check if it is really getting a valid PKCS7 structure before trying to evaluate attributes.