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§
source§impl Ntlm
impl Ntlm
pub fn new() -> Self
pub fn with_config(config: NtlmConfig) -> Self
pub fn with_auth_identity( identity: Option<AuthIdentityBuffers>, config: NtlmConfig, ) -> Self
pub fn set_version(&mut self, version: [u8; 8])
pub fn session_key(&self) -> Option<[u8; 16]>
Trait Implementations§
source§impl Sspi for Ntlm
impl Sspi for Ntlm
source§fn complete_auth_token(
&mut self,
_token: &mut [OwnedSecurityBuffer],
) -> Result<SecurityStatus>
fn complete_auth_token( &mut self, _token: &mut [OwnedSecurityBuffer], ) -> 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
source§fn 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
source§fn 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
source§fn 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
source§fn 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
source§fn 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
source§fn 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
source§fn change_password(
&mut self,
_: ChangePassword<'_>,
) -> Result<GeneratorChangePassword<'_>>
fn change_password( &mut self, _: ChangePassword<'_>, ) -> Result<GeneratorChangePassword<'_>>
Changes the password for a Windows domain account. Read more
source§fn acquire_credentials_handle<'a>(
&mut self,
) -> EmptyAcquireCredentialsHandle<'a, Self::CredentialsHandle, Self::AuthenticationData>
fn acquire_credentials_handle<'a>( &mut self, ) -> EmptyAcquireCredentialsHandle<'a, 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 moresource§fn initialize_security_context<'a>(
&mut self,
) -> EmptyInitializeSecurityContext<'a, Self::CredentialsHandle>
fn initialize_security_context<'a>( &mut self, ) -> EmptyInitializeSecurityContext<'a, 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 moresource§fn accept_security_context<'a>(
&mut self,
) -> EmptyAcceptSecurityContext<'a, Self::CredentialsHandle>
fn accept_security_context<'a>( &mut self, ) -> EmptyAcceptSecurityContext<'a, 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 moresource§fn query_context_stream_sizes(&mut self) -> Result<StreamSizes>
fn query_context_stream_sizes(&mut self) -> Result<StreamSizes>
Queries the sizes of the various parts of a stream used in the per-message functions. This function is implemented only for CredSSP security package. Read more
source§fn query_context_remote_cert(&mut self) -> Result<CertContext>
fn query_context_remote_cert(&mut self) -> Result<CertContext>
Retrieves the information about the end certificate supplied by the server. This function is implemented only for CredSSP security package. Read more
source§fn query_context_negotiation_package(&mut self) -> Result<PackageInfo>
fn query_context_negotiation_package(&mut self) -> Result<PackageInfo>
Retrieves the information about the negotiated security package. This function is implemented only for CredSSP security package. Read more
source§fn query_context_connection_info(&mut self) -> Result<ConnectionInfo>
fn query_context_connection_info(&mut self) -> Result<ConnectionInfo>
Returns detailed information on the established connection. This function is implemented only for CredSSP security package. Read more
source§impl SspiEx for Ntlm
impl SspiEx for Ntlm
fn custom_set_auth_identity( &mut self, identity: Self::AuthenticationData, ) -> Result<()>
source§impl SspiImpl for Ntlm
impl SspiImpl for Ntlm
§type CredentialsHandle = Option<AuthIdentityBuffers>
type CredentialsHandle = Option<AuthIdentityBuffers>
Represents raw data for authentication
§type AuthenticationData = AuthIdentity
type AuthenticationData = AuthIdentity
Represents authentication data prepared for the authentication process
fn acquire_credentials_handle_impl( &mut self, builder: FilledAcquireCredentialsHandle<'_, Self::CredentialsHandle, Self::AuthenticationData>, ) -> Result<AcquireCredentialsHandleResult<Self::CredentialsHandle>>
fn accept_security_context_impl( &mut self, builder: FilledAcceptSecurityContext<'_, Self::CredentialsHandle>, ) -> Result<AcceptSecurityContextResult>
fn initialize_security_context_impl( &mut self, builder: &mut FilledInitializeSecurityContext<'_, Self::CredentialsHandle>, ) -> Result<GeneratorInitSecurityContext<'_>>
Auto Trait Implementations§
impl Freeze for Ntlm
impl RefUnwindSafe for Ntlm
impl Send for Ntlm
impl Sync for Ntlm
impl Unpin for Ntlm
impl UnwindSafe for Ntlm
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)