Authen-Krb5

 view release on metacpan or  search on metacpan

lib/Authen/Krb5.xs  view on Meta::CPAN

typedef krb5_rcache		Authen__Krb5__Rcache;
typedef krb5_creds		*Authen__Krb5__Creds;
typedef krb5_ap_rep_enc_part	*Authen__Krb5__ApRepEncPart;
typedef krb5_ticket		*Authen__Krb5__Ticket;
typedef krb5_keytab		Authen__Krb5__Keytab;
typedef krb5_enc_tkt_part	*Authen__Krb5__EncTktPart;
typedef krb5_error		*Authen__Krb5__Error;
typedef krb5_address		*Authen__Krb5__Address;
typedef krb5_keyblock		*Authen__Krb5__Keyblock;
typedef krb5_keytab_entry	*Authen__Krb5__KeytabEntry;
typedef krb5_kt_cursor          *Authen__Krb5__KeytabCursor;
typedef krb5_cc_cursor          *Authen__Krb5__CcacheCursor;
typedef krb5_keyblock		*Authen__Krb5__KeyBlock;

static krb5_context context = NULL;
static krb5_error_code err;
static krb5_keytab_entry keytab_entry_init;


/*
 * function prototypes against implicit declaration of functions,
 * taken from k5-int.h

lib/Authen/Krb5.xs  view on Meta::CPAN


	err = krb5_cc_destroy(context, cc);
	if (err) {
		XSRETURN_UNDEF;
	}
	else {
		freed((SV*)cc);
		XSRETURN_YES;
	}

krb5_cc_cursor *
start_seq_get(cc)
	Authen::Krb5::Ccache cc

	CODE:
	if (!New(0, RETVAL, 1, krb5_cc_cursor))
		XSRETURN_UNDEF;
        err = krb5_cc_start_seq_get(context, cc, RETVAL);
	if (err)
                XSRETURN_UNDEF;

        OUTPUT:
        RETVAL

Authen::Krb5::Creds
next_cred(cc, cursor)
        krb5_cc_cursor *cursor
        Authen::Krb5::Ccache cc

        CODE:
	if (!New(0, RETVAL, 1, krb5_creds))
		XSRETURN_UNDEF;
        err = krb5_cc_next_cred(context, cc, cursor, RETVAL);
	if (err)
                XSRETURN_UNDEF;
        can_free((SV *)RETVAL);

        OUTPUT:
        RETVAL

void
end_seq_get(cc, cursor)
        Authen::Krb5::Ccache cc
        krb5_cc_cursor *cursor

        CODE:
        err = krb5_cc_end_seq_get(context, cc, cursor);
        if (err)
                XSRETURN_UNDEF;
        XSRETURN_YES;

void
DESTROY(cc)
	Authen::Krb5::Ccache cc

	CODE:
	if (should_free((SV *)cc)) {

lib/Authen/Krb5.xs  view on Meta::CPAN

        Authen::Krb5::Keytab keytab
        Authen::Krb5::KeytabEntry entry

        CODE:
        err = krb5_kt_add_entry(context, keytab, entry);
	if (err)
                XSRETURN_UNDEF;
	XSRETURN_YES;

void
end_seq_get(keytab, cursor)
        Authen::Krb5::Keytab keytab
        krb5_kt_cursor *cursor

        CODE:
        err = krb5_kt_end_seq_get(context, keytab, cursor);
        if (err)
                XSRETURN_UNDEF;
        XSRETURN_YES;

Authen::Krb5::KeytabEntry
get_entry(keytab, principal, vno = 0, enctype = 0)
        Authen::Krb5::Keytab keytab
        Authen::Krb5::Principal principal
        krb5_kvno vno
        krb5_enctype enctype

lib/Authen/Krb5.xs  view on Meta::CPAN

        err = krb5_kt_get_name(context, keytab, name, MAX_KEYTAB_NAME_LEN);
	if (err)
                XSRETURN_UNDEF;
	RETVAL = sv_2mortal(newSVpv(name, 0));
        can_free((SV *)RETVAL);

        OUTPUT:
        RETVAL

Authen::Krb5::KeytabEntry
next_entry(keytab, cursor)
        krb5_kt_cursor *cursor
        Authen::Krb5::Keytab keytab

        CODE:
	if (!New(0, RETVAL, 1, krb5_keytab_entry))
		XSRETURN_UNDEF;
        err = krb5_kt_next_entry(context, keytab, RETVAL, cursor);
	if (err)
                XSRETURN_UNDEF;
        can_free((SV *)RETVAL);

        OUTPUT:
        RETVAL

void
remove_entry(keytab, entry)
        Authen::Krb5::Keytab keytab
        Authen::Krb5::KeytabEntry entry

        CODE:
        err = krb5_kt_remove_entry(context, keytab, entry);
	if (err)
                XSRETURN_UNDEF;
	XSRETURN_YES;

krb5_kt_cursor *
start_seq_get(keytab)
        Authen::Krb5::Keytab keytab

        CODE:
	if (!New(0, RETVAL, 1, krb5_kt_cursor))
		XSRETURN_UNDEF;
        err = krb5_kt_start_seq_get(context, keytab, RETVAL);
	if (err)
                XSRETURN_UNDEF;

        OUTPUT:
        RETVAL

void
DESTROY(keytab)

lib/Authen/Krb5/Ccache.pod  view on Meta::CPAN

=head2 C<get_principal>

Returns the primary principal of the credentials cache.

=head2 C<destroy>

Destroys the credentials cache and releases all resources it used.

=head2 C<start_seq_get()>

Returns a cursor that can be passed to I<next_cred()> to read in turn
every credential in the cache.

=head2 C<next_cred(cursor)>

Returns the next credential in the cache as an Authen::Krb5::Creds
object.

=head2 C<end_seq_get(cursor)>

Perform cleanup opreations after I<next_cred()> and invalidates
I<cursor>.

=head1 AUTHOR

Jeff Horwitz <jeff@smashing.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2000 by Jeff Horwitz.

This is free software; you can redistribute it and/or modify it under

lib/Authen/Krb5/Keytab.pod  view on Meta::CPAN

Returns the name of the keytab.

=head2 C<get_entry(principal[, kvno, enctype])>

Returns an Authen::Krb5::KeytabEntry object representing an entry in
the keytab matching I<principal> and optionally I<kvno> and
I<enctype>.

=head2 C<start_seq_get()>

Returns a cursor that can be passed to <I<next_entry()> to read in turn
every key in the keytab.

=head2 C<next_entry(cursor)>

Returns the next entry in the keytab as an Authen::Krb5::KeytabEntry
object.

=head2 C<end_seq_get(cursor)>

Perform cleanup opreations after I<next_entry()> and invalidates
I<cursor>.

=head1 AUTHOR

Jeff Horwitz <jeff@smashing.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2000 by Jeff Horwitz.

This is free software; you can redistribute it and/or modify it under

typemap  view on Meta::CPAN

Authen::Krb5::KeytabEntry	T_PTROBJ_NU
Authen::Krb5::KeyBlock		T_PTROBJ_NU

struct in_addr *	T_PTROBJ_NU
krb5_error_code		T_INT
krb5_int32		T_INT
krb5_flags		T_INT
krb5_timestamp		T_INT
krb5_ui_4		T_INT
krb5_enctype            T_INT
krb5_kt_cursor *        T_PTROBJ_NU
krb5_cc_cursor *        T_PTROBJ_NU
krb5_kvno               T_U_INT

INPUT

T_PTROBJ_NU
	if ($arg == &PL_sv_undef) {
		$var = 0;
	}
	else if (sv_isa($arg, \"${ntype}\")) {
		IV tmp = SvIV((SV*)SvRV($arg));



( run in 0.256 second using v1.01-cache-2.11-cpan-4d50c553e7e )