From f1df48331fb84ccca058563bad51529107533f1c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 19 Sep 2018 01:10:33 -0700 Subject: [PATCH 1/1] PKCS12_parse returns NULL instead of empty stacks. --- ldid.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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) : -- 2.45.2