Struct sspi::kerberos::Kerberos

source ·
pub struct Kerberos { /* private fields */ }

Implementations§

source§

impl Kerberos

source

pub fn new_client_from_config(config: KerberosConfig) -> Result<Self>

source

pub fn new_server_from_config(config: KerberosConfig) -> Result<Self>

source

pub fn config(&self) -> &KerberosConfig

source

pub fn next_seq_number(&mut self) -> u32

source

pub fn get_kdc(&self) -> Option<(String, Url)>

source

pub async fn as_exchange( &mut self, yield_point: &mut YieldPoint<NetworkRequest, Result<Vec<u8>>>, kdc_req_body: &KdcReqBody, pa_data_options: AsReqPaDataOptions<'_> ) -> Result<AsRep>

source§

impl<'a> Kerberos

source

pub async fn change_password( &'a mut self, yield_point: &mut YieldPoint<NetworkRequest, Result<Vec<u8>>>, change_password: ChangePassword<'a> ) -> Result<()>

Trait Implementations§

source§

impl Clone for Kerberos

source§

fn clone(&self) -> Kerberos

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Kerberos

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Sspi for Kerberos

source§

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>

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>

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>

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>

Retrieves the username of the credential associated to the context. Read more
source§

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>

Retrieves the trust information of the certificate. Read more
source§

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>

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
source§

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 more
source§

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 more
source§

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>

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>

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>

Returns detailed information on the established connection. This function is implemented only for CredSSP security package. Read more
source§

impl SspiEx for Kerberos

source§

fn custom_set_auth_identity( &mut self, identity: Self::AuthenticationData ) -> Result<()>

source§

impl SspiImpl for Kerberos

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more