s/qmail
4.3.20
Next generation secure email transport
Loading...
Searching...
No Matches
4.3
sqmail-4.3.20
src
tls_errors.c
Go to the documentation of this file.
1
#include <unistd.h>
2
#include "stralloc.h"
3
#include "
tls_errors.h
"
4
#include "error.h"
5
10
/* TLS error messages: A) Setup */
11
12
void
temp_tlscert
()
13
{
14
out
(
"ZCan't load X.509 certificate: "
);
15
outsafe
(&
certfile
);
16
out
(
". (#4.4.1)\n"
);
17
zerodie
();
18
}
19
20
void
temp_tlskey
()
21
{
22
out
(
"ZCan't load X.509 private key: "
);
23
outsafe
(&
keyfile
);
24
out
(
". (#4.4.1)\n"
);
25
zerodie
();
26
}
27
28
void
temp_tlschk
()
29
{
30
out
(
"ZKeyfile does not match X.509 certificate: "
);
31
outsafe
(&
keypwd
);
32
out
(
". (#4.4.1)\n"
);
33
zerodie
();
34
}
35
36
void
temp_tlsca
()
37
{
38
out
(
"ZI wasn't able to set up CAFILE: "
);
39
outsafe
(&
cafile
);
40
out
(
" or CADIR: "
);
41
outsafe
(&
cadir
);
42
out
(
" for TLS. (#4.4.1)\n"
);
43
zerodie
();
44
}
45
46
void
temp_tlscipher
()
47
{
48
out
(
"ZI wasn't able to process the TLS ciphers: "
);
49
outsafe
(&
ciphers
);
50
out
(
" (#4.4.1)\n"
);
51
zerodie
();
52
}
53
54
/* TLS error messages: B) Connection related */
55
56
void
temp_tlsctx
()
57
{
58
out
(
"ZI wasn't able to create TLS context for: "
);
59
outsafe
(&
host
);
out
(
" at "
);
out
(
remotehost
.s);
60
out
(
". (#4.4.1)\n"
);
61
zerodie
();
62
}
63
64
void
temp_tlscon
()
65
{
66
errno = EPROTO;
67
out
(
"ZI wasn't able to establish a TLS connection with: "
);
68
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
69
out
(
". (#4.4.1)\n"
);
70
zerodie
();
71
}
72
73
void
temp_tlserr
()
74
{
75
errno = EPROTO;
76
out
(
"ZTLS connection/protocol error with: "
);
77
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
78
out
(
". (#4.4.1)\n"
);
79
zerodie
();
80
}
81
82
void
temp_tlshost
()
83
{
84
out
(
"ZI wasn't able to negotiate a StartTLS connection with: "
);
85
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
86
out
(
". (#4.4.1)\n"
);
87
zerodie
();
88
}
89
90
91
/* TLS error messages: C) Verification related */
92
93
void
temp_tlspeercert
()
94
{
95
out
(
"ZUnable to obtain X.509 certificate from: "
);
96
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
97
out
(
". (#4.4.1)\n"
);
98
zerodie
();
99
}
100
101
void
temp_tlspeerverify
()
102
{
103
out
(
"ZUnable to verify X.509 certificate from: "
);
104
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
105
out
(
". (#4.4.1)\n"
);
106
zerodie
();
107
}
108
109
void
temp_tlspeervalid
()
110
{
111
out
(
"ZUnable to validate X.509 certificate Subject for: "
);
112
outsafe
(&
host
);
out
(
" at "
);
out
(
remotehost
.s);
113
out
(
". (#4.4.1)\n"
);
114
zerodie
();
115
}
116
117
void
temp_tlscertfp
()
118
{
119
out
(
"ZReceived X.509 certificate from: "
);
120
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
121
out
(
" does not match fingerprint: "
);
122
outsafe
(&
cafile
);
123
out
(
". (#4.4.1)\n"
);
124
zerodie
();
125
}
126
127
void
temp_invaliddigest
()
128
{
129
out
(
"ZInvalid digest length provided given for: "
);
130
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
131
out
(
". (#4.4.1)\n"
);
132
zerodie
();
133
}
134
135
void
temp_tlsamissing
()
136
{
137
out
(
"ZTLSA X.509 cert required but missing from: "
);
138
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
139
out
(
". (#4.4.1)\n"
);
140
zerodie
();
141
}
142
143
void
temp_tlsainvalid
()
144
{
145
out
(
"ZTLSA fingerprint matching error for: "
);
146
out
(
remotehost
.s);
147
out
(
". (#4.4.1)\n"
);
148
zerodie
();
149
}
150
151
void
temp_tlsdigest
()
152
{
153
out
(
"ZReceived X.509 certificate from: "
);
154
out
(
remotehost
.s);
out
(
" for "
);
outsafe
(&
host
);
155
out
(
" posses an unknown digest method"
);
156
out
(
". (#4.4.1)\n"
);
157
zerodie
();
158
}
out
stralloc out
Definition:
dnscname.c:12
host
char host[256]
Definition:
hostname.c:5
temp_tlskey
void temp_tlskey()
Definition:
tls_errors.c:20
temp_tlscertfp
void temp_tlscertfp()
Definition:
tls_errors.c:117
temp_tlscert
void temp_tlscert()
Definition:
tls_errors.c:12
temp_tlspeercert
void temp_tlspeercert()
Definition:
tls_errors.c:93
temp_tlsamissing
void temp_tlsamissing()
Definition:
tls_errors.c:135
temp_tlsdigest
void temp_tlsdigest()
Definition:
tls_errors.c:151
temp_tlsca
void temp_tlsca()
Definition:
tls_errors.c:36
temp_invaliddigest
void temp_invaliddigest()
Definition:
tls_errors.c:127
temp_tlsainvalid
void temp_tlsainvalid()
Definition:
tls_errors.c:143
temp_tlsctx
void temp_tlsctx()
Definition:
tls_errors.c:56
temp_tlspeervalid
void temp_tlspeervalid()
Definition:
tls_errors.c:109
temp_tlserr
void temp_tlserr()
Definition:
tls_errors.c:73
temp_tlscipher
void temp_tlscipher()
Definition:
tls_errors.c:46
temp_tlspeerverify
void temp_tlspeerverify()
Definition:
tls_errors.c:101
temp_tlscon
void temp_tlscon()
Definition:
tls_errors.c:64
temp_tlschk
void temp_tlschk()
Definition:
tls_errors.c:28
temp_tlshost
void temp_tlshost()
Definition:
tls_errors.c:82
tls_errors.h
remotehost
stralloc remotehost
Definition:
qmail-popup.c:74
certfile
stralloc certfile
Definition:
qmail-remote.c:429
zerodie
void zerodie(void)
Definition:
qmail-remote.c:123
outsafe
void outsafe(stralloc *)
Definition:
qmail-remote.c:131
keyfile
stralloc keyfile
Definition:
qmail-remote.c:430
cadir
stralloc cadir
Definition:
qmail-remote.c:428
keypwd
stralloc keypwd
Definition:
qmail-remote.c:431
ciphers
stralloc ciphers
Definition:
qmail-remote.c:432
cafile
stralloc cafile
Definition:
qmail-remote.c:427
Generated on Thu Jan 16 2025 17:42:04 for s/qmail by
1.9.6