mirror of
https://github.com/openssl/openssl.git
synced 2024-11-29 04:55:11 +08:00
Sanity check keylength in PVK files.
PR#2277
This commit is contained in:
parent
75b7606881
commit
5ecf1141a5
@ -759,6 +759,11 @@ static EVP_PKEY *do_PVK_body(const unsigned char **in,
|
||||
/* Copy BLOBHEADER across, decrypt rest */
|
||||
memcpy(enctmp, p, 8);
|
||||
p += 8;
|
||||
if (keylen < 8)
|
||||
{
|
||||
PEMerr(PEM_F_DO_PVK_BODY, PEM_R_PVK_TOO_SHORT);
|
||||
return NULL;
|
||||
}
|
||||
inlen = keylen - 8;
|
||||
q = enctmp + 8;
|
||||
if (!EVP_DecryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, NULL))
|
||||
|
Loading…
Reference in New Issue
Block a user