Update - OpenSSL 1.1.1-pre7-dev
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#include "pcy_int.h"
|
||||
|
||||
@@ -66,8 +67,10 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_NODE *node;
|
||||
|
||||
node = OPENSSL_zalloc(sizeof(*node));
|
||||
if (node == NULL)
|
||||
if (node == NULL) {
|
||||
X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
node->data = data;
|
||||
node->parent = parent;
|
||||
if (level) {
|
||||
@@ -79,20 +82,28 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
|
||||
|
||||
if (level->nodes == NULL)
|
||||
level->nodes = policy_node_cmp_new();
|
||||
if (level->nodes == NULL)
|
||||
if (level->nodes == NULL) {
|
||||
X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
|
||||
goto node_error;
|
||||
if (!sk_X509_POLICY_NODE_push(level->nodes, node))
|
||||
}
|
||||
if (!sk_X509_POLICY_NODE_push(level->nodes, node)) {
|
||||
X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
|
||||
goto node_error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tree) {
|
||||
if (tree->extra_data == NULL)
|
||||
tree->extra_data = sk_X509_POLICY_DATA_new_null();
|
||||
if (tree->extra_data == NULL)
|
||||
if (tree->extra_data == NULL){
|
||||
X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
|
||||
goto node_error;
|
||||
if (!sk_X509_POLICY_DATA_push(tree->extra_data, data))
|
||||
}
|
||||
if (!sk_X509_POLICY_DATA_push(tree->extra_data, data)) {
|
||||
X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
|
||||
goto node_error;
|
||||
}
|
||||
}
|
||||
|
||||
if (parent)
|
||||
|
||||
Reference in New Issue
Block a user