GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  OPENXPKI::DN (3)

.ds Aq ’

Name

OpenXPKI::DN - RFC 2253 compatible dn parsing with support for OpenSSL’s proprietary formatting rules.

CONTENTS

Description

This module was designed to implement a fast parser for RFC 2253 distinguished names. It was designed to output RFC 2253 compliant and OpenSSL formatted DNs. Additionally you can get the parsed RDNs and the attributes in a hash (e.g. if you are looking for the organizational hierarchy via OUs).

Please note that OpenSSL formatted DNs can not be parsed unambigously. This is because ’/’ is a perfectly valid character within an RDN but is used to separate them as well. Avoid getting OpenSSL DNs from OpenSSL or other applications whenever possible, as this parsing problem might lead to security issues.

Initialization

    new

The ’new’ constructor expects a RFC 2253 or OpenSSL DN as its only argument. The type of the DN will be detected from the first character. OpenSSL’s DNs always begin with a leading slash /.

The return value is an object reference to the used instance of OpenXPKI::DN.

    convert_openssl_dn

This is a static function which requires an OpenSSL DN as argument. It returns a proper RFC 2253 DN. It is used by the ’new’ constructor to convert OpenSSL DNs but you can use it also if you don’t need a full parser (which is slower).

Output Functions

    get_parsed

returns a three-dimensional array. The first level is the number of the RDN, the second level is the number of the attribute and third level contains at [0] the name of the attribute and at [1] the value of the attribute.

    get_attributes

returns a two-dimensional array. The first level is the number of the RDN, the second level is the number of the attribute. The value is the attribute name and value concatenated with an equal sign =.

    get_rdns

returns an array. The array values are completely prepared strings of the RDNs. This works for multi-valued RDNs too.

    get_rfc_2253_dn

returns the RFC 2253 DN.

    get_x500_dn

returns the RFC 2253 DN in reversed order. Something like X.500 style.

    get_openssl_dn

returns the DN in OpenSSL’s proprietary oneline format.

    get_hashed_content

returns a hash which contains the attribute names as keys. The value of each hashentry is an array with the values inside which were found in the DN.

    get_attribute_names

is a static function which returns all supported attribute names as a normal array. It is not relevant how you call this function.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 OPENXPKI::DN (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.