ucspi-ssl 0.13.03
ucspi-ssl
Loading...
Searching...
No Matches
Functions | Variables
sslhandle.c File Reference

IPv6 enabled TLS framework for a preforking server. More...

#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <netdb.h>
#include <signal.h>
#include <arpa/inet.h>
#include "ucspissl.h"
#include "uint_t.h"
#include "str.h"
#include "byte.h"
#include "fmt.h"
#include "scan.h"
#include "ip.h"
#include "fd.h"
#include "exit.h"
#include "env.h"
#include "prot.h"
#include "open.h"
#include "wait.h"
#include "stralloc.h"
#include "alloc.h"
#include "buffer.h"
#include "getln.h"
#include "logmsg.h"
#include "getoptb.h"
#include "socket_if.h"
#include "ndelay.h"
#include "remoteinfo.h"
#include "rules.h"
#include "sig.h"
#include "iopause.h"
#include "dnsresolv.h"
#include "auto_cafile.h"
#include "auto_cadir.h"
#include "auto_ccafile.h"
#include "auto_dhfile.h"
#include "auto_certchainfile.h"
#include "auto_certfile.h"
#include "auto_keyfile.h"
#include "auto_ciphers.h"
#include "coe.h"
#include "lock.h"
Include dependency graph for sslhandle.c:

Go to the source code of this file.

Functions

void server (int argcs, char *const *argvs)
 
void drop_nomem (void)
 
void drop_notemp (void)
 
void cats (const char *s)
 
void append (const char *ch)
 
void safecats (const char *s)
 
void env (const char *s, const char *t)
 
void env_reset (void)
 
int error_warn (const char *x)
 
void drop_rules (const char *fnbase)
 
void found (char *data, unsigned int datalen)
 
int doit (int t)
 
void done (void)
 
void usage (void)
 
void printstatus (void)
 
void trigger (void)
 
void sigterm (int dummy)
 
void sigchld (int dummy)
 
void read_passwd (void)
 
int passwd_cb (char *buff, int size, int rwflag, void *userdata)
 
void spawn (int s, int argc, char *const *argv)
 
int main (int argc, char *const *argv)
 

Variables

char * who
 
int verbosity = 1
 
int flagkillopts = 1
 
int flagafter = 0
 
int flagdelay = 0
 
const char * banner = ""
 
int flagremoteinfo = 1
 
int flagremotehost = 1
 
int flagparanoid = 0
 
int flagclientcert = 0
 
int flagsslenv = 0
 
int flagtcpenv = 0
 
unsigned long timeout = 26
 
unsigned long ssltimeout = 26
 
unsigned int progtimeout = 3600
 
uint32 netif = 0
 
int selfpipe [2]
 
int flagexit = 0
 
int flagdualstack = 0
 
uint16 localport
 
char localportstr [FMT_ULONG]
 
char localip [16] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }
 
char localipstr [IP6_FMT]
 
const char * localhost = 0
 
const char * lockfile = 0
 
int fdlock
 
uint16 remoteport
 
char remoteportstr [FMT_ULONG]
 
char remoteip [16]
 
char remoteipstr [IP6_FMT]
 
char * remotehost = 0
 
const char * hostname
 
const char * loopback = "127.0.0.1"
 
stralloc envplus = {0}
 
stralloc envtmp = {0}
 
char bspace [16]
 
buffer b
 
SSL_CTX * ctx
 
const char * certchainfile = auto_certchainfile
 
const char * certfile = auto_certfile
 
const char * keyfile = auto_keyfile
 
stralloc password = {0}
 
int match = 0
 
const char * cafile = auto_cafile
 
const char * ccafile = auto_ccafile
 
const char * cadir = auto_cadir
 
const char * ciphers = auto_ciphers
 
int verifydepth = 1
 
const char * dhfile = auto_dhfile
 
int rsalen = SSL_RSA_LEN
 
char * keypass = 0
 
int pi [2]
 
int po [2]
 
X509 * cert
 
char buf [SSL_NAME_LEN]
 
char ** e
 
char ** e1
 
int flagdeny = 0
 
int flagallow = 0
 
int flagallownorules = 0
 
const char * fnrules = 0
 
const char * fniprules = 0
 
unsigned long limit = 40
 
unsigned long numchildren = 0
 
int flag1 = 0
 
int flag3 = 0
 
unsigned long backlog = 20
 
unsigned long uid = 0
 
unsigned long gid = 0
 

Detailed Description

IPv6 enabled TLS framework for a preforking server.

Author
web, feh

Definition in file sslhandle.c.

Function Documentation

◆ append()

void append ( const char *  ch)

Definition at line 153 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cats()

void cats ( const char *  s)

Definition at line 149 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doit()

int doit ( int  t)

Definition at line 275 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ done()

void done ( void  )

Definition at line 497 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drop_nomem()

void drop_nomem ( void  )

Definition at line 141 of file sslhandle.c.

Here is the caller graph for this function:

◆ drop_notemp()

void drop_notemp ( void  )

Definition at line 145 of file sslhandle.c.

◆ drop_rules()

void drop_rules ( const char *  fnbase)

Definition at line 244 of file sslhandle.c.

Here is the caller graph for this function:

◆ env()

void env ( const char *  s,
const char *  t 
)

Definition at line 172 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ env_reset()

void env_reset ( void  )

Definition at line 226 of file sslhandle.c.

Here is the caller graph for this function:

◆ error_warn()

int error_warn ( const char *  x)

Definition at line 238 of file sslhandle.c.

Here is the caller graph for this function:

◆ found()

void found ( char *  data,
unsigned int  datalen 
)

Definition at line 249 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

Definition at line 645 of file sslhandle.c.

Here is the call graph for this function:

◆ passwd_cb()

int passwd_cb ( char *  buff,
int  size,
int  rwflag,
void *  userdata 
)

Definition at line 591 of file sslhandle.c.

Here is the caller graph for this function:

◆ printstatus()

void printstatus ( void  )

Definition at line 539 of file sslhandle.c.

Here is the caller graph for this function:

◆ read_passwd()

void read_passwd ( void  )

Definition at line 580 of file sslhandle.c.

Here is the caller graph for this function:

◆ safecats()

void safecats ( const char *  s)

Definition at line 157 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ server()

void server ( int  argcs,
char *const *  argvs 
)
Here is the caller graph for this function:

◆ sigchld()

void sigchld ( int  dummy)

Definition at line 563 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sigterm()

void sigterm ( int  dummy)

Definition at line 552 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawn()

void spawn ( int  s,
int  argc,
char *const *  argv 
)

Definition at line 600 of file sslhandle.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trigger()

void trigger ( void  )

Definition at line 547 of file sslhandle.c.

Here is the caller graph for this function:

◆ usage()

void usage ( void  )

Definition at line 511 of file sslhandle.c.

Here is the caller graph for this function:

Variable Documentation

◆ b

buffer b

Definition at line 106 of file sslhandle.c.

◆ backlog

unsigned long backlog = 20

Definition at line 535 of file sslhandle.c.

◆ banner

const char* banner = ""

Definition at line 59 of file sslhandle.c.

◆ bspace

char bspace[16]

Definition at line 105 of file sslhandle.c.

◆ buf

char buf[SSL_NAME_LEN]

Definition at line 127 of file sslhandle.c.

◆ cadir

const char* cadir = auto_cadir

Definition at line 116 of file sslhandle.c.

◆ cafile

const char* cafile = auto_cafile

Definition at line 114 of file sslhandle.c.

◆ ccafile

const char* ccafile = auto_ccafile

Definition at line 115 of file sslhandle.c.

◆ cert

X509* cert

Definition at line 126 of file sslhandle.c.

◆ certchainfile

const char* certchainfile = auto_certchainfile

Definition at line 109 of file sslhandle.c.

◆ certfile

const char* certfile = auto_certfile

Definition at line 110 of file sslhandle.c.

◆ ciphers

const char* ciphers = auto_ciphers

Definition at line 117 of file sslhandle.c.

◆ ctx

SSL_CTX* ctx

Definition at line 108 of file sslhandle.c.

◆ dhfile

const char* dhfile = auto_dhfile

Definition at line 119 of file sslhandle.c.

◆ e

char** e

Definition at line 129 of file sslhandle.c.

◆ e1

char** e1

Definition at line 130 of file sslhandle.c.

◆ envplus

stralloc envplus = {0}

Definition at line 102 of file sslhandle.c.

◆ envtmp

stralloc envtmp = {0}

Definition at line 103 of file sslhandle.c.

◆ fdlock

int fdlock

Definition at line 83 of file sslhandle.c.

◆ flag1

int flag1 = 0

Definition at line 533 of file sslhandle.c.

◆ flag3

int flag3 = 0

Definition at line 534 of file sslhandle.c.

◆ flagafter

int flagafter = 0

Definition at line 57 of file sslhandle.c.

◆ flagallow

int flagallow = 0

Definition at line 136 of file sslhandle.c.

◆ flagallownorules

int flagallownorules = 0

Definition at line 137 of file sslhandle.c.

◆ flagclientcert

int flagclientcert = 0

Definition at line 63 of file sslhandle.c.

◆ flagdelay

int flagdelay = 0

Definition at line 58 of file sslhandle.c.

◆ flagdeny

int flagdeny = 0

Definition at line 135 of file sslhandle.c.

◆ flagdualstack

int flagdualstack = 0

Definition at line 72 of file sslhandle.c.

◆ flagexit

int flagexit = 0

Definition at line 71 of file sslhandle.c.

◆ flagkillopts

int flagkillopts = 1

Definition at line 56 of file sslhandle.c.

◆ flagparanoid

int flagparanoid = 0

Definition at line 62 of file sslhandle.c.

◆ flagremotehost

int flagremotehost = 1

Definition at line 61 of file sslhandle.c.

◆ flagremoteinfo

int flagremoteinfo = 1

Definition at line 60 of file sslhandle.c.

◆ flagsslenv

int flagsslenv = 0

Definition at line 64 of file sslhandle.c.

◆ flagtcpenv

int flagtcpenv = 0

Definition at line 65 of file sslhandle.c.

◆ fniprules

const char* fniprules = 0

Definition at line 139 of file sslhandle.c.

◆ fnrules

const char* fnrules = 0

Definition at line 138 of file sslhandle.c.

◆ gid

unsigned long gid = 0

Definition at line 537 of file sslhandle.c.

◆ hostname

const char* hostname

Definition at line 92 of file sslhandle.c.

◆ keyfile

const char* keyfile = auto_keyfile

Definition at line 111 of file sslhandle.c.

◆ keypass

char* keypass = 0

Definition at line 121 of file sslhandle.c.

◆ limit

unsigned long limit = 40

Definition at line 530 of file sslhandle.c.

◆ localhost

const char* localhost = 0

Definition at line 81 of file sslhandle.c.

◆ localip

char localip[16] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }

Definition at line 78 of file sslhandle.c.

◆ localipstr

char localipstr[IP6_FMT]

Definition at line 79 of file sslhandle.c.

◆ localport

uint16 localport

Definition at line 76 of file sslhandle.c.

◆ localportstr

char localportstr[FMT_ULONG]

Definition at line 77 of file sslhandle.c.

◆ lockfile

const char* lockfile = 0

Definition at line 82 of file sslhandle.c.

◆ loopback

const char* loopback = "127.0.0.1"

Definition at line 93 of file sslhandle.c.

◆ match

int match = 0

Definition at line 113 of file sslhandle.c.

◆ netif

uint32 netif = 0

Definition at line 69 of file sslhandle.c.

◆ numchildren

unsigned long numchildren = 0

Definition at line 531 of file sslhandle.c.

◆ password

stralloc password = {0}

Definition at line 112 of file sslhandle.c.

◆ pi

int pi[2]

Definition at line 123 of file sslhandle.c.

◆ po

int po[2]

Definition at line 124 of file sslhandle.c.

◆ progtimeout

unsigned int progtimeout = 3600

Definition at line 68 of file sslhandle.c.

◆ remotehost

char* remotehost = 0

Definition at line 90 of file sslhandle.c.

◆ remoteip

char remoteip[16]

Definition at line 87 of file sslhandle.c.

◆ remoteipstr

char remoteipstr[IP6_FMT]

Definition at line 88 of file sslhandle.c.

◆ remoteport

uint16 remoteport

Definition at line 85 of file sslhandle.c.

◆ remoteportstr

char remoteportstr[FMT_ULONG]

Definition at line 86 of file sslhandle.c.

◆ rsalen

int rsalen = SSL_RSA_LEN

Definition at line 120 of file sslhandle.c.

◆ selfpipe

int selfpipe[2]

Definition at line 70 of file sslhandle.c.

◆ ssltimeout

unsigned long ssltimeout = 26

Definition at line 67 of file sslhandle.c.

◆ timeout

unsigned long timeout = 26

Definition at line 66 of file sslhandle.c.

◆ uid

unsigned long uid = 0

Definition at line 536 of file sslhandle.c.

◆ verbosity

int verbosity = 1

Definition at line 55 of file sslhandle.c.

◆ verifydepth

int verifydepth = 1

Definition at line 118 of file sslhandle.c.

◆ who

char* who

Definition at line 53 of file sslhandle.c.