Lines Matching refs:param

131 static void x509_verify_param_zero(X509_VERIFY_PARAM *param)  in x509_verify_param_zero()  argument
134 if (!param) in x509_verify_param_zero()
136 param->name = NULL; in x509_verify_param_zero()
137 param->purpose = 0; in x509_verify_param_zero()
138 param->trust = 0; in x509_verify_param_zero()
142 param->inh_flags = 0; in x509_verify_param_zero()
143 param->flags = 0; in x509_verify_param_zero()
144 param->depth = -1; in x509_verify_param_zero()
145 if (param->policies) { in x509_verify_param_zero()
146 sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free); in x509_verify_param_zero()
147 param->policies = NULL; in x509_verify_param_zero()
149 paramid = param->id; in x509_verify_param_zero()
173 X509_VERIFY_PARAM *param; in X509_VERIFY_PARAM_new() local
175 param = OPENSSL_malloc(sizeof(X509_VERIFY_PARAM)); in X509_VERIFY_PARAM_new()
176 if (!param) in X509_VERIFY_PARAM_new()
180 OPENSSL_free(param); in X509_VERIFY_PARAM_new()
183 OPENSSL_memset(param, 0, sizeof(X509_VERIFY_PARAM)); in X509_VERIFY_PARAM_new()
185 param->id = paramid; in X509_VERIFY_PARAM_new()
186 x509_verify_param_zero(param); in X509_VERIFY_PARAM_new()
187 return param; in X509_VERIFY_PARAM_new()
190 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_free() argument
192 if (param == NULL) in X509_VERIFY_PARAM_free()
194 x509_verify_param_zero(param); in X509_VERIFY_PARAM_free()
195 OPENSSL_free(param->id); in X509_VERIFY_PARAM_free()
196 OPENSSL_free(param); in X509_VERIFY_PARAM_free()
361 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name) in X509_VERIFY_PARAM_set1_name() argument
363 if (param->name) in X509_VERIFY_PARAM_set1_name()
364 OPENSSL_free(param->name); in X509_VERIFY_PARAM_set1_name()
365 param->name = BUF_strdup(name); in X509_VERIFY_PARAM_set1_name()
366 if (param->name) in X509_VERIFY_PARAM_set1_name()
371 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags) in X509_VERIFY_PARAM_set_flags() argument
373 param->flags |= flags; in X509_VERIFY_PARAM_set_flags()
375 param->flags |= X509_V_FLAG_POLICY_CHECK; in X509_VERIFY_PARAM_set_flags()
379 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_clear_flags() argument
382 param->flags &= ~flags; in X509_VERIFY_PARAM_clear_flags()
386 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get_flags() argument
388 return param->flags; in X509_VERIFY_PARAM_get_flags()
391 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose) in X509_VERIFY_PARAM_set_purpose() argument
393 return X509_PURPOSE_set(&param->purpose, purpose); in X509_VERIFY_PARAM_set_purpose()
396 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust) in X509_VERIFY_PARAM_set_trust() argument
398 return X509_TRUST_set(&param->trust, trust); in X509_VERIFY_PARAM_set_trust()
401 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth) in X509_VERIFY_PARAM_set_depth() argument
403 param->depth = depth; in X509_VERIFY_PARAM_set_depth()
406 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t) in X509_VERIFY_PARAM_set_time() argument
408 param->check_time = t; in X509_VERIFY_PARAM_set_time()
409 param->flags |= X509_V_FLAG_USE_CHECK_TIME; in X509_VERIFY_PARAM_set_time()
412 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_add0_policy() argument
415 if (!param->policies) { in X509_VERIFY_PARAM_add0_policy()
416 param->policies = sk_ASN1_OBJECT_new_null(); in X509_VERIFY_PARAM_add0_policy()
417 if (!param->policies) in X509_VERIFY_PARAM_add0_policy()
420 if (!sk_ASN1_OBJECT_push(param->policies, policy)) in X509_VERIFY_PARAM_add0_policy()
425 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_policies() argument
430 if (!param) in X509_VERIFY_PARAM_set1_policies()
432 if (param->policies) in X509_VERIFY_PARAM_set1_policies()
433 sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free); in X509_VERIFY_PARAM_set1_policies()
436 param->policies = NULL; in X509_VERIFY_PARAM_set1_policies()
440 param->policies = sk_ASN1_OBJECT_new_null(); in X509_VERIFY_PARAM_set1_policies()
441 if (!param->policies) in X509_VERIFY_PARAM_set1_policies()
449 if (!sk_ASN1_OBJECT_push(param->policies, doid)) { in X509_VERIFY_PARAM_set1_policies()
454 param->flags |= X509_V_FLAG_POLICY_CHECK; in X509_VERIFY_PARAM_set1_policies()
458 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_host() argument
461 if (!int_x509_param_set_hosts(param->id, SET_HOST, name, namelen)) { in X509_VERIFY_PARAM_set1_host()
462 param->id->poison = 1; in X509_VERIFY_PARAM_set1_host()
468 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_add1_host() argument
471 if (!int_x509_param_set_hosts(param->id, ADD_HOST, name, namelen)) { in X509_VERIFY_PARAM_add1_host()
472 param->id->poison = 1; in X509_VERIFY_PARAM_add1_host()
478 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set_hostflags() argument
481 param->id->hostflags = flags; in X509_VERIFY_PARAM_set_hostflags()
484 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get0_peername() argument
486 return param->id->peername; in X509_VERIFY_PARAM_get0_peername()
489 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_email() argument
493 !int_x509_param_set1(&param->id->email, &param->id->emaillen, in X509_VERIFY_PARAM_set1_email()
495 param->id->poison = 1; in X509_VERIFY_PARAM_set1_email()
502 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param, in X509_VERIFY_PARAM_set1_ip() argument
506 !int_x509_param_set1((char **)&param->id->ip, &param->id->iplen, in X509_VERIFY_PARAM_set1_ip()
508 param->id->poison = 1; in X509_VERIFY_PARAM_set1_ip()
515 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, const char *ipasc) in X509_VERIFY_PARAM_set1_ip_asc() argument
523 return X509_VERIFY_PARAM_set1_ip(param, ipout, iplen); in X509_VERIFY_PARAM_set1_ip_asc()
526 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get_depth() argument
528 return param->depth; in X509_VERIFY_PARAM_get_depth()
531 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_get0_name() argument
533 return param->name; in X509_VERIFY_PARAM_get0_name()
607 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param) in X509_VERIFY_PARAM_add0_table() argument
618 if (sk_X509_VERIFY_PARAM_find(param_table, &idx, param)) { in X509_VERIFY_PARAM_add0_table()
624 if (!sk_X509_VERIFY_PARAM_push(param_table, param)) in X509_VERIFY_PARAM_add0_table()