From c6c0ac623e8c41be295517ed72da28bf662b3817 Mon Sep 17 00:00:00 2001 From: Kevin Thompson Date: Sun, 24 Sep 2017 02:10:00 -0400 Subject: [PATCH] Code cleanup. Fixed comment and code style; removed unnecessary initialization of variable. --- NSspi/Contexts/Context.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/NSspi/Contexts/Context.cs b/NSspi/Contexts/Context.cs index b86efd1..ead8cc6 100644 --- a/NSspi/Contexts/Context.cs +++ b/NSspi/Contexts/Context.cs @@ -387,21 +387,22 @@ namespace NSspi.Contexts /// Returns the Session Key from a context or null on failure. /// /// - /// Session keys are sometimes needed for other purposes or HMAC functions. This function will run QueryAttribute to get the session key struct, and read and return the key from that struct. + /// Session keys are sometimes needed for other purposes or HMAC functions. This function + /// will run QueryAttribute to get the session key struct, and read and return the key from + /// that struct. /// - /// /// byte[] with the session key data or null on failure public byte[] QuerySessionKey() { - SecurityStatus status = SecurityStatus.InternalError; + SecurityStatus status; byte[] SessionKey = null; status = ContextNativeMethods.SafeQueryContextAttribute( - this.ContextHandle, - ContextQueryAttrib.SessionKey, - ref SessionKey - ); + this.ContextHandle, + ContextQueryAttrib.SessionKey, + ref SessionKey + ); if( status != SecurityStatus.OK ) {