/*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "gssapiP_eap.h"
+OM_uint32
+gss_map_name_to_any(OM_uint32 *minor,
+ gss_name_t name,
+ int authenticated,
+ gss_buffer_t type_id,
+ gss_any_t *output)
+{
+ OM_uint32 major;
+
+ *output = (gss_any_t)NULL;
+
+ if (name == GSS_C_NO_NAME) {
+ *minor = EINVAL;
+ return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME;
+ }
+
+ GSSEAP_MUTEX_LOCK(&name->mutex);
+
+ major = gssEapMapNameToAny(minor, name, authenticated, type_id, output);
+
+ GSSEAP_MUTEX_UNLOCK(&name->mutex);
+
+ return major;
+}