}
bool
-gss_eap_attr_ctx::initFromExistingContext(const gss_eap_attr_ctx *manager,
- const gss_eap_attr_provider *provider)
+gss_eap_attr_ctx::initFromExistingContext(const gss_eap_attr_ctx *manager)
{
- if (!gss_eap_attr_provider::initFromExistingContext(this, provider))
- return false;
-
for (unsigned int i = 0; i < ATTR_TYPE_MAX; i++) {
gss_eap_attr_provider *provider;
provider = m_providers[i];
if (provider != NULL) {
- if (!provider->initFromExistingContext(this, provider))
+ if (!provider->initFromExistingContext(this, manager->m_providers[i]))
return false;
}
}
}
bool
-gss_eap_attr_ctx::initFromGssContext(const gss_eap_attr_ctx *manager,
- const gss_cred_id_t cred,
+gss_eap_attr_ctx::initFromGssContext(const gss_cred_id_t cred,
const gss_ctx_id_t ctx)
{
- if (!gss_eap_attr_provider::initFromGssContext(this, cred, ctx))
- return false;
-
for (unsigned int i = 0; i < ATTR_TYPE_MAX; i++) {
gss_eap_attr_provider *provider;
}
bool
-gss_eap_attr_ctx::initFromBuffer(const gss_eap_attr_ctx *manager,
- const gss_buffer_t buffer)
+gss_eap_attr_ctx::initFromBuffer(const gss_buffer_t buffer)
{
unsigned int i;
bool ret;
return ret;
}
-
/*
* C wrappers
*/
*authenticated = 0;
*complete = 0;
- value->length = 0;
- value->value = NULL;
+ if (value != NULL) {
+ value->length = 0;
+ value->value = NULL;
+ }
if (display_value != NULL) {
display_value->length = 0;
display_value->value = NULL;
}
- *more = -1;
-
if (name->attrCtx == NULL)
return GSS_S_UNAVAILABLE;
try {
ctx = new gss_eap_attr_ctx();
- if (!ctx->initFromBuffer(NULL, buffer)) {
+ if (!ctx->initFromBuffer(buffer)) {
delete ctx;
return GSS_S_DEFECTIVE_TOKEN;
}
try {
if (in->attrCtx != NULL) {
ctx = new gss_eap_attr_ctx();
- if (!ctx->initFromExistingContext(NULL, in->attrCtx)) {
+ if (!ctx->initFromExistingContext(in->attrCtx)) {
delete ctx;
return GSS_S_FAILURE;
}
{
gss_eap_attr_ctx *ctx;
+ assert(gssCtx != GSS_C_NO_CONTEXT);
+
ctx = new gss_eap_attr_ctx();
- if (!ctx->initFromGssContext(NULL, gssCred, gssCtx)) {
+ if (!ctx->initFromGssContext(gssCred, gssCtx)) {
delete ctx;
return NULL;
}