diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/pcy_data.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/pcy_data.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/libcrypto/x509v3/pcy_data.c b/src/lib/libcrypto/x509v3/pcy_data.c index 3444b03195..fb392b901f 100644 --- a/src/lib/libcrypto/x509v3/pcy_data.c +++ b/src/lib/libcrypto/x509v3/pcy_data.c | |||
@@ -82,21 +82,17 @@ void policy_data_free(X509_POLICY_DATA *data) | |||
82 | * another source. | 82 | * another source. |
83 | */ | 83 | */ |
84 | 84 | ||
85 | X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, | 85 | X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, ASN1_OBJECT *id, int crit) |
86 | const ASN1_OBJECT *cid, int crit) | ||
87 | { | 86 | { |
88 | X509_POLICY_DATA *ret; | 87 | X509_POLICY_DATA *ret; |
89 | ASN1_OBJECT *id; | 88 | if (!policy && !id) |
90 | if (!policy && !cid) | ||
91 | return NULL; | 89 | return NULL; |
92 | if (cid) | 90 | if (id) |
93 | { | 91 | { |
94 | id = OBJ_dup(cid); | 92 | id = OBJ_dup(id); |
95 | if (!id) | 93 | if (!id) |
96 | return NULL; | 94 | return NULL; |
97 | } | 95 | } |
98 | else | ||
99 | id = NULL; | ||
100 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); | 96 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); |
101 | if (!ret) | 97 | if (!ret) |
102 | return NULL; | 98 | return NULL; |