<s>
Stunnel	B-Protocol
is	O
an	O
open-source	B-Application
multi-platform	O
application	B-Application
used	O
to	O
provide	O
a	O
universal	O
TLS/SSL	B-Protocol
tunneling	B-Protocol
service	O
.	O
</s>
<s>
Stunnel	B-Protocol
can	O
be	O
used	O
to	O
provide	O
secure	O
encrypted	O
connections	O
for	O
clients	O
or	O
servers	O
that	O
do	O
not	O
speak	O
TLS	O
or	O
SSL	B-Protocol
natively	O
.	O
</s>
<s>
It	O
runs	O
on	O
a	O
variety	O
of	O
operating	O
systems	O
,	O
including	O
most	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
and	O
Windows	B-Application
.	O
</s>
<s>
Stunnel	B-Protocol
relies	O
on	O
the	O
OpenSSL	B-Language
library	B-Library
to	O
implement	O
the	O
underlying	O
TLS	O
or	O
SSL	B-Protocol
protocol	O
.	O
</s>
<s>
Stunnel	B-Protocol
uses	O
public-key	B-Application
cryptography	I-Application
with	O
X.509	O
digital	O
certificates	O
to	O
secure	O
the	O
SSL	B-Protocol
connection	O
,	O
and	O
clients	O
can	O
optionally	O
be	O
authenticated	O
via	O
a	O
certificate	O
.	O
</s>
<s>
If	O
linked	B-Application
against	O
libwrap	B-Protocol
,	O
it	O
can	O
be	O
configured	O
to	O
act	O
as	O
a	O
proxy	B-Application
–	O
firewall	B-Application
service	O
as	O
well	O
.	O
</s>
<s>
Stunnel	B-Protocol
is	O
maintained	O
by	O
Michał	O
Trojnara	O
and	O
released	O
under	O
the	O
terms	O
of	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
(	O
GPL	B-License
)	O
with	O
OpenSSL	B-Language
exception	O
.	O
</s>
<s>
For	O
example	O
,	O
one	O
could	O
use	O
stunnel	B-Protocol
to	O
provide	O
a	O
secure	O
SSL	B-Protocol
connection	O
to	O
an	O
existing	O
non-SSL-aware	O
SMTP	B-Protocol
mail	O
server	O
.	O
</s>
<s>
Assuming	O
the	O
SMTP	B-Protocol
server	I-Protocol
expects	O
TCP	O
connections	O
on	O
port	B-Protocol
25	I-Protocol
,	O
one	O
would	O
configure	O
stunnel	B-Protocol
to	O
map	O
the	O
SSL	B-Protocol
port	B-Protocol
465	O
to	O
non-SSL	O
port	B-Protocol
25	I-Protocol
.	O
</s>
<s>
A	O
mail	O
client	O
connects	O
via	O
SSL	B-Protocol
to	O
port	B-Protocol
465	O
.	O
</s>
<s>
Network	O
traffic	O
from	O
the	O
client	O
initially	O
passes	O
over	O
SSL	B-Protocol
to	O
the	O
stunnel	B-Protocol
application	B-Application
,	O
which	O
transparently	O
encrypts	O
and	O
decrypts	O
traffic	O
and	O
forwards	O
unsecured	O
traffic	O
to	O
port	B-Protocol
25	I-Protocol
locally	O
.	O
</s>
<s>
The	O
mail	O
server	O
sees	O
a	O
non-SSL	O
mail	O
client	O
.	O
</s>
<s>
The	O
stunnel	B-Protocol
process	O
could	O
be	O
running	O
on	O
the	O
same	O
or	O
a	O
different	O
server	O
from	O
the	O
unsecured	O
mail	O
application	B-Application
;	O
however	O
,	O
both	O
machines	O
would	O
typically	O
be	O
behind	O
a	O
firewall	B-Application
on	O
a	O
secure	O
internal	O
network	O
(	O
so	O
that	O
an	O
intruder	O
could	O
not	O
make	O
its	O
own	O
unsecured	O
connection	O
directly	O
to	O
port	B-Protocol
25	I-Protocol
)	O
.	O
</s>
