0

The gss_acquire_cred with default arguments always returns GSS_S_BAD_MECH. Anyone who got this working? or have tips?

OS is Redhat Linux 8.0 (Ootpa) and Kerberos 5 version 1.16.1 is installed.

I am using the following code:

......
gss_cred_id_t *server_creds;

maj_stat = gss_acquire_cred(&min_stat, GSS_C_NO_NAME , GSS_C_INDEFINITE ,
                              GSS_C_NULL_OID_SET, GSS_C_ACCEPT,
                              server_creds, NULL, NULL);
  if (maj_stat != GSS_S_COMPLETE)
  {
    switch (maj_stat)
    {
    case GSS_S_BAD_MECH:
      mydbgU("An unavailable mechanism has been requested.");
      break;
    case GSS_S_BAD_NAMETYPE:
      mydbgU("AThe type contained within the desired_name parameter is not supported.");
      break;
    case GSS_S_BAD_NAME:
      mydbgU("AThe value supplied for desired_name parameter is ill formed.");
      break;
    case GSS_S_CREDENTIALS_EXPIRED:
      mydbgU("AThe credentials could not be acquired because they have expired.");
      break;
    case GSS_S_NO_CRED:
      mydbgU("ANo credentials were found for the specified name.");
      break;
    case GSS_S_FAILURE:
      mydbgU("GSS_S_FAILURE");
      break;
    default:
      break;
    }
    return -1;
  }```



ekhanad
  • 154
  • 2
  • 8

0 Answers0