keyword argument description boolean flag that indicates whether or not the socket is operating as server (trueor client (falseby defaultthis is false keyfile the key file used to identify the local side of the connection this should be pem-format file and usually only included if the file specified with the certfile doesn' include the key certfile the certificate file used to identify the local side of the connection this should be pem-format file cert_reqs specifies whether certificate is required from the other side of the connection and whether or not it will be validated value of cert_none means that certificates are ignoredcert_optional means that certificates are not required but will be validated if givenand cert_required means that certificates are required and will be validated if certificates are going to be validatedthe ca_certs parameter must also be given ca_certs filename of the file holding certificate authority certificates used for validation ssl_version ssl protocol version to use possible values are protocol_tlsv protocol_sslv protocol_sslv or protocol_sslv the default protocol is protocol_sslv do_handshake_on_connect boolean flag that specifies whether or not the ssl handshake is performed automatically on connect by defaultthis is true suppress_ragged_eofs specifies how read(handles an unexpected eof on the connection if true (the default) normal eof is signaled if falsean exception is raised server_side an instance of sslsocket inherits from socket socket and additionally supports the following operationss cipher(returns tuple (nameversionsecretbitswhere name is the cipher name being usedversion is the ssl protocoland secretbits is the number of secret bits being used do_handshake(performs the ssl handshake normally this is done automatically unless the do_handshake_on_connect option was set to false in the wrap_socket(function if the underlying socket is nonblockingan sslerror exception will be raised if the operation couldn' be completed the args[ attribute of an sslerror exception will have the value ssl_error_want_read or ssl_error_want_write depending on the operation that needs to be performed to continue the handshake process once reading or writing can continuesimply call do_handshake(again lib fl ff