Enum sspi::credssp::SspiContext
source · pub enum SspiContext {
Ntlm(Ntlm),
Kerberos(Kerberos),
Negotiate(Negotiate),
Pku2u(Pku2u),
}
Variants§
Implementations§
source§impl SspiContext
impl SspiContext
pub fn package_name(&self) -> &str
Trait Implementations§
source§impl Debug for SspiContext
impl Debug for SspiContext
source§impl Sspi for SspiContext
impl Sspi for SspiContext
source§fn 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
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 [DecryptBuffer<'_>],
sequence_number: u32
) -> Result<DecryptionFlags>
fn decrypt_message( &mut self, message: &mut [DecryptBuffer<'_>], 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_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_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 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§fn change_password<'a>(
&'a mut self,
change_password: ChangePassword<'a>
) -> Result<GeneratorChangePassword<'_>>
fn change_password<'a>( &'a mut self, change_password: ChangePassword<'a> ) -> 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§impl SspiEx for SspiContext
impl SspiEx for SspiContext
fn custom_set_auth_identity( &mut self, identity: Self::AuthenticationData ) -> Result<()>
source§impl SspiImpl for SspiContext
impl SspiImpl for SspiContext
§type CredentialsHandle = Option<CredentialsBuffers>
type CredentialsHandle = Option<CredentialsBuffers>
Represents raw data for authentication
§type AuthenticationData = Credentials
type AuthenticationData = Credentials
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<'a>( &'a mut self, builder: &'a mut FilledInitializeSecurityContext<'a, Self::CredentialsHandle> ) -> Result<GeneratorInitSecurityContext<'_>>
Auto Trait Implementations§
impl Freeze for SspiContext
impl RefUnwindSafe for SspiContext
impl Send for SspiContext
impl Sync for SspiContext
impl Unpin for SspiContext
impl UnwindSafe for SspiContext
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