]> git.saurik.com Git - ldid.git/commitdiff
PKCS12_parse returns NULL instead of empty stacks.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 19 Sep 2018 08:10:33 +0000 (01:10 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 19 Sep 2018 08:10:33 +0000 (01:10 -0700)
ldid.cpp

index f569dc00de6479c62b5bf1e0281a6326b3a120f2..4ad9b2f06827744da417996aacc2878db85c3560 100644 (file)
--- 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) :