Commit 87be2219 authored by npzacs's avatar npzacs Committed by Ano Nymous
Browse files

crypto_aacs_verify_cert(): check certificate length

parent 46783398
......@@ -455,6 +455,12 @@ int crypto_aacs_verify_aacsla(const uint8_t *signature, const uint8_t *data, ui
int crypto_aacs_verify_cert(const uint8_t *cert)
{
if (MKINT_BE16(cert+2) != 0x5c) {
DEBUG(DBG_AACS|DBG_CRIT, "Certificate length is invalid (0x%04x), expected 0x005c\n",
MKINT_BE16(cert+2));
return 0;
}
return crypto_aacs_verify_aacsla(cert + 52, cert, 52);
}
......
Supports Markdown
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