Changed the SafeSspiHandle et al to invalidate the underlying handle after releasing it.

This commit is contained in:
antiduh
2014-06-24 17:41:35 +00:00
parent 1fcbf6da72
commit a681cc27c5

View File

@@ -58,6 +58,12 @@ namespace NSspi
{
get { return IsClosed || this.rawHandle.IsZero(); }
}
protected override bool ReleaseHandle()
{
this.rawHandle.SetInvalid();
return true;
}
}
public class SafeCredentialHandle : SafeSspiHandle
@@ -72,8 +78,9 @@ namespace NSspi
ref base.rawHandle
);
base.ReleaseHandle();
return status == SecurityStatus.OK;
}
}
}