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, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509v3/pcy_data.c b/src/lib/libcrypto/x509v3/pcy_data.c index fb392b901f..3444b03195 100644 --- a/src/lib/libcrypto/x509v3/pcy_data.c +++ b/src/lib/libcrypto/x509v3/pcy_data.c | |||
@@ -82,17 +82,21 @@ 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, ASN1_OBJECT *id, int crit) | 85 | X509_POLICY_DATA *policy_data_new(POLICYINFO *policy, |
86 | const ASN1_OBJECT *cid, int crit) | ||
86 | { | 87 | { |
87 | X509_POLICY_DATA *ret; | 88 | X509_POLICY_DATA *ret; |
88 | if (!policy && !id) | 89 | ASN1_OBJECT *id; |
90 | if (!policy && !cid) | ||
89 | return NULL; | 91 | return NULL; |
90 | if (id) | 92 | if (cid) |
91 | { | 93 | { |
92 | id = OBJ_dup(id); | 94 | id = OBJ_dup(cid); |
93 | if (!id) | 95 | if (!id) |
94 | return NULL; | 96 | return NULL; |
95 | } | 97 | } |
98 | else | ||
99 | id = NULL; | ||
96 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); | 100 | ret = OPENSSL_malloc(sizeof(X509_POLICY_DATA)); |
97 | if (!ret) | 101 | if (!ret) |
98 | return NULL; | 102 | return NULL; |