pub fn init_secure() -> Result<Krb5Context, Krb5Error> {
    let _guard = CONTEXT_INIT_LOCK
      .lock()
      .expect("Failed to lock context initialization.");

    let mut context_ptr: MaybeUninit<krb5_context> = MaybeUninit::zeroed();

    let code: krb5_error_code = unsafe { krb5_init_secure_context(context_ptr.as_mut_ptr()) };

    let context = Krb5Context {
      context: unsafe { context_ptr.assume_init() },
    };

    krb5_error_code_escape_hatch(&context, code)?;

    Ok(context)
  }
/**
   * Init krb5 context using only config files.
   *
   * Wraps [krb5_init_secure_context](https://web.mit.edu/kerberos/krb5-1.16/doc/appdev/refs/api/krb5_init_secure_context.html)
   */
Init krb5 context using only config files.
Init krb5 context using only config files .
pub fn init_secure() -> Result<Krb5Context, Krb5Error> {
    let _guard = CONTEXT_INIT_LOCK
      .lock()
      .expect("Failed to lock context initialization.");
    let mut context_ptr: MaybeUninit<krb5_context> = MaybeUninit::zeroed();
    let code: krb5_error_code = unsafe { krb5_init_secure_context(context_ptr.as_mut_ptr()) };
    let context = Krb5Context {
      context: unsafe { context_ptr.assume_init() },
    };
    krb5_error_code_escape_hatch(&context, code)?;
    Ok(context)
  }
pub fn init_secure ( ) -> Result < Krb5Context , Krb5Error > { let _guard = CONTEXT_INIT_LOCK . lock ( ) . expect ( " " ) ; let mut context_ptr : MaybeUninit < krb5_context > = MaybeUninit :: zeroed ( ) ; let code : krb5_error_code = unsafe { krb5_init_secure_context ( context_ptr . as_mut_ptr ( ) ) } ; let context = Krb5Context { context : unsafe { context_ptr . assume_init ( ) } , } ; krb5_error_code_escape_hatch ( & context , code ) ? ; Ok ( context ) }
Init krb5 context using only config files.
Init krb5 context using only config files .