asprom
asprom copied to clipboard
tls_support
Added tls support Changed arguments to support it and used NewSecureConnection
Hi, sorry for the delay. Thanks for the PR! I have a few questions, but I'll start with the most important one: would it be possible to keep all the current flags as-is, and have the TLS options be new flags only? I'm thinking something along these lines:
enableTLS = flag.Bool("tls", false, "enable TLS")
tlsName = flag.String("tlsName", "myServer", "TLS name")
tlsKey = flag.String("tlsKey", "./tls.key", "TLS certificate - key")
tlsCert = flag.String("tlsCert", "./tls.cert", "TLS certificate - cert")
Hi, Yes it's definitely possible. I wanted to seperate the port from the node address since usually secured connection to aerospike is done via port 3010 and not 3000. I will refactor and update the PR.
Done.
Thanks!
- Please run all code through
go fmt
- The default for all flags should stay no TLS, I think (also the port should stay :3000 by default?)
- It looks like it always makes a secure connection now (with
NewSecureConnection()
). Are you sure this still works with the default (non-secure) connection?
You were correct I was missing an if to choose between secure connection and non secure connection. Fixed and performed other requests as well.