Lines Matching refs:param

123 static void x509_verify_param_zero(X509_VERIFY_PARAM *param)  in x509_verify_param_zero()  argument
126 if (!param) in x509_verify_param_zero()
128 param->name = NULL; in x509_verify_param_zero()
129 param->purpose = 0; in x509_verify_param_zero()
130 param->trust = 0; in x509_verify_param_zero()
132 param->inh_flags = 0; in x509_verify_param_zero()
133 param->flags = 0; in x509_verify_param_zero()
134 param->depth = -1; in x509_verify_param_zero()
135 if (param->policies) in x509_verify_param_zero()
137 sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free); in x509_verify_param_zero()
138 param->policies = NULL; in x509_verify_param_zero()
140 paramid = param->id; in x509_verify_param_zero()
168 X509_VERIFY_PARAM *param; in X509_VERIFY_PARAM_new() local
170 param = OPENSSL_malloc(sizeof(X509_VERIFY_PARAM)); in X509_VERIFY_PARAM_new()
171 if (!param) in X509_VERIFY_PARAM_new()
176 OPENSSL_free(param); in X509_VERIFY_PARAM_new()
179 memset(param, 0, sizeof(X509_VERIFY_PARAM)); in X509_VERIFY_PARAM_new()
181 param->id = paramid; in X509_VERIFY_PARAM_new()
182 x509_verify_param_zero(param); in X509_VERIFY_PARAM_new()
183 return param; in X509_VERIFY_PARAM_new()
186 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_free() argument
188 if (param == NULL) in X509_VERIFY_PARAM_free()
190 x509_verify_param_zero(param); in X509_VERIFY_PARAM_free()
191 OPENSSL_free(param->id); in X509_VERIFY_PARAM_free()
192 OPENSSL_free(param); in X509_VERIFY_PARAM_free()
369 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name) in X509_VERIFY_PARAM_set1_name() argument
371 if (param->name) in X509_VERIFY_PARAM_set1_name()
372 OPENSSL_free(param->name); in X509_VERIFY_PARAM_set1_name()
373 param->name = BUF_strdup(name); in X509_VERIFY_PARAM_set1_name()
374 if (param->name) in X509_VERIFY_PARAM_set1_name()
379 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags) in X509_VERIFY_PARAM_set_flags() argument
381 param->flags |= flags; in X509_VERIFY_PARAM_set_flags()
383 param->flags |= X509_V_FLAG_POLICY_CHECK; in X509_VERIFY_PARAM_set_flags()
387 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param, unsigned long flags) in X509_VERIFY_PARAM_clear_flags() argument
389 param->flags &= ~flags; in X509_VERIFY_PARAM_clear_flags()
393 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get_flags() argument
395 return param->flags; in X509_VERIFY_PARAM_get_flags()
398 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose) in X509_VERIFY_PARAM_set_purpose() argument
400 return X509_PURPOSE_set(&param->purpose, purpose); in X509_VERIFY_PARAM_set_purpose()
403 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust) in X509_VERIFY_PARAM_set_trust() argument
405 return X509_TRUST_set(&param->trust, trust); in X509_VERIFY_PARAM_set_trust()
408 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth) in X509_VERIFY_PARAM_set_depth() argument
410 param->depth = depth; in X509_VERIFY_PARAM_set_depth()
413 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t) in X509_VERIFY_PARAM_set_time() argument
415 param->check_time = t; in X509_VERIFY_PARAM_set_time()
416 param->flags |= X509_V_FLAG_USE_CHECK_TIME; in X509_VERIFY_PARAM_set_time()
419 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param, ASN1_OBJECT *policy) in X509_VERIFY_PARAM_add0_policy() argument
421 if (!param->policies) in X509_VERIFY_PARAM_add0_policy()
423 param->policies = sk_ASN1_OBJECT_new_null(); in X509_VERIFY_PARAM_add0_policy()
424 if (!param->policies) in X509_VERIFY_PARAM_add0_policy()
427 if (!sk_ASN1_OBJECT_push(param->policies, policy)) in X509_VERIFY_PARAM_add0_policy()
432 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_policies() argument
437 if (!param) in X509_VERIFY_PARAM_set1_policies()
439 if (param->policies) in X509_VERIFY_PARAM_set1_policies()
440 sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free); in X509_VERIFY_PARAM_set1_policies()
444 param->policies = NULL; in X509_VERIFY_PARAM_set1_policies()
448 param->policies = sk_ASN1_OBJECT_new_null(); in X509_VERIFY_PARAM_set1_policies()
449 if (!param->policies) in X509_VERIFY_PARAM_set1_policies()
458 if (!sk_ASN1_OBJECT_push(param->policies, doid)) in X509_VERIFY_PARAM_set1_policies()
464 param->flags |= X509_V_FLAG_POLICY_CHECK; in X509_VERIFY_PARAM_set1_policies()
468 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_host() argument
471 return int_x509_param_set_hosts(param->id, SET_HOST, name, namelen); in X509_VERIFY_PARAM_set1_host()
474 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_add1_host() argument
477 return int_x509_param_set_hosts(param->id, ADD_HOST, name, namelen); in X509_VERIFY_PARAM_add1_host()
480 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set_hostflags() argument
483 param->id->hostflags = flags; in X509_VERIFY_PARAM_set_hostflags()
486 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get0_peername() argument
488 return param->id->peername; in X509_VERIFY_PARAM_get0_peername()
491 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_email() argument
494 return int_x509_param_set1(&param->id->email, &param->id->emaillen, in X509_VERIFY_PARAM_set1_email()
498 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_ip() argument
503 return int_x509_param_set1((char **)&param->id->ip, &param->id->iplen, in X509_VERIFY_PARAM_set1_ip()
507 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, const char *ipasc) in X509_VERIFY_PARAM_set1_ip_asc() argument
515 return X509_VERIFY_PARAM_set1_ip(param, ipout, iplen); in X509_VERIFY_PARAM_set1_ip_asc()
518 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get_depth() argument
520 return param->depth; in X509_VERIFY_PARAM_get_depth()
523 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get0_name() argument
525 return param->name; in X509_VERIFY_PARAM_get0_name()
603 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_add0_table() argument
616 if (sk_X509_VERIFY_PARAM_find(param_table, &idx, param)) in X509_VERIFY_PARAM_add0_table()
623 if (!sk_X509_VERIFY_PARAM_push(param_table, param)) in X509_VERIFY_PARAM_add0_table()