~ubuntu-branches/ubuntu/trusty/syslog-ng/trusty-proposed

« back to all changes in this revision

Viewing changes to modules/afsocket/afsocket-grammar.y

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2013-05-26 09:06:21 UTC
  • mfrom: (1.3.11)
  • Revision ID: package-import@ubuntu.com-20130526090621-8z2s0oi21eoljb9x
Tags: 3.3.9-1
* New upstream release.
* Include missed ivykis header (closes: #708793).

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include "syslog-names.h"
39
39
#include "plugin.h"
40
40
 
41
 
#if ENABLE_SSL /* BEGIN MARK: tls */
 
41
#if BUILD_WITH_SSL
42
42
#include "tlscontext.h"
43
 
#endif         /* END MARK */
 
43
#endif
44
44
 
45
45
 
46
46
static SocketOptions *last_sock_options;
47
47
static gint last_addr_family = AF_INET;
48
48
 
49
 
#if ENABLE_SSL
 
49
#if BUILD_WITH_SSL
50
50
TLSContext *last_tls_context;
51
51
#endif
52
52
 
486
486
 
487
487
source_afinet_tcp_option
488
488
        : source_afinet_option
489
 
/* BEGIN MARK: tls */
490
489
        | KW_TLS
491
490
          {
492
 
#if ENABLE_SSL
 
491
#if BUILD_WITH_SSL
493
492
            last_tls_context = tls_context_new(TM_SERVER);
494
493
#endif
495
494
          }
496
495
          '(' tls_options ')'
497
496
          {
498
 
#if ENABLE_SSL
 
497
#if BUILD_WITH_SSL
499
498
            afsocket_sd_set_tls_context(last_driver, last_tls_context);
500
499
#endif
501
500
          }
502
 
/* END MARK */
503
501
        | source_afsocket_stream_params         {}
504
502
        ;
505
503
 
537
535
        | KW_TRANSPORT '(' KW_TLS ')'           { afsocket_sd_set_transport(last_driver, "tls"); }
538
536
        | KW_TLS
539
537
          {
540
 
#if ENABLE_SSL
 
538
#if BUILD_WITH_SSL
541
539
            last_tls_context = tls_context_new(TM_SERVER);
542
540
#endif
543
541
          }
544
542
          '(' tls_options ')'
545
543
          {
546
 
#if ENABLE_SSL
 
544
#if BUILD_WITH_SSL
547
545
            afsocket_sd_set_tls_context(last_driver, last_tls_context);
548
546
#endif
549
547
          }
650
648
        : dest_afinet_option
651
649
        | KW_TLS
652
650
          {
653
 
#if ENABLE_SSL
 
651
#if BUILD_WITH_SSL
654
652
            last_tls_context = tls_context_new(TM_CLIENT);
655
653
#endif
656
654
          }
657
655
          '(' tls_options ')'
658
656
          {
659
 
#if ENABLE_SSL
 
657
#if BUILD_WITH_SSL
660
658
            afsocket_dd_set_tls_context(last_driver, last_tls_context);
661
659
#endif
662
660
          }
668
666
 
669
667
 
670
668
dest_afsyslog
671
 
        : KW_SYSLOG '(' dest_afsyslog_params ')'   { $$ = $3; }
 
669
        : KW_SYSLOG { last_addr_family = AF_INET; } '(' dest_afsyslog_params ')'   { $$ = $4; }
672
670
 
673
671
dest_afsyslog_params
674
672
        : string
696
694
        | KW_SPOOF_SOURCE '(' yesno ')'         { afinet_dd_set_spoof_source(last_driver, $3); }
697
695
        | KW_TLS
698
696
          {
699
 
#if ENABLE_SSL
 
697
#if BUILD_WITH_SSL
700
698
            last_tls_context = tls_context_new(TM_CLIENT);
701
699
#endif
702
700
          }
703
701
          '(' tls_options ')'
704
702
          {
705
 
#if ENABLE_SSL
 
703
#if BUILD_WITH_SSL
706
704
            afsocket_dd_set_tls_context(last_driver, last_tls_context);
707
705
#endif
708
706
          }
715
713
 
716
714
tls_option
717
715
        : KW_IFDEF {
718
 
#if ENABLE_SSL
 
716
#if BUILD_WITH_SSL
719
717
}
720
718
 
721
719
        | KW_PEER_VERIFY '(' string ')'