![]() |
![]()
| ![]() |
![]()
NameOpenXPKI::Crypt::DN DescriptionHelper class to read, build, convert DNs between array/hash and string representations. AttributessequenceThe internal representation of the DN, must be set at the time of constructionand can not be updated later. The expected format is the DN structure as returned from Convert::ASN1 which is a list holding the DN components starting with the least significant element (usual the country). Each element of the list must be an array itself holding the RDNs as a hash: [ [ { 'value' => { 'utf8String' => 'DE' }, 'type' => '2.5.4.6' } ], [ { 'value' => { 'utf8String' => 'OpenXPKI' }, 'type' => '2.5.4.10' }, ], [ { 'type' => '2.5.4.3', 'value' => { 'utf8String' => 'Foobar' } }, { 'type' => '0.9.2342.19200300.100.1.1', 'value' => { 'utf8String' => 'foobar' } } ] ]; Methodsget_subjectReturns the subject as string according to RFC2253 (starting with CN) get_openssl_subjectReturns the subject as string in OpenSSL format (starting with /C=XX) as_hashReturns a hashref with the RDN types as keys, known OIDs are translated to their textual representation (see OpenXPKI::Role::SubjectOID). The values are lists holding the textual representation of the RNS components. To provide backwards compatibility with OpenXPKI::DN all keys are in uppercase letters and the value elements are listed with the "most significant" item first. BuildersAll builder methods are static methods to the class and return a fresh instance of this class or undef in case the input can not be parsed. from_stringExpecting the DN as string in RFC2253 or OpenSSL format. Uses OpenXPKI::DN internally which has very limited support for special chars and will likely choke on values using plus signs or commas.
|