[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] session: add getters for session cipher names
[Thread Prev] | [Thread Next]
- Subject: Re: [PATCH] session: add getters for session cipher names
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 03 Feb 2014 16:55:58 +0100
- To: libssh@xxxxxxxxxx
On Sunday 02 February 2014 04:56:22 you wrote:
> Hi,
Hi Jon,
> The attached patch exposes getters for the in/out ciphers
> used for a given session. The usecase for this is that
> it may be interesting information to have in the server
> context.
thanks again for your contributions! I would just like to request a small
change to the patch.
+ if (session &&
+ session->current_crypto &&
+ session->current_crypto->in_cipher) {
+ return session->current_crypto->in_cipher->name;
I prefer
if (session == NULL &&
session->current_crypto == NULL &&
session->current_crypto->in_cipher == NULL) {
It is just more clean when reading that you do NULL pointer checks here :)
-- andreas
| Re: [PATCH] session: add getters for session cipher names | Jon Simons <jon@xxxxxxxxxxxxx> |
| [PATCH] session: add getters for session cipher names | Jon Simons <jon@xxxxxxxxxxxxx> |