Deleted
Added
nxt_conf_validation.c (1883:b075f32408a1) | nxt_conf_validation.c (1885:09b857a2cca9) |
---|---|
1 2/* 3 * Copyright (C) Valentin V. Bartenev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8#include <nxt_conf.h> --- 75 unchanged lines hidden (view full) --- 84 nxt_str_t *name, nxt_conf_value_t *value); 85static nxt_int_t nxt_conf_vldt_mtypes_extension(nxt_conf_validation_t *vldt, 86 nxt_conf_value_t *value); 87static nxt_int_t nxt_conf_vldt_listener(nxt_conf_validation_t *vldt, 88 nxt_str_t *name, nxt_conf_value_t *value); 89#if (NXT_TLS) 90static nxt_int_t nxt_conf_vldt_certificate(nxt_conf_validation_t *vldt, 91 nxt_conf_value_t *value, void *data); | 1 2/* 3 * Copyright (C) Valentin V. Bartenev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8#include <nxt_conf.h> --- 75 unchanged lines hidden (view full) --- 84 nxt_str_t *name, nxt_conf_value_t *value); 85static nxt_int_t nxt_conf_vldt_mtypes_extension(nxt_conf_validation_t *vldt, 86 nxt_conf_value_t *value); 87static nxt_int_t nxt_conf_vldt_listener(nxt_conf_validation_t *vldt, 88 nxt_str_t *name, nxt_conf_value_t *value); 89#if (NXT_TLS) 90static nxt_int_t nxt_conf_vldt_certificate(nxt_conf_validation_t *vldt, 91 nxt_conf_value_t *value, void *data); |
92#if (NXT_HAVE_OPENSSL_CONF_CMD) 93static nxt_int_t nxt_conf_vldt_object_conf_commands(nxt_conf_validation_t *vldt, 94 nxt_conf_value_t *value, void *data); 95#endif |
|
92static nxt_int_t nxt_conf_vldt_certificate_element(nxt_conf_validation_t *vldt, 93 nxt_conf_value_t *value); 94#endif 95static nxt_int_t nxt_conf_vldt_action(nxt_conf_validation_t *vldt, 96 nxt_conf_value_t *value, void *data); 97static nxt_int_t nxt_conf_vldt_pass(nxt_conf_validation_t *vldt, 98 nxt_conf_value_t *value, void *data); 99static nxt_int_t nxt_conf_vldt_return(nxt_conf_validation_t *vldt, --- 258 unchanged lines hidden (view full) --- 358 359 360#if (NXT_TLS) 361 362static nxt_conf_vldt_object_t nxt_conf_vldt_tls_members[] = { 363 { 364 .name = nxt_string("certificate"), 365 .type = NXT_CONF_VLDT_STRING | NXT_CONF_VLDT_ARRAY, | 96static nxt_int_t nxt_conf_vldt_certificate_element(nxt_conf_validation_t *vldt, 97 nxt_conf_value_t *value); 98#endif 99static nxt_int_t nxt_conf_vldt_action(nxt_conf_validation_t *vldt, 100 nxt_conf_value_t *value, void *data); 101static nxt_int_t nxt_conf_vldt_pass(nxt_conf_validation_t *vldt, 102 nxt_conf_value_t *value, void *data); 103static nxt_int_t nxt_conf_vldt_return(nxt_conf_validation_t *vldt, --- 258 unchanged lines hidden (view full) --- 362 363 364#if (NXT_TLS) 365 366static nxt_conf_vldt_object_t nxt_conf_vldt_tls_members[] = { 367 { 368 .name = nxt_string("certificate"), 369 .type = NXT_CONF_VLDT_STRING | NXT_CONF_VLDT_ARRAY, |
370 .flags = NXT_CONF_VLDT_REQUIRED, |
|
366 .validator = nxt_conf_vldt_certificate, | 371 .validator = nxt_conf_vldt_certificate, |
372 }, { 373 .name = nxt_string("conf_commands"), 374 .type = NXT_CONF_VLDT_OBJECT, 375#if (NXT_HAVE_OPENSSL_CONF_CMD) 376 .validator = nxt_conf_vldt_object_conf_commands, 377#else 378 .validator = nxt_conf_vldt_unsupported, 379 .u.string = "conf_commands", 380#endif |
|
367 }, 368 369 NXT_CONF_VLDT_END 370}; 371 372#endif 373 374 --- 1591 unchanged lines hidden (view full) --- 1966 if (cert == NULL) { 1967 return nxt_conf_vldt_error(vldt, "Certificate \"%V\" is not found.", 1968 &name); 1969 } 1970 1971 return NXT_OK; 1972} 1973 | 381 }, 382 383 NXT_CONF_VLDT_END 384}; 385 386#endif 387 388 --- 1591 unchanged lines hidden (view full) --- 1980 if (cert == NULL) { 1981 return nxt_conf_vldt_error(vldt, "Certificate \"%V\" is not found.", 1982 &name); 1983 } 1984 1985 return NXT_OK; 1986} 1987 |
1988 1989#if (NXT_HAVE_OPENSSL_CONF_CMD) 1990 1991static nxt_int_t 1992nxt_conf_vldt_object_conf_commands(nxt_conf_validation_t *vldt, 1993 nxt_conf_value_t *value, void *data) 1994{ 1995 uint32_t index; 1996 nxt_int_t ret; 1997 nxt_str_t name; 1998 nxt_conf_value_t *member; 1999 2000 index = 0; 2001 2002 for ( ;; ) { 2003 member = nxt_conf_next_object_member(value, &name, &index); 2004 2005 if (member == NULL) { 2006 break; 2007 } 2008 2009 ret = nxt_conf_vldt_type(vldt, &name, member, NXT_CONF_VLDT_STRING); 2010 if (ret != NXT_OK) { 2011 return ret; 2012 } 2013 } 2014 2015 return NXT_OK; 2016} 2017 |
|
1974#endif 1975 | 2018#endif 2019 |
2020#endif |
|
1976 | 2021 |
2022 |
|
1977static nxt_int_t 1978nxt_conf_vldt_app_name(nxt_conf_validation_t *vldt, nxt_conf_value_t *value, 1979 void *data) 1980{ 1981 nxt_str_t name; 1982 nxt_conf_value_t *apps, *app; 1983 1984 static nxt_str_t apps_str = nxt_string("applications"); --- 724 unchanged lines hidden --- | 2023static nxt_int_t 2024nxt_conf_vldt_app_name(nxt_conf_validation_t *vldt, nxt_conf_value_t *value, 2025 void *data) 2026{ 2027 nxt_str_t name; 2028 nxt_conf_value_t *apps, *app; 2029 2030 static nxt_str_t apps_str = nxt_string("applications"); --- 724 unchanged lines hidden --- |