diff --git a/Contexts/ContextQueries.cs b/Contexts/ContextQueries.cs index 7df6785..0499b5e 100644 --- a/Contexts/ContextQueries.cs +++ b/Contexts/ContextQueries.cs @@ -9,7 +9,7 @@ namespace NSspi.Contexts { [StructLayout( LayoutKind.Sequential )] - public struct SecPkgContext_Sizes + internal struct SecPkgContext_Sizes { public int MaxToken; public int MaxSignature; @@ -18,27 +18,8 @@ namespace NSspi.Contexts } [StructLayout( LayoutKind.Sequential )] - public struct SecPkgContext_String + internal struct SecPkgContext_String { 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; - } - } } diff --git a/NativeMethods.cs b/NativeMethods.cs index ff582e1..b0b81ac 100644 --- a/NativeMethods.cs +++ b/NativeMethods.cs @@ -9,7 +9,7 @@ using NSspi.Contexts; namespace NSspi { - public class NativeMethods + internal class NativeMethods { // 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)] [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 )] diff --git a/PackageSupport.cs b/PackageSupport.cs index bd307c2..6f38185 100644 --- a/PackageSupport.cs +++ b/PackageSupport.cs @@ -8,9 +8,9 @@ using System.Threading.Tasks; namespace NSspi { - public static class PackageSupport + internal static class PackageSupport { - public static SecPkgInfo GetPackageCapabilities( string packageName ) + internal static SecPkgInfo GetPackageCapabilities( string packageName ) { SecPkgInfo info; SecurityStatus status; diff --git a/SecureBuffer/SecureBuffer.cs b/SecureBuffer/SecureBuffer.cs index 21e4189..72c3bd8 100644 --- a/SecureBuffer/SecureBuffer.cs +++ b/SecureBuffer/SecureBuffer.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace NSspi.Buffers { [StructLayout( LayoutKind.Sequential )] - public struct SecureBufferInternal + internal struct SecureBufferInternal { public int Count; @@ -18,7 +18,7 @@ namespace NSspi.Buffers public IntPtr Buffer; } - public class SecureBuffer + internal class SecureBuffer { public SecureBuffer( byte[] buffer, BufferType type ) { diff --git a/SecureBuffer/SecureBufferAdapter.cs b/SecureBuffer/SecureBufferAdapter.cs index c417211..04af48b 100644 --- a/SecureBuffer/SecureBufferAdapter.cs +++ b/SecureBuffer/SecureBufferAdapter.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace NSspi.Buffers { - public class SecureBufferAdapter : IDisposable + internal class SecureBufferAdapter : IDisposable { private bool disposed; diff --git a/SecureBuffer/SecureBufferDataRep.cs b/SecureBuffer/SecureBufferDataRep.cs index af20ceb..ebd13f4 100644 --- a/SecureBuffer/SecureBufferDataRep.cs +++ b/SecureBuffer/SecureBufferDataRep.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace NSspi.Buffers { - public enum SecureBufferDataRep : int + internal enum SecureBufferDataRep : int { /* #define SECURITY_NATIVE_DREP 0x00000010 diff --git a/SecureBuffer/SecureBufferDesc.cs b/SecureBuffer/SecureBufferDesc.cs index 8fa2bda..9a7195d 100644 --- a/SecureBuffer/SecureBufferDesc.cs +++ b/SecureBuffer/SecureBufferDesc.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace NSspi.Buffers { [StructLayout( LayoutKind.Sequential)] - public struct SecureBufferDescInternal + internal struct SecureBufferDescInternal { public int Version; public int NumBuffers; diff --git a/SecureBuffer/SecureBufferType.cs b/SecureBuffer/SecureBufferType.cs index fb8208e..808a4f1 100644 --- a/SecureBuffer/SecureBufferType.cs +++ b/SecureBuffer/SecureBufferType.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace NSspi.Buffers { - public enum BufferType : int + internal enum BufferType : int { Empty = 0x00, Data = 0x01, diff --git a/SspiHandle.cs b/SspiHandle.cs index 6a9c14f..996151b 100644 --- a/SspiHandle.cs +++ b/SspiHandle.cs @@ -25,7 +25,7 @@ namespace NSspi /// a second class SafeSspiHandleReference so that reference counting is properly executed. /// [StructLayout( LayoutKind.Sequential, Pack = 1 ) ] - public struct RawSspiHandle + internal struct RawSspiHandle { private IntPtr lowPart; private IntPtr highPart;