• Home
  • Raw
  • Download

Lines Matching refs:client_context

246     client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
247 client_context.load_verify_locations(SIGNING_CA)
253 return client_context, server_context, hostname
2573 def server_params_test(client_context, server_context, indata=b"FOO\n", argument
2585 with client_context.wrap_socket(socket.socket(),
2645 client_context = ssl.SSLContext(client_protocol)
2646 client_context.options |= client_options
2664 if client_context.protocol == ssl.PROTOCOL_TLS:
2665 client_context.set_ciphers("ALL")
2667 for ctx in (client_context, server_context):
2672 stats = server_params_test(client_context, server_context,
2710 client_context, server_context, hostname = testing_context()
2713 server_params_test(client_context=client_context,
2718 client_context.check_hostname = False
2721 server_params_test(client_context=server_context,
2722 server_context=client_context,
2730 server_params_test(client_context=server_context,
2738 server_params_test(client_context=server_context,
2739 server_context=client_context,
2748 client_context, server_context, hostname = testing_context()
2751 with client_context.wrap_socket(socket.socket(),
2786 client_context, server_context, hostname = testing_context()
2789 self.assertEqual(client_context.verify_flags, ssl.VERIFY_DEFAULT | tf)
2794 with client_context.wrap_socket(socket.socket(),
2801 client_context.verify_flags |= ssl.VERIFY_CRL_CHECK_LEAF
2805 with client_context.wrap_socket(socket.socket(),
2812 client_context.load_verify_locations(CRLFILE)
2816 with client_context.wrap_socket(socket.socket(),
2826 client_context, server_context, hostname = testing_context()
2831 with client_context.wrap_socket(socket.socket(),
2840 with client_context.wrap_socket(socket.socket(),
2853 client_context.wrap_socket(s)
2856 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2857 client_context.load_verify_locations(SIGNING_CA)
2858 client_context.set_ciphers('ECDHE:ECDSA:!NULL:!aRSA')
2868 with client_context.wrap_socket(socket.socket(),
2877 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2878 client_context.load_verify_locations(SIGNING_CA)
2881 client_context.options |= ssl.OP_NO_TLSv1_3
2883 client_context.set_ciphers('ECDHE:ECDSA:!NULL:!aRSA')
2894 with client_context.wrap_socket(socket.socket(),
2964 client_context, server_context, hostname = testing_context()
2966 client_context.load_cert_chain(CERTFILE)
2970 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
2977 client_context.wrap_socket(socket.socket(),
2997 client_context, server_context, hostname = testing_context()
2999 client_context.load_cert_chain(CERTFILE)
3002 client_context.minimum_version = ssl.TLSVersion.TLSv1_3
3008 client_context.wrap_socket(socket.socket(),
3637 client_context, server_context, hostname = testing_context()
3639 client_context.options |= ssl.OP_NO_TLSv1_3
3641 client_context.set_ciphers("AES128")
3644 with client_context.wrap_socket(socket.socket(),
3695 client_context, server_context, hostname = testing_context()
3697 client_context.minimum_version = ssl.TLSVersion.TLSv1
3698 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
3704 with client_context.wrap_socket(socket.socket(),
3714 with client_context.wrap_socket(socket.socket(),
3722 client_context.minimum_version = ssl.TLSVersion.TLSv1
3723 client_context.maximum_version = ssl.TLSVersion.TLSv1
3725 with client_context.wrap_socket(socket.socket(),
3736 client_context, server_context, hostname = testing_context()
3738 client_context.minimum_version = ssl.TLSVersion.SSLv3
3739 client_context.maximum_version = ssl.TLSVersion.SSLv3
3741 with client_context.wrap_socket(socket.socket(),
3773 client_context, server_context, hostname = testing_context()
3780 with client_context.wrap_socket(
3804 with client_context.wrap_socket(
3827 client_context, server_context, hostname = testing_context()
3828 stats = server_params_test(client_context, server_context,
3838 client_context, server_context, hostname = testing_context()
3839 client_context.options |= ssl.OP_NO_COMPRESSION
3841 stats = server_params_test(client_context, server_context,
3848 client_context, server_context, hostname = testing_context()
3850 client_context.options |= ssl.OP_NO_TLSv1_3
3854 stats = server_params_test(client_context, server_context,
3866 client_context, server_context, hostname = testing_context()
3871 stats = server_params_test(client_context, server_context,
3876 client_context, server_context, hostname = testing_context()
3877 client_context.set_ecdh_curve("secp384r1")
3880 stats = server_params_test(client_context, server_context,
3885 client_context, server_context, hostname = testing_context()
3886 client_context.set_ecdh_curve("prime256v1")
3891 stats = server_params_test(client_context, server_context,
3903 client_context, server_context, hostname = testing_context()
3904 stats = server_params_test(client_context, server_context,
3912 client_context, server_context, hostname = testing_context()
3914 stats = server_params_test(client_context, server_context,
3929 client_context, server_context, hostname = testing_context()
3931 client_context.set_alpn_protocols(client_protocols)
3934 stats = server_params_test(client_context,
3961 client_context, server_context, hostname = testing_context()
3962 stats = server_params_test(client_context, server_context,
3977 client_context, server_context, hostname = testing_context()
3979 client_context.set_npn_protocols(client_protocols)
3980 stats = server_params_test(client_context, server_context,
3998 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
3999 client_context.load_verify_locations(SIGNING_CA)
4000 return server_context, other_context, client_context
4009 server_context, other_context, client_context = self.sni_contexts()
4011 client_context.check_hostname = False
4019 stats = server_params_test(client_context, server_context,
4030 stats = server_params_test(client_context, server_context,
4040 stats = server_params_test(client_context, server_context,
4050 server_context, other_context, client_context = self.sni_contexts()
4056 stats = server_params_test(client_context, server_context,
4064 server_context, other_context, client_context = self.sni_contexts()
4072 stats = server_params_test(client_context, server_context,
4082 server_context, other_context, client_context = self.sni_contexts()
4090 stats = server_params_test(client_context, server_context,
4097 client_context, server_context, hostname = testing_context()
4098 client_context.set_ciphers("AES128:AES256")
4106 stats = server_params_test(client_context, server_context,
4115 client_context, server_context, hostname = testing_context()
4119 s = client_context.wrap_socket(socket.socket(),
4145 client_context, server_context, hostname = testing_context()
4147 client_context.options |= ssl.OP_NO_TLSv1_3
4150 stats = server_params_test(client_context, server_context,
4165 stats = server_params_test(client_context, server_context,
4179 stats = server_params_test(client_context, server_context,
4190 stats = server_params_test(client_context, server_context,
4203 client_context, server_context, hostname = testing_context()
4207 client_context.options |= ssl.OP_NO_TLSv1_3
4212 with client_context.wrap_socket(socket.socket(),
4224 with client_context.wrap_socket(socket.socket(),
4233 with client_context.wrap_socket(socket.socket(),
4280 client_context, server_context, hostname = testing_context()
4283 client_context.post_handshake_auth = True
4284 client_context.load_cert_chain(SIGNED_CERTFILE)
4288 with client_context.wrap_socket(socket.socket(),
4305 client_context, server_context, hostname = testing_context()
4308 client_context.post_handshake_auth = True
4312 with client_context.wrap_socket(socket.socket(),
4330 client_context, server_context, hostname = testing_context()
4333 client_context.post_handshake_auth = True
4334 client_context.load_cert_chain(SIGNED_CERTFILE)
4340 with client_context.wrap_socket(socket.socket(),
4354 client_context, server_context, hostname = testing_context()
4357 client_context.post_handshake_auth = True
4361 with client_context.wrap_socket(socket.socket(),
4373 client_context, server_context, hostname = testing_context()
4376 client_context.load_cert_chain(SIGNED_CERTFILE)
4380 with client_context.wrap_socket(socket.socket(),
4390 client_context, server_context, hostname = testing_context()
4392 client_context.post_handshake_auth = True
4393 client_context.load_cert_chain(SIGNED_CERTFILE)
4397 with client_context.wrap_socket(socket.socket(),
4410 client_context, server_context, hostname = testing_context()
4412 client_context.maximum_version = ssl.TLSVersion.TLSv1_2
4413 client_context.post_handshake_auth = True
4414 client_context.load_cert_chain(SIGNED_CERTFILE)
4418 with client_context.wrap_socket(socket.socket(),