* Initialize a context from an existing context.
*/
bool
-gss_eap_attr_ctx::initFromExistingContext(const gss_eap_attr_ctx *manager)
+gss_eap_attr_ctx::initWithExistingContext(const gss_eap_attr_ctx *manager)
{
bool ret = true;
provider = m_providers[i];
- ret = provider->initFromExistingContext(this,
+ ret = provider->initWithExistingContext(this,
manager->m_providers[i]);
if (ret == false) {
releaseProvider(i);
* Initialize a context from a GSS credential and context.
*/
bool
-gss_eap_attr_ctx::initFromGssContext(const gss_cred_id_t cred,
+gss_eap_attr_ctx::initWithGssContext(const gss_cred_id_t cred,
const gss_ctx_id_t ctx)
{
bool ret = true;
provider = m_providers[i];
- ret = provider->initFromGssContext(this, cred, ctx);
+ ret = provider->initWithGssContext(this, cred, ctx);
if (ret == false) {
releaseProvider(i);
break;
provider = m_providers[type];
- ret = provider->initFromGssContext(this,
+ ret = provider->initWithGssContext(this,
GSS_C_NO_CREDENTIAL,
GSS_C_NO_CONTEXT);
if (ret == false) {
* Initialize a context from an exported context or name token
*/
bool
-gss_eap_attr_ctx::initFromBuffer(const gss_buffer_t buffer)
+gss_eap_attr_ctx::initWithBuffer(const gss_buffer_t buffer)
{
OM_uint32 major, minor;
bool ret;
try {
ctx = new gss_eap_attr_ctx();
- if (ctx->initFromBuffer(buffer)) {
+ if (ctx->initWithBuffer(buffer)) {
name->attrCtx = ctx;
major = GSS_S_COMPLETE;
*minor = 0;
try {
ctx = new gss_eap_attr_ctx();
- if (ctx->initFromExistingContext(in->attrCtx)) {
+ if (ctx->initWithExistingContext(in->attrCtx)) {
out->attrCtx = ctx;
major = GSS_S_COMPLETE;
*minor = 0;
return major;
try {
- ctx = new gss_eap_attr_ctx();
+ /* Set *pAttrContext here to for reentrancy */
+ *pAttrContext = ctx = new gss_eap_attr_ctx();
- if (ctx->initFromGssContext(gssCred, gssCtx)) {
+ if (ctx->initWithGssContext(gssCred, gssCtx)) {
+ *pExpiryTime = ctx->getExpiryTime();
major = GSS_S_COMPLETE;
*minor = 0;
} else {
major = ctx->mapException(minor, e);
}
- if (major == GSS_S_COMPLETE) {
- *pExpiryTime = ctx->getExpiryTime();
- *pAttrContext = ctx;
- }
-
- if (GSS_ERROR(major))
+ if (GSS_ERROR(major)) {
delete ctx;
+ *pAttrContext = NULL;
+ }
return major;
}