[−][src]Struct libgssapi::context::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]
cred: Cred,
target: Name,
flags: CtxFlags,
mech: Option<&'static Oid>
) -> ClientCtx
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]
fn wrap(&self, encrypt: bool, msg: &[u8]) -> Result<Buf, Error>
[src]
fn wrap_iov(&self, encrypt: bool, msg: &mut [GssIov]) -> Result<(), Error>
[src]
fn wrap_iov_length(
&self,
encrypt: bool,
msg: &mut [GssIovFake]
) -> Result<(), Error>
[src]
&self,
encrypt: bool,
msg: &mut [GssIovFake]
) -> Result<(), Error>
fn unwrap(&self, msg: &[u8]) -> Result<Buf, Error>
[src]
fn unwrap_iov(&self, msg: &mut [GssIov]) -> Result<(), Error>
[src]
fn info(&self) -> Result<CtxInfo, Error>
[src]
fn source_name(&self) -> Result<Name, Error>
[src]
fn target_name(&self) -> Result<Name, Error>
[src]
fn lifetime(&self) -> Result<Duration, Error>
[src]
fn mechanism(&self) -> Result<&'static Oid, Error>
[src]
fn flags(&self) -> Result<CtxFlags, Error>
[src]
fn local(&self) -> Result<bool, Error>
[src]
fn open(&self) -> Result<bool, Error>
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,