s/qmail 4.2.29a
Next generation secure email transport
Loading...
Searching...
No Matches
Macros | Functions
tls_remote.c File Reference

connection functions: tls_conn, tls_exit; verification functions: tls_certkey, tls_checkpeer, tls_fingerprint, tlsa_check; tls_destination, tls_domaincert dummy functions: tls_crlcheck More...

#include <unistd.h>
#include "ucspissl.h"
#include "fmt.h"
#include "stralloc.h"
#include "str.h"
#include "byte.h"
#include "case.h"
#include "dns.h"
#include "constmap.h"
#include "tls_remote.h"
#include "tls_errors.h"
Include dependency graph for tls_remote.c:

Go to the source code of this file.

Macros

#define X509_cert_digest   X509_digest
 

Functions

int tls_certkey (SSL_CTX *ctx, const char *cert, const char *key, char *ppwd)
 
int tls_conn (SSL *ssl, int smtpfd)
 
int tls_checkpeer (SSL *ssl, X509 *cert, const stralloc host, const int flag, const int verify)
 
int tls_checkcrl (SSL *ssl)
 
int dig_ascii (char *digascii, const char *digest, const int len)
 
int X509_pkey_digest (const X509 *cert, const EVP_MD *type, unsigned char *md, unsigned int *dlen)
 
int tlsa_check (const STACK_OF(X509) *certs, const stralloc host, const unsigned long p)
 
int tls_fingerprint (X509 *cert, const char *fingerprint, int dlen)
 
int tls_exit (SSL *ssl)
 
int tls_destination (const stralloc hostname)
 tls_destination
 
int tls_domaincerts (const stralloc domainname)
 

Detailed Description

connection functions: tls_conn, tls_exit; verification functions: tls_certkey, tls_checkpeer, tls_fingerprint, tlsa_check; tls_destination, tls_domaincert dummy functions: tls_crlcheck

-- TLS client functions

tls_checkpeer: r = 0 -> ADH, r = 1 -> wildcard DN, r = 2 -> DN, r = 3 -> CA; r < 0 -> error tls_fingerprint: r = 0 -> failed, r = 1 -> ok; r < 0 -> error tlsa_check: r = 0 -> nothing, r = usage + 1, r < 0 -> error

Definition in file tls_remote.c.

Macro Definition Documentation

◆ X509_cert_digest

#define X509_cert_digest   X509_digest

Definition at line 27 of file tls_remote.c.

Function Documentation

◆ dig_ascii()

int dig_ascii ( char *  digascii,
const char *  digest,
const int  len 
)

Definition at line 127 of file tls_remote.c.

Here is the caller graph for this function:

◆ tls_certkey()

int tls_certkey ( SSL_CTX *  ctx,
const char *  cert,
const char *  key,
char *  ppwd 
)

Definition at line 29 of file tls_remote.c.

Here is the caller graph for this function:

◆ tls_checkcrl()

int tls_checkcrl ( SSL *  ssl)

Definition at line 121 of file tls_remote.c.

◆ tls_checkpeer()

int tls_checkpeer ( SSL *  ssl,
X509 *  cert,
const stralloc  host,
const int  flag,
const int  verify 
)

Definition at line 56 of file tls_remote.c.

Here is the caller graph for this function:

◆ tls_conn()

int tls_conn ( SSL *  ssl,
int  smtpfd 
)

Definition at line 49 of file tls_remote.c.

Here is the caller graph for this function:

◆ tls_destination()

int tls_destination ( const stralloc  hostname)

tls_destination

Parameters
strallochostname (maybe 0-terminated)
                       Certificate       Fallthru
Returns
values: | ADH | Cert *DN FQDN Hash | noTLSA noTLS -------—+--—+-----------------—+----------— optional TLS | 1 | 3 - - - | - 9 mandatory TLS | 2 | 4 5 6 7 | 8
   no TLS   -1 

Definition at line 280 of file tls_remote.c.

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

◆ tls_domaincerts()

int tls_domaincerts ( const stralloc  domainname)

Definition at line 370 of file tls_remote.c.

Here is the caller graph for this function:

◆ tls_exit()

int tls_exit ( SSL *  ssl)

Definition at line 259 of file tls_remote.c.

Here is the caller graph for this function:

◆ tls_fingerprint()

int tls_fingerprint ( X509 *  cert,
const char *  fingerprint,
int  dlen 
)

Definition at line 235 of file tls_remote.c.

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

◆ tlsa_check()

int tlsa_check ( const STACK_OF(X509) *  certs,
const stralloc  host,
const unsigned long  p 
)

Definition at line 172 of file tls_remote.c.

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

◆ X509_pkey_digest()

int X509_pkey_digest ( const X509 *  cert,
const EVP_MD *  type,
unsigned char *  md,
unsigned int dlen 
)

Definition at line 146 of file tls_remote.c.

Here is the caller graph for this function: