More visibility restriction.

This commit is contained in:
antiduh
2014-06-26 18:04:44 +00:00
parent 5b3a92ee66
commit a8b98b3a1e
9 changed files with 13 additions and 32 deletions

View File

@@ -9,7 +9,7 @@ namespace NSspi.Contexts
{ {
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Sequential )]
public struct SecPkgContext_Sizes internal struct SecPkgContext_Sizes
{ {
public int MaxToken; public int MaxToken;
public int MaxSignature; public int MaxSignature;
@@ -18,27 +18,8 @@ namespace NSspi.Contexts
} }
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Sequential )]
public struct SecPkgContext_String internal struct SecPkgContext_String
{ {
public IntPtr StringResult; public IntPtr StringResult;
} }
public class ContextQueryHandle : SafeHandle
{
public ContextQueryHandle() :
base( IntPtr.Zero, true )
{
}
public override bool IsInvalid
{
get { return base.handle.Equals( IntPtr.Zero ); }
}
protected override bool ReleaseHandle()
{
return ContextNativeMethods.FreeContextBuffer( base.handle ) == SecurityStatus.OK;
}
}
} }

View File

@@ -9,7 +9,7 @@ using NSspi.Contexts;
namespace NSspi namespace NSspi
{ {
public class NativeMethods internal class NativeMethods
{ {
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa374713(v=vs.85).aspx // http://msdn.microsoft.com/en-us/library/windows/desktop/aa374713(v=vs.85).aspx
@@ -27,7 +27,7 @@ namespace NSspi
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success)] [ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success)]
[DllImport( "Secur32.dll", EntryPoint = "FreeContextBuffer", CharSet = CharSet.Unicode )] [DllImport( "Secur32.dll", EntryPoint = "FreeContextBuffer", CharSet = CharSet.Unicode )]
public static extern SecurityStatus FreeContextBuffer( IntPtr buffer ); internal static extern SecurityStatus FreeContextBuffer( IntPtr buffer );
[ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )] [ReliabilityContract( Consistency.WillNotCorruptState, Cer.Success )]

View File

@@ -8,9 +8,9 @@ using System.Threading.Tasks;
namespace NSspi namespace NSspi
{ {
public static class PackageSupport internal static class PackageSupport
{ {
public static SecPkgInfo GetPackageCapabilities( string packageName ) internal static SecPkgInfo GetPackageCapabilities( string packageName )
{ {
SecPkgInfo info; SecPkgInfo info;
SecurityStatus status; SecurityStatus status;

View File

@@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace NSspi.Buffers namespace NSspi.Buffers
{ {
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Sequential )]
public struct SecureBufferInternal internal struct SecureBufferInternal
{ {
public int Count; public int Count;
@@ -18,7 +18,7 @@ namespace NSspi.Buffers
public IntPtr Buffer; public IntPtr Buffer;
} }
public class SecureBuffer internal class SecureBuffer
{ {
public SecureBuffer( byte[] buffer, BufferType type ) public SecureBuffer( byte[] buffer, BufferType type )
{ {

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace NSspi.Buffers namespace NSspi.Buffers
{ {
public class SecureBufferAdapter : IDisposable internal class SecureBufferAdapter : IDisposable
{ {
private bool disposed; private bool disposed;

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace NSspi.Buffers namespace NSspi.Buffers
{ {
public enum SecureBufferDataRep : int internal enum SecureBufferDataRep : int
{ {
/* /*
#define SECURITY_NATIVE_DREP 0x00000010 #define SECURITY_NATIVE_DREP 0x00000010

View File

@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace NSspi.Buffers namespace NSspi.Buffers
{ {
[StructLayout( LayoutKind.Sequential)] [StructLayout( LayoutKind.Sequential)]
public struct SecureBufferDescInternal internal struct SecureBufferDescInternal
{ {
public int Version; public int Version;
public int NumBuffers; public int NumBuffers;

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace NSspi.Buffers namespace NSspi.Buffers
{ {
public enum BufferType : int internal enum BufferType : int
{ {
Empty = 0x00, Empty = 0x00,
Data = 0x01, Data = 0x01,

View File

@@ -25,7 +25,7 @@ namespace NSspi
/// a second class SafeSspiHandleReference so that reference counting is properly executed. /// a second class SafeSspiHandleReference so that reference counting is properly executed.
/// </remarks> /// </remarks>
[StructLayout( LayoutKind.Sequential, Pack = 1 ) ] [StructLayout( LayoutKind.Sequential, Pack = 1 ) ]
public struct RawSspiHandle internal struct RawSspiHandle
{ {
private IntPtr lowPart; private IntPtr lowPart;
private IntPtr highPart; private IntPtr highPart;