• Home
  • Raw
  • Download

Lines Matching refs:client_context

317     client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
318 client_context.load_verify_locations(SIGNING_CA)
324 return client_context, server_context, hostname
2686 def server_params_test(client_context, server_context, indata=b"FOO\n", argument
2698 with client_context.wrap_socket(socket.socket(),
2758 client_context = ssl.SSLContext(client_protocol)
2759 client_context.options |= client_options
2777 if client_context.protocol == ssl.PROTOCOL_TLS:
2778 client_context.set_ciphers("ALL")
2780 for ctx in (client_context, server_context):
2785 stats = server_params_test(client_context, server_context,
2824 client_context, server_context, hostname = testing_context()
2827 server_params_test(client_context=client_context,
2832 client_context.check_hostname = False
2835 server_params_test(client_context=server_context,
2836 server_context=client_context,
2844 server_params_test(client_context=server_context,
2852 server_params_test(client_context=server_context,
2853 server_context=client_context,
2862 client_context, server_context, hostname = testing_context()
2865 with client_context.wrap_socket(socket.socket(),
2900 client_context, server_context, hostname = testing_context()
2903 self.assertEqual(client_context.verify_flags, ssl.VERIFY_DEFAULT | tf)
2908 with client_context.wrap_socket(socket.socket(),
2915 client_context.verify_flags |= ssl.VERIFY_CRL_CHECK_LEAF
2919 with client_context.wrap_socket(socket.socket(),
2926 client_context.load_verify_locations(CRLFILE)
2930 with client_context.wrap_socket(socket.socket(),
2940 client_context, server_context, hostname = testing_context()
2945 with client_context.wrap_socket(socket.socket(),
2954 with client_context.wrap_socket(socket.socket(),
2967 client_context.wrap_socket(s)
2970 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2971 client_context.load_verify_locations(SIGNING_CA)
2972 client_context.set_ciphers('ECDHE:ECDSA:!NULL:!aRSA')
2982 with client_context.wrap_socket(socket.socket(),
2991 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2992 client_context.load_verify_locations(SIGNING_CA)
2995 client_context.options |= ssl.OP_NO_TLSv1_3
2997 client_context.set_ciphers('ECDHE:ECDSA:!NULL:!aRSA')
3008 with client_context.wrap_socket(socket.socket(),
3078 client_context, server_context, hostname = testing_context()
3080 client_context.load_cert_chain(CERTFILE)
3084 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3091 client_context.wrap_socket(socket.socket(),
3111 client_context, server_context, hostname = testing_context()
3113 client_context.load_cert_chain(CERTFILE)
3116 client_context.minimum_version = ssl.TLSVersion.TLSv1_3
3122 client_context.wrap_socket(socket.socket(),
3745 client_context, server_context, hostname = testing_context()
3747 client_context.options |= ssl.OP_NO_TLSv1_3
3749 client_context.set_ciphers("AES128")
3752 with client_context.wrap_socket(socket.socket(),
3802 client_context, server_context, hostname = testing_context()
3804 client_context.minimum_version = ssl.TLSVersion.TLSv1
3805 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3811 with client_context.wrap_socket(socket.socket(),
3819 client_context, server_context, hostname = testing_context()
3821 client_context.minimum_version = ssl.TLSVersion.TLSv1
3822 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3827 with client_context.wrap_socket(socket.socket(),
3836 client_context, server_context, hostname = testing_context()
3840 client_context.maximum_version = ssl.TLSVersion.TLSv1
3841 client_context.minimum_version = ssl.TLSVersion.TLSv1
3843 with client_context.wrap_socket(socket.socket(),
3852 client_context, server_context, hostname = testing_context()
3854 client_context.minimum_version = ssl.TLSVersion.SSLv3
3855 client_context.maximum_version = ssl.TLSVersion.SSLv3
3857 with client_context.wrap_socket(socket.socket(),
3889 client_context, server_context, hostname = testing_context()
3896 with client_context.wrap_socket(
3920 with client_context.wrap_socket(
3943 client_context, server_context, hostname = testing_context()
3944 stats = server_params_test(client_context, server_context,
3954 client_context, server_context, hostname = testing_context()
3955 client_context.options |= ssl.OP_NO_COMPRESSION
3957 stats = server_params_test(client_context, server_context,
3965 client_context, server_context, hostname = testing_context()
3967 client_context.options |= ssl.OP_NO_TLSv1_3
3971 stats = server_params_test(client_context, server_context,
3983 client_context, server_context, hostname = testing_context()
3988 stats = server_params_test(client_context, server_context,
3993 client_context, server_context, hostname = testing_context()
3994 client_context.set_ecdh_curve("secp384r1")
3997 stats = server_params_test(client_context, server_context,
4002 client_context, server_context, hostname = testing_context()
4003 client_context.set_ecdh_curve("prime256v1")
4008 stats = server_params_test(client_context, server_context,
4020 client_context, server_context, hostname = testing_context()
4021 stats = server_params_test(client_context, server_context,
4029 client_context, server_context, hostname = testing_context()
4031 stats = server_params_test(client_context, server_context,
4046 client_context, server_context, hostname = testing_context()
4048 client_context.set_alpn_protocols(client_protocols)
4051 stats = server_params_test(client_context,
4078 client_context, server_context, hostname = testing_context()
4079 stats = server_params_test(client_context, server_context,
4094 client_context, server_context, hostname = testing_context()
4096 client_context.set_npn_protocols(client_protocols)
4097 stats = server_params_test(client_context, server_context,
4115 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
4116 client_context.load_verify_locations(SIGNING_CA)
4117 return server_context, other_context, client_context
4126 server_context, other_context, client_context = self.sni_contexts()
4128 client_context.check_hostname = False
4136 stats = server_params_test(client_context, server_context,
4147 stats = server_params_test(client_context, server_context,
4157 stats = server_params_test(client_context, server_context,
4167 server_context, other_context, client_context = self.sni_contexts()
4173 stats = server_params_test(client_context, server_context,
4181 server_context, other_context, client_context = self.sni_contexts()
4189 stats = server_params_test(client_context, server_context,
4201 server_context, other_context, client_context = self.sni_contexts()
4209 stats = server_params_test(client_context, server_context,
4218 client_context, server_context, hostname = testing_context()
4219 client_context.set_ciphers("AES128:AES256")
4227 stats = server_params_test(client_context, server_context,
4236 client_context, server_context, hostname = testing_context()
4240 s = client_context.wrap_socket(socket.socket(),
4266 client_context, server_context, hostname = testing_context()
4268 client_context.options |= ssl.OP_NO_TLSv1_3
4271 stats = server_params_test(client_context, server_context,
4286 stats = server_params_test(client_context, server_context,
4300 stats = server_params_test(client_context, server_context,
4311 stats = server_params_test(client_context, server_context,
4324 client_context, server_context, hostname = testing_context()
4328 client_context.options |= ssl.OP_NO_TLSv1_3
4333 with client_context.wrap_socket(socket.socket(),
4345 with client_context.wrap_socket(socket.socket(),
4354 with client_context.wrap_socket(socket.socket(),
4401 client_context, server_context, hostname = testing_context()
4404 client_context.post_handshake_auth = True
4405 client_context.load_cert_chain(SIGNED_CERTFILE)
4409 with client_context.wrap_socket(socket.socket(),
4426 client_context, server_context, hostname = testing_context()
4429 client_context.post_handshake_auth = True
4436 with client_context.wrap_socket(socket.socket(),
4454 client_context, server_context, hostname = testing_context()
4457 client_context.post_handshake_auth = True
4458 client_context.load_cert_chain(SIGNED_CERTFILE)
4464 with client_context.wrap_socket(socket.socket(),
4478 client_context, server_context, hostname = testing_context()
4481 client_context.post_handshake_auth = True
4485 with client_context.wrap_socket(socket.socket(),
4497 client_context, server_context, hostname = testing_context()
4500 client_context.load_cert_chain(SIGNED_CERTFILE)
4504 with client_context.wrap_socket(socket.socket(),
4514 client_context, server_context, hostname = testing_context()
4516 client_context.post_handshake_auth = True
4517 client_context.load_cert_chain(SIGNED_CERTFILE)
4521 with client_context.wrap_socket(socket.socket(),
4534 client_context, server_context, hostname = testing_context()
4536 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4537 client_context.post_handshake_auth = True
4538 client_context.load_cert_chain(SIGNED_CERTFILE)
4542 with client_context.wrap_socket(socket.socket(),
4553 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
4554 client_context.post_handshake_auth = True
4555 client_context.load_cert_chain(SIGNED_CERTFILE)
4557 client_context.check_hostname = False
4558 client_context.verify_mode = ssl.CERT_NONE
4568 with client_context.wrap_socket(socket.socket(),
4619 client_context, server_context, hostname = testing_context()
4621 client_context.keylog_filename = support.TESTFN
4624 with client_context.wrap_socket(socket.socket(),
4630 client_context.keylog_filename = None
4634 with client_context.wrap_socket(socket.socket(),
4639 client_context.keylog_filename = support.TESTFN
4643 with client_context.wrap_socket(socket.socket(),
4648 client_context.keylog_filename = None
4671 client_context, server_context, hostname = testing_context()
4676 self.assertIs(client_context._msg_callback, None)
4677 client_context._msg_callback = msg_cb
4678 self.assertIs(client_context._msg_callback, msg_cb)
4680 client_context._msg_callback = object()
4683 client_context, server_context, hostname = testing_context()
4684 client_context.options |= ssl.OP_NO_TLSv1_3
4694 client_context._msg_callback = msg_cb
4698 with client_context.wrap_socket(socket.socket(),