DIfference between s2_srvr.c, s3_srvr.c, s23_srvr.c and t1_clnt.c

Matt Caswell matt at openssl.org
Wed Apr 24 11:22:36 UTC 2019



On 24/04/2019 08:05, Chethan Kumar wrote:
> Thanks for the information.
> 
> I understood the flow. Does t1_srvr.c is used to call respective
> TLS*_server_method in s3_srvr.c when tls1_get_server_method() is set while
> creating SSL_CTX()?

Each protocol version has a corresponding SSL_METHOD structure which contains a
set of function pointers for protocol version specific implementations of
various functions, as well as other meta data about the protocol version. The
t1_srvr.c file just defines those SSL_METHOD structures for TLSv1, TLSv1.1 and
TLSv1.2. When you call SSL_CTX() you must supply a specific SSL_METHOD that
you're going to use which can either be one of the protocol version specific
methods such as those defined in t1_srvr.c (not recommended) or the generic
version flexible SSLv23_server_method().


> Is similar logic followed for openssl as client also?
> Like s2_clnt.c is called when SSLv2 is used. S23_clnt.c is called for SSLv3
> and above. Or is it different.?

Yes, this is very similar.

Matt


More information about the openssl-users mailing list