mirror of
https://github.com/openssl/openssl.git
synced 2025-02-05 14:10:53 +08:00
ASN1: Fix d2i_KeyParams() to advance |pp| like all other d2i functions do
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12587)
This commit is contained in:
parent
0bc193dd05
commit
a955676141
@ -18,7 +18,6 @@ EVP_PKEY *d2i_KeyParams(int type, EVP_PKEY **a, const unsigned char **pp,
|
|||||||
long length)
|
long length)
|
||||||
{
|
{
|
||||||
EVP_PKEY *ret = NULL;
|
EVP_PKEY *ret = NULL;
|
||||||
const unsigned char *p = *pp;
|
|
||||||
|
|
||||||
if ((a == NULL) || (*a == NULL)) {
|
if ((a == NULL) || (*a == NULL)) {
|
||||||
if ((ret = EVP_PKEY_new()) == NULL)
|
if ((ret = EVP_PKEY_new()) == NULL)
|
||||||
@ -34,7 +33,7 @@ EVP_PKEY *d2i_KeyParams(int type, EVP_PKEY **a, const unsigned char **pp,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ret->ameth->param_decode(ret, &p, length))
|
if (!ret->ameth->param_decode(ret, pp, length))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (a != NULL)
|
if (a != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user