+ /* must acquire creds based on the actual mechs we want to try */
+ if (!mag_acquire_creds(req, cfg, actual_mechs,
+ GSS_C_BOTH, &acquired_cred, NULL)) {
+ goto done;
+ }
+
+ if (cred_usage == GSS_C_BOTH) {
+ /* must acquire with GSS_C_ACCEPT to get the server name */
+ if (!mag_acquire_creds(req, cfg, actual_mechs,
+ GSS_C_ACCEPT, &server_cred, NULL)) {
+ goto done;
+ }
+ } else {
+ server_cred = acquired_cred;
+ }
+