From: Jay Freeman (saurik) Date: Wed, 19 Sep 2018 08:10:33 +0000 (-0700) Subject: PKCS12_parse returns NULL instead of empty stacks. X-Git-Url: https://git.saurik.com/ldid.git/commitdiff_plain/f1df48331fb84ccca058563bad51529107533f1c PKCS12_parse returns NULL instead of empty stacks. --- diff --git a/ldid.cpp b/ldid.cpp index f569dc0..4ad9b2f 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -1454,8 +1454,13 @@ class Stuff { { _assert(value_ != NULL); _assert(PKCS12_parse(value_, "", &key_, &cert_, &ca_) != 0); + _assert(key_ != NULL); _assert(cert_ != NULL); + + if (ca_ == NULL) + ca_ = sk_X509_new_null(); + _assert(ca_ != NULL); } Stuff(const std::string &data) :