pkcs8: Don't forward NULL parameters when parsing keys
Other plugins don't expect this build part for RSA keys and will fail parsing the keys further.
This commit is contained in:
1 parent
02e4f994ec
commit
d6d31fce23
1 file changed
+2
-1
@@ -97,7 +97,8 @@ static private_key_t *parse_private_key(chunk_t blob)
|
||||
case PKINFO_PRIVATE_KEY:
|
||||
{
|
||||
DBG2(DBG_ASN, "-- > --");
|
||||
if (params.ptr)
|
||||
if (params.len &&
|
||||
!chunk_equals(params, chunk_from_chars(0x05, 0x00)))
|
||||
{
|
||||
key = lib->creds->create(lib->creds, CRED_PRIVATE_KEY,
|
||||
type, BUILD_BLOB_ALGID_PARAMS,
|
||||
|
||||
Reference in new issue
Block a user