1package GSSAPI::OID;
2
3require 5.005_62;
4use strict;
5use warnings;
6
7require Exporter;
8
9use overload
10	'""' => "stringify";
11
12our @ISA = qw(Exporter GSSAPI);
13
14our %EXPORT_TAGS = ( 'all' => [ qw(
15	gss_nt_user_name
16	gss_nt_machine_uid_name
17	gss_nt_string_uid_name
18	gss_nt_service_name
19	gss_nt_exported_name
20	gss_nt_service_name_v2
21	gss_nt_krb5_name
22	gss_nt_krb5_principal
23	gss_mech_krb5
24	gss_mech_krb5_old
25	gss_mech_spnego
26	gss_mech_krb5_v2
27
28) ] );
29
30our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
31our @EXPORT    = ( @{ $EXPORT_TAGS{'all'} } );
32
33sub stringify($$$) {
34    my $self = shift;
35    my($status, $str);
36    $status = $self->to_str($str)		or die $status;
37    $str
38}
39
401;
41__END__
42
43=head1 NAME
44
45GSSAPI::OID - methods for handling GSSAPI OIDs and some constant OIDs
46
47=head1 SYNOPSIS
48
49  use GSSAPI;
50
51  #$oid = GSSAPI::OID->new;		# rarely needed or wanted
52
53  $status = GSSAPI::OID->from_str($oid, "{ 1 2 840 113554 1 2 1 1 }");
54  #
55  # only supported on MIT Kerberos
56  #
57
58  $status = $oid->to_str($str);
59  #
60  # only supported on MIT Kerberos
61  #
62
63  $status = $oid->inquire_names($oidset);
64
65  # Constant OIDs provided:
66  $oid = gss_nt_user_name;
67  $oid = gss_nt_machine_uid_name;
68  $oid = gss_nt_string_uid_name;
69  $oid = gss_nt_service_name;
70  $oid = gss_nt_exported_name;
71  $oid = gss_nt_service_name_v2;
72  $oid = gss_nt_krb5_name;
73  $oid = gss_nt_krb5_principal;
74  $oid = gss_mech_krb5;
75  $oid = gss_mech_krb5_old;
76  $oid = gss_mech_krb5_v2;
77
78  $oid = gss_mech_spnego;
79
80  # if your GSSAPI implementation supports
81  # SPNEGO (Heimdal 0.7 for example
82  # you can  use mechtype OID::gss_mech_spnego.
83  #
84  # use GSSAPI::indicate_mechs( $oidset );
85  # to get the of mechtypes your implementation supports
86
87
88  $oid = gss_nt_hostbased_service; # GSS_C_NT_HOSTBASED_SERVICE
89
90
91=head1 DESCRIPTION
92
93C<GSSAPI::OID> objects are used as unique indentifiers/constants
94for 'mechanisisms' -- the particular protocol and version being
95used -- and for the encodings used to represent names.  In many
96cases you can request the default mechanism or encoding for the
97implmentation by using GSS_C_NO_OID.  Check the description of the
98routine in rfc2743 if you're not sure.
99
100=head1 AUTHOR
101
102maintained by Achim Grolms <perl@grolmsnet.de>
103
104originally written by
105Philip Guenther <pguen@cpan.org>
106
107=head1 SEE ALSO
108
109perl(1)
110GSSAPI(3p)
111GSSAPI::OID::Set(3p)
112RFC2743
113
114=cut
115