/// <summary> /// Verify a request or response /// </summary> /// <param name="securityBuffers">Security buffers containing encrypted data.</param> /// <param name="sentFromClient">True if the token is a request, false is a response</param> /// <returns>True if verify succeed; otherwise, false.</returns> private bool Verify(SecurityBuffer[] securityBuffers, bool sentFromClient) { KileContext context = sentFromClient ? (KileContext)kileDecoder.serverContext : (KileContext)kileDecoder.clientContext; KilePdu pdu; return(KileRole.GssVerifyMicEx(context, securityBuffers, out pdu)); }
/// <summary> /// This takes the given byte array and verifies it using the SSPI VerifySignature method. /// </summary> /// <param name="kileRole">Represents client or server</param> /// <param name="securityBuffers">Data and token to verify</param> /// <returns>Success if true, Fail if false</returns> /// <exception cref="System.ArgumentException">Thrown when the data or token is not valid.</exception> internal static bool Verify(KileRole kileRole, params SecurityBuffer[] securityBuffers) { KilePdu pdu; return(kileRole.GssVerifyMicEx(securityBuffers, out pdu)); }