Skip to content
Snippets Groups Projects
Select Git revision
  • eb10ca8a4b170ce5aa8b2cd29b954db8c45db88d
  • zig default
  • master
  • zig-threaded
  • openat
  • chdir
  • clear
  • compll
  • v1.18.1
  • v2.2.2
  • v1.18
  • v2.2.1
  • v2.2
  • v1.17
  • v2.1.2
  • v2.1.1
  • v2.1
  • v2.0.1
  • v2.0
  • v2.0-beta3
  • v2.0-beta2
  • v2.0-beta1
  • v1.16
  • v1.15.1
  • v1.15
  • v1.14.2
  • v1.14.1
  • v1.14
28 results

help.c

Blame
  • WardenConf.pm 977 B
    #!/usr/bin/perl -w
    #
    # WardenConf.pm
    #
    # Copyright (C) 2011-2012 Cesnet z.s.p.o
    #
    # Use of this source is governed by a BSD-style license, see LICENSE file.
    
    package WardenConf;
    
    use strict;
    
    our $VERSION = "2.0";
    
    #-------------------------------------------------------------------------------
    # loadConf - load variables from configuration file
    #-------------------------------------------------------------------------------
    sub loadConf
    {
      my $conf_file = shift;
    
      # preset of default variables
      our $URI 		= undef;
      our $SSL_KEY_FILE 	= undef;
      our $SSL_CERT_FILE 	= undef;
      our $SSL_CA_FILE 	= undef;
    
      # load set variables by user
      unless (do $conf_file) {
        die("Errors in config file '$conf_file': $@") if $@;
        die("Can't read config file '$conf_file': $!") unless defined $_;
        # if $_ defined, it's retvalue of last statement of conf, for which we don't care
      }
    
      return ($URI, $SSL_KEY_FILE, $SSL_CERT_FILE, $SSL_CA_FILE);
    
    } # End of loadConf
    1;