[][src]Struct libgssapi::context::ClientCtx

pub struct ClientCtx(_);

The client side of a security context. Contexts are wrapped in and Arc<Mutex<_>> internally, so clones work and you can use them safely from other threads.

Methods

impl ClientCtx[src]

pub fn new(
    cred: Cred,
    target: Name,
    flags: CtxFlags,
    mech: Option<&'static Oid>
) -> ClientCtx
[src]

Create a new uninitialized client security context using the specified credentials, targeting the service named by target, and optionally using a specific mechanism (otherwise gssapi will pick a default for you). To finish initializing the context you must call step.

pub fn step(&self, tok: Option<&[u8]>) -> Result<Option<Buf>, Error>[src]

Perform 1 step in the initialization of the specfied security context. Since the client initiates context creation, the token will initially be None, and gssapi will give you a token to send to the server. The server may send back a token, which you must feed to this function, and possibly get another token to send to the server. This will go on a mechanism specifiec number of times until step returns Ok(None). At that point the context is fully initialized.

Trait Implementations

impl Clone for ClientCtx[src]

impl Debug for ClientCtx[src]

impl SecurityContext for ClientCtx[src]

Auto Trait Implementations

impl !RefUnwindSafe for ClientCtx

impl Send for ClientCtx

impl Sync for ClientCtx

impl Unpin for ClientCtx

impl !UnwindSafe for ClientCtx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.