Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joshua Root
libaacs
Commits
87be2219
Commit
87be2219
authored
Sep 24, 2011
by
npzacs
Committed by
Ano Nymous
Feb 18, 2012
Browse files
crypto_aacs_verify_cert(): check certificate length
parent
46783398
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libaacs/crypto.c
View file @
87be2219
...
...
@@ -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
);
}
...
...
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