Qsmtp  0.30dev
Functions | Variables
starttlsr.c File Reference

functions for SSL encoding and decoding of network I/O More...

#include <qremote/starttlsr.h>
#include <control.h>
#include <log.h>
#include <netio.h>
#include <qremote/qremote.h>
#include <ssl_timeoutio.h>
#include <sstring.h>
#include <tls.h>
#include <assert.h>
#include <fcntl.h>
#include <openssl/x509v3.h>
#include <string.h>
#include <strings.h>
#include <syslog.h>
#include <sys/stat.h>
#include <unistd.h>

Functions

static int match_partner (const struct string *peer)
 
static void log_failed_peer (const struct string *peer)
 
int tls_init (void)
 send STARTTLS and handle the connection setup More...
 

Variables

const char * clientcertname = "control/clientcert.pem"
 

Detailed Description

functions for SSL encoding and decoding of network I/O

Function Documentation

int tls_init ( void  )

send STARTTLS and handle the connection setup

Returns
if connection was successfully established
Return values
0SSL mode successfully set up
>0SSL setup failed (non-local fault, e.g. network or reply error)
<0SSL setup failed (local fault, e.g. unable to load file)
EDONEa network error happened but the connection may still be intact

If the return value is <0 a status code for qmail-rspawn was already written.

Variable Documentation

const char* clientcertname = "control/clientcert.pem"

filename of the TLS client certificate