Fix NULL dereference when ENCODER does not implement IMPORT_OBJECT
authorPetr Gotthard <petr.gotthard@centrum.cz>
Sun, 18 Apr 2021 16:28:25 +0000 (18:28 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 6 May 2021 15:03:41 +0000 (17:03 +0200)
commit021521aa91d7b1a47f3c3b704f1cc39f169b2e5b
treef11e25dea20007e95231f25d8a4de694cc202d40
parentbfe2fcc840e92df5a5875e55c6aed79891d2612f
Fix NULL dereference when ENCODER does not implement IMPORT_OBJECT

External ENCODER may not implement OSSL_FUNC_ENCODER_IMPORT_OBJECT,
so a check for NULL is needed.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14919)
crypto/encode_decode/encoder_pkey.c