In OpenSSL builds, declare STACK for datatypes ...
[openssl.git] / crypto / x509 / v3_pci.c
index 856b70d9b515073252ec82701328fe38d2525641..4e02f9c54626753a09a965715efd160eed263d54 100644 (file)
@@ -49,6 +49,8 @@
 #include <openssl/x509v3.h>
 #include "ext_dat.h"
 
+DEFINE_STACK_OF(CONF_VALUE)
+
 static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *ext,
                    BIO *out, int indent);
 static PROXY_CERT_INFO_EXTENSION *r2i_pci(X509V3_EXT_METHOD *method,
@@ -116,7 +118,8 @@ static int process_pci_value(CONF_VALUE *val,
     } else if (strcmp(val->name, "policy") == 0) {
         unsigned char *tmp_data = NULL;
         long val_len;
-        if (!*policy) {
+
+        if (*policy == NULL) {
             *policy = ASN1_OCTET_STRING_new();
             if (*policy == NULL) {
                 X509V3err(X509V3_F_PROCESS_PCI_VALUE, ERR_R_MALLOC_FAILURE);