Commit Graph

61 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
784ffbfa6a Make delegated credentials delegated directly, Oleg Sharoiko pointed out that it always didnt work with the old code. Also add som missing cred and context pass-thou functions in the SPNEGO layer
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22688 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-03-16 11:33:58 +00:00
Love Hörnquist Åstrand
2b90d952c6 (_gss_spnego_inquire_context): make work, based on patch from Ryan Sleevi.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22604 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-02-21 21:12:48 +00:00
Love Hörnquist Åstrand
3673482a9b make the SPNEGO mech store the error itself instead, works for everything except other stackable mechs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22600 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-02-21 12:46:24 +00:00
Love Hörnquist Åstrand
c2bc1d4b03 (spnego_reply): if the reply token was of length 0, make it the same
as no token. Pointed out by Zeqing Xia.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22598 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-02-18 18:19:51 +00:00
Love Hörnquist Åstrand
b53c90da08 Make error reporting somewhat more correct for SPNEGO.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22569 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-02-03 18:20:24 +00:00
Love Hörnquist Åstrand
f282936479 drop file
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22400 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-11 14:28:13 +00:00
Love Hörnquist Åstrand
39ad4a364f (_gss_spnego_internal_delete_sec_context): release ctx->target_name too
From Rafal Malinowski.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21866 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-08-08 11:31:29 +00:00
Love Hörnquist Åstrand
05e5153afc Make compile again.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21461 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-10 14:01:13 +00:00
Love Hörnquist Åstrand
f3842471ec remove checks that are done by the previous function.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21459 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-10 13:23:14 +00:00
Love Hörnquist Åstrand
3f6884c4c5 Indent and make NegTokenInit and NegTokenResp extendable.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21403 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-04 08:13:12 +00:00
Love Hörnquist Åstrand
64b2fd7e72 Wrap name in a spnego_name instead of just a copy of the underlaying object.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21243 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-20 15:16:22 +00:00
Love Hörnquist Åstrand
c68e3696e2 Handle underlaying mech not returning mn.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21239 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-20 11:23:13 +00:00
Love Hörnquist Åstrand
a5f538fae9 Make sure src_name is always set to GSS_C_NO_NAME when returning.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21235 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-20 11:10:33 +00:00
Love Hörnquist Åstrand
79f9985a9c Only wrap the delegated cred if we are going to return it to the consumer.
From Rafal Malinowski.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21186 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-20 03:29:02 +00:00
Love Hörnquist Åstrand
b3d275ac40 Fixed memory leak pointed out by Rafal Malinowski, also while here
moved to use NegotiationToken for decoding.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21185 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-20 03:23:49 +00:00
Love Hörnquist Åstrand
ab8094ae4c Init get_mic to 0.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21127 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-18 20:23:14 +00:00
Love Hörnquist Åstrand
a906ca54bf (_gss_spnego_display_name): if input_name is null, fail.
From Rafal Malinowski.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21035 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-09 15:32:47 +00:00
Love Hörnquist Åstrand
cc4333b758 remove cvs ignore files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-09 03:09:59 +00:00
Love Hörnquist Åstrand
f3b2b8b19c Make sure the gethostname() returned string is NUL terminated.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20929 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-05 21:19:22 +00:00
Love Hörnquist Åstrand
5e36b724c0 Use the return value before is overwritten by later calls.
From Rafal Malinowski


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20755 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-31 23:01:27 +00:00
Love Hörnquist Åstrand
20618d2976 (gss_inquire_cred*): wrap the name with a spnego_name.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20619 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-08 13:43:45 +00:00
Love Hörnquist Åstrand
3583a32e50 Need to import spnego name before we can use it as a gss_name_t.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20364 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-17 13:30:21 +00:00
Love Hörnquist Åstrand
3c9d3266f4 try using gss_accept_sec_context() on the opportunistic token instead
of guessing the acceptor name and do gss_acquire_cred, this make
SPNEGO work like before.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19435 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-19 12:10:35 +00:00
Love Hörnquist Åstrand
20e973fda2 Resurect negHints for the acceptor sends first packet.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19421 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 18:50:15 +00:00
Love Hörnquist Åstrand
a11517a4d9 Add "windows" versions of the NegTokenInitWin and friends.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19420 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 18:28:49 +00:00
Love Hörnquist Åstrand
6a8647e1c6 move _gss_spnego_indicate_mechtypelist() to compat.c, use the sequence
types of MechTypeList, make add_mech_type() static.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19415 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 17:52:26 +00:00
Love Hörnquist Åstrand
acccf21ce2 move _gss_spnego_indicate_mechtypelist() to compat.c
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19414 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 17:51:13 +00:00
Love Hörnquist Åstrand
363515e856 check that the generated acceptor mechlist is acceptable too
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19411 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 15:42:03 +00:00
Love Hörnquist Åstrand
826acbd391 Abstract out the initiator filter function, it will be needed for the
acceptor too.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19410 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 15:00:19 +00:00
Love Hörnquist Åstrand
c11cc5fd1b Abstract out the initiator filter function, it will be needed for the
acceptor too. Remove negHints.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19409 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 15:00:03 +00:00
Love Hörnquist Åstrand
62270350bc try harder to handle names better. handle missing acceptor and initator creds better (ie dont propose/accept mech that there are no credentials for) split NegTokenInit and NegTokenResp in acceptor
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19397 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 12:59:50 +00:00
Love Hörnquist Åstrand
471a5b53bb Its very sad, but NegHints its are not part of the NegTokenInit, this
makes SPNEGO acceptor life a lot harder.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19396 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-18 12:56:30 +00:00
Love Hörnquist Åstrand
07a8f134e8 Make bitfields unsigned, add maybe_open.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19050 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-15 11:37:25 +00:00
Love Hörnquist Åstrand
b60aecaebf Use ASN.1 encoder functions to encode CHOICE structure now that we can handle it.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19048 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-15 11:10:46 +00:00
Love Hörnquist Åstrand
75b517309f (_gss_spnego_accept_sec_context): send back ad accept_completed when
the security context is ->open, w/o this the client doesn't know that
the server have completed the transaction.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19046 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-15 10:31:21 +00:00
Love Hörnquist Åstrand
c00799be18 Keep track of the opportunistic token in the inital message, it might
be a complete gss-api context, in that case we'll get back
accept_completed without any token. With this change, krb5 w/o mutual
authentication works.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19043 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-15 10:18:55 +00:00
Love Hörnquist Åstrand
c8fd5412ce Use ASN.1 encoder functions to encode CHOICE structure now that we can handle it.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19042 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-15 09:01:45 +00:00
Love Hörnquist Åstrand
774e93dac2 Filter out SPNEGO from the out supported mechs list and make sure we
don't select that for the preferred mechamism.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19039 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-15 08:42:36 +00:00
Love Hörnquist Åstrand
4fc6a5e397 Include <roken.h> for compatiblity.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18941 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-07 19:53:40 +00:00
Love Hörnquist Åstrand
98512c905d ignore spnego-private.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18712 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 20:43:33 +00:00
Love Hörnquist Åstrand
00c5c484a9 Prefix der primitives with der_.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18459 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-14 10:12:16 +00:00
Love Hörnquist Åstrand
7136a32661 Maybe include <netdb.h>.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18409 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-12 06:28:06 +00:00
Love Hörnquist Åstrand
4e9e341188 reference all include files using spnego/
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18336 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-07 22:27:13 +00:00
Love Hörnquist Åstrand
34b26c738d Maybe include <sys/types.h>.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18319 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-07 18:27:00 +00:00
Love Hörnquist Åstrand
1e83468c03 Cast argument to ctype(3) functions to (unsigned char).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18253 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-06 07:30:54 +00:00
Love Hörnquist Åstrand
246de3cc42 prefix all gss_spnego with _, use generated headers
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18191 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-02 08:07:58 +00:00
Love Hörnquist Åstrand
493bd788d4 Make internal function static (and rename).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18189 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-02 07:29:58 +00:00
Love Hörnquist Åstrand
c667d17ea8 Include <sys/param.h> for MAXHOSTNAMELEN.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18184 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-01 17:50:55 +00:00
Love Hörnquist Åstrand
fd78f09696 readd gss_spnego_inquire_names_for_mech
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17811 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-06 19:31:57 +00:00
Love Hörnquist Åstrand
3db3b74783 reimplement gss_spnego_inquire_names_for_mech
add support function _gss_spnego_supported_mechs


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17810 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-06 19:31:24 +00:00