TLS authentication using Python client

python

#1

I am trying to connect using the python client with TLS enabled. I can’t find any reference in the api documentation so any help would be appreciated.

From command line I can connect like this

aql --tlsEnable --tlsCaFile cert.pem -U USER_NAME -P -h “HOST:TLS_HOST:PORT” -T 5000

In the python client I have this so far

config = {
    'hosts': [(HOST, PORT)],
    'policies': {'timeout': 1000, 'user': user, 'password': password},

}
try:
    aerospike_client = aerospike.client(config)
    aerospike_client.connect()
except Exception as e:
    print e

which returns

(-1L, ‘Failed to connect’, ‘src/main/aerospike/as_cluster.c’, 226)