spacemonkeygo / openssl

OpenSSL bindings for Go
http://godoc.org/github.com/spacemonkeygo/openssl
Apache License 2.0
472 stars 237 forks source link

Session cache opts #32

Closed bak1an closed 9 years ago

bak1an commented 9 years ago

It might be useful to get/set session cache timeout and session cache size. Openssl provides us with https://www.openssl.org/docs/ssl/SSL_CTX_sess_set_cache_size.html and https://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html to perform this.

This pull requests adds above methods to Ctx.

jtolio commented 9 years ago

this is great! would it be alright to request that the timeout value type be changed to time.Duration instead of int? that way library users don't need to check the docs for time units

bak1an commented 9 years ago

@jtolds sounds totally reasonable.

I'm going to implement this later this evening. Will update this pull request when finished.

bak1an commented 9 years ago

@jtolds done

jtolio commented 9 years ago

thanks!