static int kdc_probe(OM_uint32 *minor, void *ctx, const char *realm) { struct ntlmkrb5 *c = ctx; krb5_error_code ret; unsigned flags; ret = krb5_digest_probe(c->context, rk_UNCONST(realm), c->id, &flags); if (ret) return ret; if ((flags & (1|2|4)) == 0) return EINVAL; return 0; }
int digest_probe(struct digest_probe_options *opt, int argc, char ** argv) { krb5_error_code ret; krb5_realm realm; unsigned flags; realm = opt->realm_string; if (realm == NULL) errx(1, "realm missing"); ret = krb5_digest_probe(context, realm, id, &flags); if (ret) krb5_err(context, 1, ret, "digest_probe"); printf("flags: %u\n", flags); return 0; }