Skip to content

Commit

Permalink
Declare fields of AC_TARGET as optional
Browse files Browse the repository at this point in the history
Only one of name, group and cert is allowed.
According to RFC 3281, the AC target should be a choice between the
three fields, but apparently VOMS traditionally implements it as three
optional fields.
The change fixes the parsing on the client side. How the server behaves
needs to be checked.

Fix #102
  • Loading branch information
giacomini committed Dec 1, 2022
1 parent 8e99bb9 commit 08e8041
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ac/newformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ ASN1_SEQUENCE(AC_IETFATTR) = {
IMPLEMENT_ASN1_FUNCTIONS(AC_IETFATTR)

ASN1_SEQUENCE(AC_TARGET) = {
ASN1_EXP(AC_TARGET, name, GENERAL_NAME, 0),
ASN1_EXP(AC_TARGET, group, GENERAL_NAME, 1),
ASN1_EXP(AC_TARGET, cert, AC_IS, 2),
ASN1_EXP_OPT(AC_TARGET, name, GENERAL_NAME, 0),
ASN1_EXP_OPT(AC_TARGET, group, GENERAL_NAME, 1),
ASN1_EXP_OPT(AC_TARGET, cert, AC_IS, 2),
} ASN1_SEQUENCE_END(AC_TARGET)

IMPLEMENT_ASN1_FUNCTIONS(AC_TARGET)
Expand Down

0 comments on commit 08e8041

Please sign in to comment.