Files
David NadobaandCory Benfield bc566f8884 Simplify the internal representation of RDN.Attribute.Value (#156)
* Simplify the internal representation of RDNAttribute.Value

Motivation

The 1.1.0 release included a patch (#154) that supported converting
RDNAttribute values into strings. This patch missed that the `.any`
case may also have strings in it.

While investigating this limitation, I realised that the constructor
function was excessively complex. While it attempted to coerce based
on extra information in the ASN.1 specification, it always fell back
into the `.any` case. This meant that as a practical matter we always
took the same few paths, and so could safely simplify the code.

Modifications

Simplify DER decoding of RDNAttribute.Values.
Introspect the .any cases for UTF8 strings and Printable strings
when converting to String.

Result

Faster construction, more flexible representation.

* normalise `RDN.Value.Storage` representation

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2023-12-05 16:15:19 -08:00
..
2023-06-20 01:51:53 -07:00