pub struct Ntlm { /* private fields */ }
Expand description
Specifies the NT LAN Manager (NTLM) Authentication Protocol, used for authentication between clients and servers. NTLM is used by application protocols to authenticate remote users and, optionally, to provide session security when requested by the application.
MSDN
Implementations
sourceimpl Ntlm
impl Ntlm
pub fn new() -> Self
pub fn with_auth_identity(identity: Option<AuthIdentityBuffers>) -> Self
pub fn set_version(&mut self, version: [u8; 8])
Trait Implementations
sourceimpl Sspi for Ntlm
impl Sspi for Ntlm
sourcefn complete_auth_token(
&mut self,
_token: &mut [SecurityBuffer]
) -> Result<SecurityStatus>
fn complete_auth_token(
&mut self,
_token: &mut [SecurityBuffer]
) -> Result<SecurityStatus>
Completes an authentication token. This function is used by protocols, such as DCE, that need to revise the security information after the transport application has updated some message parameters. Read more
sourcefn encrypt_message(
&mut self,
_flags: EncryptionFlags,
message: &mut [SecurityBuffer],
sequence_number: u32
) -> Result<SecurityStatus>
fn encrypt_message(
&mut self,
_flags: EncryptionFlags,
message: &mut [SecurityBuffer],
sequence_number: u32
) -> Result<SecurityStatus>
Encrypts a message to provide privacy. The function allows the application to choose among cryptographic algorithms supported by the chosen mechanism. Some packages do not have messages to be encrypted or decrypted but rather provide an integrity hash that can be checked. Read more
sourcefn decrypt_message(
&mut self,
message: &mut [SecurityBuffer],
sequence_number: u32
) -> Result<DecryptionFlags>
fn decrypt_message(
&mut self,
message: &mut [SecurityBuffer],
sequence_number: u32
) -> Result<DecryptionFlags>
Decrypts a message. Some packages do not encrypt and decrypt messages but rather perform and check an integrity hash. Read more
sourcefn query_context_sizes(&mut self) -> Result<ContextSizes>
fn query_context_sizes(&mut self) -> Result<ContextSizes>
Retrieves information about the bounds of sizes of authentication information of the current security principal. Read more
sourcefn query_context_names(&mut self) -> Result<ContextNames>
fn query_context_names(&mut self) -> Result<ContextNames>
Retrieves the username of the credential associated to the context. Read more
sourcefn query_context_package_info(&mut self) -> Result<PackageInfo>
fn query_context_package_info(&mut self) -> Result<PackageInfo>
Retrieves information about the specified security package. This information includes the bounds of sizes of authentication information, credentials, and contexts. Read more
sourcefn query_context_cert_trust_status(&mut self) -> Result<CertTrustStatus>
fn query_context_cert_trust_status(&mut self) -> Result<CertTrustStatus>
Retrieves the trust information of the certificate. Read more
sourcefn acquire_credentials_handle(
&mut self
) -> EmptyAcquireCredentialsHandle<'_, Self::CredentialsHandle, Self::AuthenticationData>
fn acquire_credentials_handle(
&mut self
) -> EmptyAcquireCredentialsHandle<'_, Self::CredentialsHandle, Self::AuthenticationData>
Acquires a handle to preexisting credentials of a security principal. The preexisting credentials are
available only for sspi::winapi
module. This handle is required by the initialize_security_context
and accept_security_context
functions. These can be either preexisting credentials, which are
established through a system logon, or the caller can provide alternative credentials. Alternative
credentials are always required to specify when using platform independent SSPs. Read more
sourcefn initialize_security_context(
&mut self
) -> EmptyInitializeSecurityContext<'_, Self::CredentialsHandle>
fn initialize_security_context(
&mut self
) -> EmptyInitializeSecurityContext<'_, Self::CredentialsHandle>
Initiates the client side, outbound security context from a credential handle.
The function is used to build a security context between the client application and a remote peer. The function returns a token
that the client must pass to the remote peer, which the peer in turn submits to the local security implementation through the
accept_security_context
call. Read more
sourcefn accept_security_context(
&mut self
) -> EmptyAcceptSecurityContext<'_, Self::AuthenticationData, Self::CredentialsHandle>
fn accept_security_context(
&mut self
) -> EmptyAcceptSecurityContext<'_, Self::AuthenticationData, Self::CredentialsHandle>
Lets the server component of a transport application establish a security context between the server and a remote client.
The remote client calls the initialize_security_context
function to start the process of establishing a security context.
The server can require one or more reply tokens from the remote client to complete establishing the security context. Read more
sourceimpl SspiEx for Ntlm
impl SspiEx for Ntlm
fn custom_set_auth_identity(&mut self, identity: Self::AuthenticationData)
sourceimpl SspiImpl for Ntlm
impl SspiImpl for Ntlm
type CredentialsHandle = Option<AuthIdentityBuffers>
type AuthenticationData = AuthIdentity
fn acquire_credentials_handle_impl(
&mut self,
builder: FilledAcquireCredentialsHandle<'_, Self::CredentialsHandle, Self::AuthenticationData>
) -> Result<AcquireCredentialsHandleResult<Self::CredentialsHandle>>
fn initialize_security_context_impl(
&mut self,
builder: &mut FilledInitializeSecurityContext<'_, Self::CredentialsHandle>
) -> Result<InitializeSecurityContextResult>
fn accept_security_context_impl(
&mut self,
builder: FilledAcceptSecurityContext<'_, Self::AuthenticationData, Self::CredentialsHandle>
) -> Result<AcceptSecurityContextResult>
Auto Trait Implementations
impl RefUnwindSafe for Ntlm
impl Send for Ntlm
impl Sync for Ntlm
impl Unpin for Ntlm
impl UnwindSafe for Ntlm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more