kerberos/gss enhancements
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 Oct 2008 00:28:36 +0000 (00:28 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 Oct 2008 00:28:36 +0000 (00:28 +0000)
commit68edcd262493aa016c1df96b95f244a99c083793
treec01c048770d6d7c050b641b91d9ad140023e8610
parentc3dfc4cb25c153f41cae6054e501ac11d0b0830f
kerberos/gss enhancements

add a parameter *datalen to decrypt_krb5_data() so that we can pass back
the length of the decrypted blob back to the caller.
This is useful for when there are "junk" at the end of the blob and thus
the decrypted data is not the same size as the encrypted blob.
GSS CFX is one such example.
(we should have done this earlier since it might have made some other
stuff easier to imlement...)

make the preference setting krb_decrypt a globally visible variable so
we can see its value and act on it from callers of krb decryption from
outside of packet-kerberos.c    i.e.   from GSS CFX

Make keytype == -1  a wildcard that when passed to decrypt_krb5_data()
will try any/all encryption keys.
This since GSS CFX does not provide the enctype in the GSS layer.
(The GSS CFX enctype is only negotiated during the AP-REQ/REP  so we
should later pick this value up and store it in a CFX session variable.
That is for a later enhancement.
)

Enhance the GSS decryption (that for hitorical reasons are implemented
in packet-spnego.c  and not packet-gssapi.c :-)  )
to also handle decryption of GSS CFX

This should make wireshark able to decrypt any/all GSSAPI  RFC4121
packets, if the keytab file is provided.

I have successfully decrypted LDAP using GSS CFX with AES encryption
with this.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26350 f5534014-38df-0310-8fa8-9805f1628bb7
asn1/spnego/packet-spnego-template.c
epan/dissectors/packet-kerberos.c
epan/dissectors/packet-kerberos.h
epan/dissectors/packet-kink.c
epan/dissectors/packet-spnego.c