Skip to content

Conversation

lionello
Copy link
Contributor

Per RFC 2253 attribute values can be empty:

attributeTypeAndValue = attributeType "=" attributeValue

attributeType = (ALPHA 1*keychar) / oid
keychar    = ALPHA / DIGIT / "-"

oid        = 1*DIGIT *("." 1*DIGIT)

attributeValue = string

string     = *( stringchar / pair )
             / "#" hexstring
             / QUOTATION *( quotechar / pair ) QUOTATION ; only from v2

where * is 0-or-more and 1* is 1-or-more.

In addition to fixing the AttributeTypeValue regex, to allow creation of a X500Name by object with empty string value, I call RDN.addByString as opposed to using the constructor (which parses multi-valued RDN strings which setByObject would never get).

This also addresses a breaking change introduced in 6.2.1 for values that have + in them: these suddenly got parsed as multi-value attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant