Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18931)
}
if (ext == NULL) /* no extensions is not an error */
return sk_X509_EXTENSION_new_null();
- if (ext->type != V_ASN1_SEQUENCE)
+ if (ext->type != V_ASN1_SEQUENCE) {
+ ERR_raise(ERR_LIB_X509, X509_R_WRONG_TYPE);
return NULL;
+ }
p = ext->value.sequence->data;
return (STACK_OF(X509_EXTENSION) *)
ASN1_item_d2i(NULL, &p, ext->value.sequence->length,