• Home
  • Raw
  • Download

Lines Matching refs:client_context

318     client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
319 client_context.load_verify_locations(SIGNING_CA)
326 return client_context, server_context, hostname
1128 client_context, server_context, hostname = testing_context()
1131 with client_context.wrap_socket(socket.socket(),
2800 def server_params_test(client_context, server_context, indata=b"FOO\n", argument
2812 with client_context.wrap_socket(socket.socket(),
2873 client_context = ssl.SSLContext(client_protocol)
2874 client_context.options |= client_options
2894 if client_context.protocol == ssl.PROTOCOL_TLS:
2895 client_context.set_ciphers("ALL")
2897 seclevel_workaround(server_context, client_context)
2899 for ctx in (client_context, server_context):
2904 stats = server_params_test(client_context, server_context,
2933 client_context, server_context, hostname = testing_context()
2936 server_params_test(client_context=client_context,
2941 client_context.check_hostname = False
2944 server_params_test(client_context=server_context,
2945 server_context=client_context,
2955 server_params_test(client_context=server_context,
2965 server_params_test(client_context=server_context,
2966 server_context=client_context,
2976 client_context, server_context, hostname = testing_context()
2979 with client_context.wrap_socket(socket.socket(),
3012 client_context, server_context, hostname = testing_context()
3015 self.assertEqual(client_context.verify_flags, ssl.VERIFY_DEFAULT | tf)
3020 with client_context.wrap_socket(socket.socket(),
3027 client_context.verify_flags |= ssl.VERIFY_CRL_CHECK_LEAF
3031 with client_context.wrap_socket(socket.socket(),
3038 client_context.load_verify_locations(CRLFILE)
3042 with client_context.wrap_socket(socket.socket(),
3052 client_context, server_context, hostname = testing_context()
3057 with client_context.wrap_socket(socket.socket(),
3066 with client_context.wrap_socket(socket.socket(),
3079 client_context.wrap_socket(s)
3085 client_context, server_context, hostname = testing_context()
3086 assert client_context.hostname_checks_common_name
3087 client_context.hostname_checks_common_name = False
3092 with client_context.wrap_socket(socket.socket(),
3096 client_context, server_context, hostname = testing_context(NOSANFILE)
3097 client_context.hostname_checks_common_name = False
3100 with client_context.wrap_socket(socket.socket(),
3106 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
3107 client_context.load_verify_locations(SIGNING_CA)
3108 client_context.set_ciphers('ECDHE:ECDSA:!NULL:!aRSA')
3118 with client_context.wrap_socket(socket.socket(),
3127 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
3128 client_context.load_verify_locations(SIGNING_CA)
3131 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3133 client_context.set_ciphers('ECDHE:ECDSA:!NULL:!aRSA')
3144 with client_context.wrap_socket(socket.socket(),
3214 client_context, server_context, hostname = testing_context()
3216 client_context.load_cert_chain(CERTFILE)
3220 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3227 client_context.wrap_socket(socket.socket(),
3247 client_context, server_context, hostname = testing_context()
3249 client_context.load_cert_chain(CERTFILE)
3252 client_context.minimum_version = ssl.TLSVersion.TLSv1_3
3258 client_context.wrap_socket(socket.socket(),
3875 client_context, server_context, hostname = testing_context()
3877 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3879 client_context.set_ciphers("AES128")
3882 with client_context.wrap_socket(socket.socket(),
3909 client_context, server_context, hostname = testing_context()
3910 client_context.minimum_version = ssl.TLSVersion.TLSv1_3
3912 with client_context.wrap_socket(socket.socket(),
3926 client_context, server_context, hostname = testing_context()
3928 client_context.minimum_version = ssl.TLSVersion.TLSv1
3929 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3935 with client_context.wrap_socket(socket.socket(),
3943 client_context, server_context, hostname = testing_context()
3945 client_context.minimum_version = ssl.TLSVersion.TLSv1
3946 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3949 seclevel_workaround(client_context, server_context)
3952 with client_context.wrap_socket(socket.socket(),
3961 client_context, server_context, hostname = testing_context()
3965 client_context.maximum_version = ssl.TLSVersion.TLSv1
3966 client_context.minimum_version = ssl.TLSVersion.TLSv1
3967 seclevel_workaround(client_context, server_context)
3970 with client_context.wrap_socket(socket.socket(),
3978 client_context, server_context, hostname = testing_context()
3980 client_context.minimum_version = ssl.TLSVersion.SSLv3
3981 client_context.maximum_version = ssl.TLSVersion.SSLv3
3982 seclevel_workaround(client_context, server_context)
3985 with client_context.wrap_socket(socket.socket(),
3993 client_context, server_context, hostname = testing_context()
3996 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4002 with client_context.wrap_socket(socket.socket(),
4014 client_context, server_context, hostname = testing_context()
4021 with client_context.wrap_socket(
4045 with client_context.wrap_socket(
4068 client_context, server_context, hostname = testing_context()
4069 stats = server_params_test(client_context, server_context,
4079 client_context, server_context, hostname = testing_context()
4080 client_context.options |= ssl.OP_NO_COMPRESSION
4082 stats = server_params_test(client_context, server_context,
4090 client_context, server_context, hostname = testing_context()
4092 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4096 stats = server_params_test(client_context, server_context,
4106 client_context, server_context, hostname = testing_context()
4111 stats = server_params_test(client_context, server_context,
4116 client_context, server_context, hostname = testing_context()
4117 client_context.set_ecdh_curve("secp384r1")
4120 stats = server_params_test(client_context, server_context,
4125 client_context, server_context, hostname = testing_context()
4126 client_context.set_ecdh_curve("prime256v1")
4131 server_params_test(client_context, server_context,
4137 client_context, server_context, hostname = testing_context()
4138 stats = server_params_test(client_context, server_context,
4145 client_context, server_context, hostname = testing_context()
4147 stats = server_params_test(client_context, server_context,
4161 client_context, server_context, hostname = testing_context()
4163 client_context.set_alpn_protocols(client_protocols)
4166 stats = server_params_test(client_context,
4194 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
4195 client_context.load_verify_locations(SIGNING_CA)
4196 return server_context, other_context, client_context
4204 server_context, other_context, client_context = self.sni_contexts()
4206 client_context.check_hostname = False
4214 stats = server_params_test(client_context, server_context,
4225 stats = server_params_test(client_context, server_context,
4235 stats = server_params_test(client_context, server_context,
4244 server_context, other_context, client_context = self.sni_contexts()
4250 stats = server_params_test(client_context, server_context,
4257 server_context, other_context, client_context = self.sni_contexts()
4265 stats = server_params_test(client_context, server_context,
4276 server_context, other_context, client_context = self.sni_contexts()
4284 stats = server_params_test(client_context, server_context,
4293 client_context, server_context, hostname = testing_context()
4294 client_context.set_ciphers("AES128:AES256")
4302 stats = server_params_test(client_context, server_context,
4311 client_context, server_context, hostname = testing_context()
4315 s = client_context.wrap_socket(socket.socket(),
4328 client_context, server_context, hostname = testing_context()
4331 with client_context.wrap_socket(socket.socket(),
4339 client_context, server_context, hostname = testing_context()
4341 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4344 stats = server_params_test(client_context, server_context,
4358 stats = server_params_test(client_context, server_context,
4372 stats = server_params_test(client_context, server_context,
4383 stats = server_params_test(client_context, server_context,
4396 client_context, server_context, hostname = testing_context()
4400 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4405 with client_context.wrap_socket(socket.socket(),
4417 with client_context.wrap_socket(socket.socket(),
4426 with client_context.wrap_socket(socket.socket(),
4473 client_context, server_context, hostname = testing_context()
4476 client_context.post_handshake_auth = True
4477 client_context.load_cert_chain(SIGNED_CERTFILE)
4481 with client_context.wrap_socket(socket.socket(),
4498 client_context, server_context, hostname = testing_context()
4501 client_context.post_handshake_auth = True
4509 client_context._msg_callback = msg_cb
4513 with client_context.wrap_socket(socket.socket(),
4538 client_context, server_context, hostname = testing_context()
4541 client_context.post_handshake_auth = True
4542 client_context.load_cert_chain(SIGNED_CERTFILE)
4548 with client_context.wrap_socket(socket.socket(),
4562 client_context, server_context, hostname = testing_context()
4565 client_context.post_handshake_auth = True
4569 with client_context.wrap_socket(socket.socket(),
4581 client_context, server_context, hostname = testing_context()
4584 client_context.load_cert_chain(SIGNED_CERTFILE)
4588 with client_context.wrap_socket(socket.socket(),
4598 client_context, server_context, hostname = testing_context()
4600 client_context.post_handshake_auth = True
4601 client_context.load_cert_chain(SIGNED_CERTFILE)
4605 with client_context.wrap_socket(socket.socket(),
4618 client_context, server_context, hostname = testing_context()
4620 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4621 client_context.post_handshake_auth = True
4622 client_context.load_cert_chain(SIGNED_CERTFILE)
4626 with client_context.wrap_socket(socket.socket(),
4637 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
4638 client_context.post_handshake_auth = True
4639 client_context.load_cert_chain(SIGNED_CERTFILE)
4641 client_context.check_hostname = False
4642 client_context.verify_mode = ssl.CERT_NONE
4652 with client_context.wrap_socket(socket.socket(),
4665 client_context, server_context, hostname = testing_context(
4670 with client_context.wrap_socket(
4702 client_context, server_context, hostname = testing_context()
4703 client_context.load_cert_chain(SIGNED_CERTFILE)
4709 with client_context.wrap_socket(
4760 client_context, server_context, hostname = testing_context()
4762 client_context.keylog_filename = os_helper.TESTFN
4765 with client_context.wrap_socket(socket.socket(),
4771 client_context.keylog_filename = None
4775 with client_context.wrap_socket(socket.socket(),
4780 client_context.keylog_filename = os_helper.TESTFN
4784 with client_context.wrap_socket(socket.socket(),
4789 client_context.keylog_filename = None
4812 client_context, server_context, hostname = testing_context()
4817 self.assertIs(client_context._msg_callback, None)
4818 client_context._msg_callback = msg_cb
4819 self.assertIs(client_context._msg_callback, msg_cb)
4821 client_context._msg_callback = object()
4824 client_context, server_context, hostname = testing_context()
4825 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4835 client_context._msg_callback = msg_cb
4839 with client_context.wrap_socket(socket.socket(),
4855 client_context, server_context, hostname = testing_context()
4869 with client_context.wrap_socket(socket.socket(),
4872 with client_context.wrap_socket(socket.socket(),