krb5: _krb5_principal_is_anonymous() helper API

Add _krb5_principal_is_anonymous() private API for checking if a principal is
anonymous or not. The third argument determines whether to match authenticated
anonymous, unauthenticated anonymous, or both types of principal.
This commit is contained in:
Luke Howard
2019-05-04 16:10:13 +10:00
committed by Jeffrey Altman
parent 4559618391
commit bcc90f1b87
8 changed files with 38 additions and 33 deletions

View File

@@ -402,4 +402,9 @@ struct krb5_plugin_data {
krb5_get_instance_func_t get_instance;
};
/* _krb5_principal_is_anonymous() */
#define KRB5_ANON_MATCH_AUTHENTICATED 1 /* authenticated with anon flag */
#define KRB5_ANON_MATCH_UNAUTHENTICATED 2 /* anonymous PKINIT */
#define KRB5_ANON_MATCH_ANY ( KRB5_ANON_MATCH_AUTHENTICATED | KRB5_ANON_MATCH_UNAUTHENTICATED )
#endif /* __KRB5_LOCL_H__ */