X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/9e4dddbde4228e83fc7c882a4ef410ddbe0a6e79..1ad6489edabbfce85ee7362370cee4b34739c234:/src/src/functions.h diff --git a/src/src/functions.h b/src/src/functions.h index 566a32bd6..2e18fd963 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -39,12 +39,16 @@ extern uschar * tls_cert_subject(void *, uschar * mod); extern uschar * tls_cert_subject_altname(void *, uschar * mod); extern uschar * tls_cert_version(void *, uschar * mod); +extern uschar * tls_cert_fprt_md5(void *); +extern uschar * tls_cert_fprt_sha1(void *); +extern uschar * tls_cert_fprt_sha256(void *); + extern int tls_client_start(int, host_item *, address_item *, - uschar *, uschar *, uschar *, uschar *, uschar *, uschar *, -# ifdef EXPERIMENTAL_OCSP - uschar *, -# endif - int, int, uschar *, uschar *); + transport_instance * +#ifdef EXPERIMENTAL_DANE + , dns_answer * +#endif + ); extern void tls_close(BOOL, BOOL); extern int tls_export_cert(uschar *, size_t, void *); extern int tls_feof(void); @@ -59,9 +63,16 @@ extern int tls_ungetc(int); extern int tls_write(BOOL, const uschar *, size_t); extern uschar *tls_validate_require_cipher(void); extern void tls_version_report(FILE *); -#ifndef USE_GNUTLS +# ifndef USE_GNUTLS extern BOOL tls_openssl_options_parse(uschar *, long *); -#endif +# endif +extern uschar * tls_field_from_dn(uschar *, uschar *); +extern BOOL tls_is_name_for_cert(uschar *, void *); + +# ifdef EXPERIMENTAL_DANE +extern int tlsa_lookup(const host_item *, dns_answer *, BOOL, BOOL *); +# endif + #endif /*SUPPORT_TLS*/ @@ -115,6 +126,7 @@ extern void debug_vprintf(const char *, va_list); extern void decode_bits(unsigned int *, unsigned int *, int, int, uschar *, bit_table *, int, uschar *, int); extern address_item *deliver_make_addr(uschar *, BOOL); +extern void deliver_init(void); extern void delivery_log(int, address_item *, int, uschar *); extern int deliver_message(uschar *, BOOL, BOOL); extern void deliver_msglog(const char *, ...) PRINTF_FUNCTION(1,2); @@ -131,12 +143,13 @@ extern BOOL dkim_transport_write_message(address_item *, int, int, int, uschar *, uschar *, uschar *, uschar *, uschar *, uschar *); #endif extern dns_address *dns_address_from_rr(dns_answer *, dns_record *); +extern int dns_basic_lookup(dns_answer *, const uschar *, int); extern void dns_build_reverse(uschar *, uschar *); extern void dns_init(BOOL, BOOL, BOOL); -extern int dns_basic_lookup(dns_answer *, uschar *, int); -extern BOOL dns_is_secure(dns_answer *); -extern int dns_lookup(dns_answer *, uschar *, int, uschar **); -extern int dns_special_lookup(dns_answer *, uschar *, int, uschar **); +extern BOOL dns_is_secure(const dns_answer *); +extern int dns_lookup(dns_answer *, const uschar *, int, uschar **); +extern void dns_pattern_init(void); +extern int dns_special_lookup(dns_answer *, const uschar *, int, uschar **); extern dns_record *dns_next_rr(dns_answer *, dns_scan *, int); extern uschar *dns_text_type(int); extern void dscp_list_to_stream(FILE *); @@ -144,17 +157,25 @@ extern BOOL dscp_lookup(const uschar *, int, int *, int *, int *); extern void enq_end(uschar *); extern BOOL enq_start(uschar *); +#ifdef EXPERIMENTAL_EVENT +extern uschar *event_raise(uschar *, uschar *, uschar *); +#endif extern void exim_exit(int); extern void exim_nullstd(void); extern void exim_setugid(uid_t, gid_t, BOOL, uschar *); extern int exim_tvcmp(struct timeval *, struct timeval *); extern void exim_wait_tick(struct timeval *, int); +extern int exp_bool(address_item *addr, + uschar *mtype, uschar *mname, unsigned dgb_opt, uschar *oname, BOOL bvalue, + uschar *svalue, BOOL *rvalue); extern BOOL expand_check_condition(uschar *, uschar *, uschar *); extern uschar *expand_string(uschar *); extern uschar *expand_string_copy(uschar *); extern int_eximarith_t expand_string_integer(uschar *, BOOL); extern void modify_variable(uschar *, void *); +extern BOOL fd_ready(int, int); + extern int filter_interpret(uschar *, int, address_item **, uschar **); extern BOOL filter_personal(string_item *, BOOL); extern BOOL filter_runtest(int, uschar *, BOOL, BOOL); @@ -187,7 +208,7 @@ extern int host_scan_for_local_hosts(host_item *, host_item **, BOOL *); extern void invert_address(uschar *, uschar *); extern int ip_bind(int, int, uschar *, int); -extern int ip_connect(int, int, uschar *, int, int); +extern int ip_connect(int, int, const uschar *, int, int); extern int ip_connectedsocket(int, const uschar *, int, int, int, host_item *, uschar **); extern int ip_get_address_family(int); @@ -201,15 +222,16 @@ extern int log_create_as_exim(uschar *); extern void log_close_all(void); #ifdef WITH_CONTENT_SCAN -extern int malware(uschar **); +extern int malware(const uschar *, int); extern int malware_in_file(uschar *); +extern void malware_init(void); #endif extern int match_address_list(uschar *, BOOL, BOOL, uschar **, unsigned int *, int, int, uschar **); extern int match_check_list(uschar **, int, tree_node **, unsigned int **, int(*)(void *, uschar *, uschar **, uschar **), void *, int, - uschar *, uschar **); -extern int match_isinlist(uschar *, uschar **, int, tree_node **, + const uschar *, uschar **); +extern int match_isinlist(const uschar *, uschar **, int, tree_node **, unsigned int *, int, BOOL, uschar **); extern int match_check_string(uschar *, uschar *, int, BOOL, BOOL, BOOL, uschar **); @@ -258,9 +280,6 @@ extern void queue_count(void); extern void queue_run(uschar *, uschar *, BOOL); extern int random_number(int); -#ifdef WITH_CONTENT_SCAN -extern int recv_line(int, uschar *, int); -#endif extern int rda_interpret(redirect_block *, int, uschar *, uschar *, uschar *, uschar *, uschar *, ugid_block *, address_item **, uschar **, error_block **, int *, uschar *); @@ -273,7 +292,7 @@ extern void readconf_main(void); extern void readconf_print(uschar *, uschar *, BOOL); extern uschar *readconf_printtime(int); extern uschar *readconf_readname(uschar *, int, uschar *); -extern int readconf_readtime(uschar *, int, BOOL); +extern int readconf_readtime(const uschar *, int, BOOL); extern void readconf_rest(); extern uschar *readconf_retry_error(uschar *, uschar *, int *, int *); extern void read_message_body(BOOL); @@ -286,8 +305,8 @@ extern void receive_swallow_smtp(void); #ifdef WITH_CONTENT_SCAN extern int regex(uschar **); #endif -extern BOOL regex_match_and_setup(const pcre *, uschar *, int, int); -extern const pcre *regex_must_compile(uschar *, BOOL, BOOL); +extern BOOL regex_match_and_setup(const pcre *, const uschar *, int, int); +extern const pcre *regex_must_compile(const uschar *, BOOL, BOOL); extern void retry_add_item(address_item *, uschar *, int); extern BOOL retry_check_address(uschar *, host_item *, uschar *, BOOL, uschar **, uschar **); @@ -333,7 +352,11 @@ extern int sieve_interpret(uschar *, int, uschar *, uschar *, uschar *, extern void sigalrm_handler(int); extern BOOL smtp_buffered(void); extern void smtp_closedown(uschar *); -extern int smtp_connect(host_item *, int, int, uschar *, int, BOOL, const uschar *); +extern int smtp_connect(host_item *, int, int, uschar *, int, BOOL, const uschar * +#ifdef EXPERIMENTAL_EVENT + , uschar * +#endif + ); extern int smtp_feof(void); extern int smtp_ferror(void); extern uschar *smtp_get_connection_info(void); @@ -355,7 +378,7 @@ extern BOOL smtp_verify_helo(void); extern int smtp_write_command(smtp_outblock *, BOOL, const char *, ...) PRINTF_FUNCTION(3,4); #ifdef WITH_CONTENT_SCAN extern int spam(uschar **); -extern FILE *spool_mbox(unsigned long *, uschar *); +extern FILE *spool_mbox(unsigned long *, const uschar *); #endif extern BOOL spool_move_message(uschar *, uschar *, uschar *, uschar *); extern BOOL spool_open_datafile(uschar *); @@ -372,7 +395,7 @@ extern uschar *string_base62(unsigned long int); extern uschar *string_cat(uschar *, int *, int *, const uschar *, int); extern uschar *string_copy_dnsdomain(uschar *); extern uschar *string_copy_malloc(uschar *); -extern uschar *string_copylc(uschar *); +extern uschar *string_copylc(const uschar *); extern uschar *string_copynlc(uschar *, int); extern uschar *string_dequote(uschar **); extern BOOL string_format(uschar *, int, const char *, ...) ALMOST_PRINTF(3,4); @@ -391,6 +414,7 @@ extern int strncmpic(const uschar *, const uschar *, int); extern uschar *strstric(uschar *, uschar *, BOOL); extern uschar *tod_stamp(int); + extern void tls_modify_variables(tls_support *); extern BOOL transport_check_waiting(uschar *, uschar *, int, uschar *, BOOL *); @@ -428,6 +452,7 @@ extern int verify_check_headers(uschar **); extern int verify_check_header_names_ascii(uschar **); extern int verify_check_host(uschar **); extern int verify_check_notblind(void); +extern int verify_check_given_host(uschar **, host_item *); extern int verify_check_this_host(uschar **, unsigned int *, uschar*, uschar *, uschar **); extern address_item *verify_checked_sender(uschar *);