Changes from doug barton to make spnego indepedant of the heimdal version of the plugin system.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23158 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2008-05-02 Love H<>rnquist <20>strand <lha@it.su.se>
|
||||||
|
|
||||||
|
* spnego: Changes from doug barton to make spnego indepedant of
|
||||||
|
the heimdal version of the plugin system.
|
||||||
|
|
||||||
2008-04-27 Love H<>rnquist <20>strand <lha@it.su.se>
|
2008-04-27 Love H<>rnquist <20>strand <lha@it.su.se>
|
||||||
|
|
||||||
* krb5: use DES_set_key_unchecked()
|
* krb5: use DES_set_key_unchecked()
|
||||||
|
@@ -376,6 +376,9 @@ select_mech(OM_uint32 *minor_status, MechType *mechType, int verify_p,
|
|||||||
char mechbuf[64];
|
char mechbuf[64];
|
||||||
size_t mech_len;
|
size_t mech_len;
|
||||||
gss_OID_desc oid;
|
gss_OID_desc oid;
|
||||||
|
gss_OID oidp;
|
||||||
|
gss_OID_set mechs;
|
||||||
|
int i;
|
||||||
OM_uint32 ret, junk;
|
OM_uint32 ret, junk;
|
||||||
|
|
||||||
ret = der_put_oid ((unsigned char *)mechbuf + sizeof(mechbuf) - 1,
|
ret = der_put_oid ((unsigned char *)mechbuf + sizeof(mechbuf) - 1,
|
||||||
@@ -396,27 +399,29 @@ select_mech(OM_uint32 *minor_status, MechType *mechType, int verify_p,
|
|||||||
*minor_status = 0;
|
*minor_status = 0;
|
||||||
|
|
||||||
/* Translate broken MS Kebreros OID */
|
/* Translate broken MS Kebreros OID */
|
||||||
if (gss_oid_equal(&oid, &_gss_spnego_mskrb_mechanism_oid_desc)) {
|
if (gss_oid_equal(&oid, &_gss_spnego_mskrb_mechanism_oid_desc))
|
||||||
gssapi_mech_interface mech;
|
oidp = &_gss_spnego_krb5_mechanism_oid_desc;
|
||||||
|
else
|
||||||
|
oidp = &oid;
|
||||||
|
|
||||||
mech = __gss_get_mechanism(&_gss_spnego_krb5_mechanism_oid_desc);
|
|
||||||
if (mech == NULL)
|
ret = gss_indicate_mechs(&junk, &mechs);
|
||||||
|
if (ret)
|
||||||
|
return (ret);
|
||||||
|
|
||||||
|
for (i = 0; i < mechs->count; i++)
|
||||||
|
if (gss_oid_equal(&mechs->elements[i], oidp))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (i == mechs->count) {
|
||||||
|
gss_release_oid_set(&junk, &mechs);
|
||||||
return GSS_S_BAD_MECH;
|
return GSS_S_BAD_MECH;
|
||||||
|
|
||||||
ret = gss_duplicate_oid(minor_status,
|
|
||||||
&_gss_spnego_mskrb_mechanism_oid_desc,
|
|
||||||
mech_p);
|
|
||||||
} else {
|
|
||||||
gssapi_mech_interface mech;
|
|
||||||
|
|
||||||
mech = __gss_get_mechanism(&oid);
|
|
||||||
if (mech == NULL)
|
|
||||||
return GSS_S_BAD_MECH;
|
|
||||||
|
|
||||||
ret = gss_duplicate_oid(minor_status,
|
|
||||||
&mech->gm_mech_oid,
|
|
||||||
mech_p);
|
|
||||||
}
|
}
|
||||||
|
gss_release_oid_set(&junk, &mechs);
|
||||||
|
|
||||||
|
ret = gss_duplicate_oid(minor_status,
|
||||||
|
&oid, /* possibly this should be oidp */
|
||||||
|
mech_p);
|
||||||
|
|
||||||
if (verify_p) {
|
if (verify_p) {
|
||||||
gss_name_t name = GSS_C_NO_NAME;
|
gss_name_t name = GSS_C_NO_NAME;
|
||||||
|
@@ -67,7 +67,6 @@
|
|||||||
#include <gssapi_mech.h>
|
#include <gssapi_mech.h>
|
||||||
|
|
||||||
#include "spnego_asn1.h"
|
#include "spnego_asn1.h"
|
||||||
#include "mech/utils.h"
|
|
||||||
#include <der.h>
|
#include <der.h>
|
||||||
|
|
||||||
#include <roken.h>
|
#include <roken.h>
|
||||||
|
Reference in New Issue
Block a user