Takes a return result from an SSPI function and interprets the value.

Methods
#
N
O
T
Constants
SEC_E_OK = 0x00000000
 

Good results

SEC_I_CONTINUE_NEEDED = 0x00090312
 
SEC_E_INSUFFICIENT_MEMORY = 0x80090300
 

These are generally returned by InitializeSecurityContext

SEC_E_INTERNAL_ERROR = 0x80090304
 
SEC_E_INVALID_HANDLE = 0x80090301
 
SEC_E_INVALID_TOKEN = 0x80090308
 
SEC_E_LOGON_DENIED = 0x8009030C
 
SEC_E_NO_AUTHENTICATING_AUTHORITY = 0x80090311
 
SEC_E_NO_CREDENTIALS = 0x8009030E
 
SEC_E_TARGET_UNKNOWN = 0x80090303
 
SEC_E_UNSUPPORTED_FUNCTION = 0x80090302
 
SEC_E_WRONG_PRINCIPAL = 0x80090322
 
SEC_E_NOT_OWNER = 0x80090306
 

These are generally returned by AcquireCredentialsHandle

SEC_E_SECPKG_NOT_FOUND = 0x80090305
 
SEC_E_UNKNOWN_CREDENTIALS = 0x8009030D
 
Attributes
[R] value
Class Public methods
new(value)
# File ext/dl/win32/lib/win32/sspi.rb, line 181
def initialize(value)
        # convert to unsigned long
        value = [value].pack("L").unpack("L").first
        raise "#{value.to_s(16)} is not a recognized result" unless @@map.has_key? value
        @value = value
end
Instance Public methods
==(other)
# File ext/dl/win32/lib/win32/sspi.rb, line 196
def ==(other)
        if other.is_a?(SSPIResult)
                @value == other.value
        elsif other.is_a?(Fixnum)
                @value == @@map[other]
        else
                false
        end
end
ok?()
# File ext/dl/win32/lib/win32/sspi.rb, line 192
def ok?
        @value == SEC_I_CONTINUE_NEEDED || @value == SEC_E_OK
end
to_s()
# File ext/dl/win32/lib/win32/sspi.rb, line 188
def to_s
        @@map[@value].to_s
end