1No::Worries::DN(3) User Contributed Perl Documentation No::Worries::DN(3)
2
3
4
6 No::Worries::DN - Distinguished Names handling without worries
7
9 use No::Worries::DN qw(dn_parse dn_string);
10
11 $dn = dn_parse("/C=US/O=Acme Corporation/CN=John Doe");
12 $string = dn_string($dn, No::Worries::DN::FORMAT_JAVA);
13
15 This module eases Distinguished Names (DNs) handling by providing
16 convenient functions to parse and convert DNs from and to different
17 formats. All the functions die() on error.
18
20 This module provides the following functions (none of them being
21 exported by default):
22
23 dn_parse(STRING)
24 parse a string containing DN information and return an array
25 reference
26
27 dn_string(DN, FORMAT)
28 convert the given parsed DN (an array reference) into a string of
29 the given format, this is somehow the opposite of dn_parse()
30
32 Here are the supported formats:
33
34 No::Worries::DN::FORMAT_RFC2253
35 this is the format defined by RFC 2253, for instance: "CN=John
36 Doe,O=Acme Corporation,C=US"
37
38 No::Worries::DN::FORMAT_JAVA
39 this is a variant of RFC 2253, with extra spaces, for instance:
40 "CN=John Doe, O=Acme Corporation, C=US"
41
42 No::Worries::DN::FORMAT_OPENSSL
43 this is the default format used by OpenSSL, for instance:
44 "/C=US/O=Acme Corporation/CN=John Doe"
45
47 No::Worries.
48
50 Lionel Cons <http://cern.ch/lionel.cons>
51
52 Copyright (C) CERN 2012-2019
53
54
55
56perl v5.38.0 2023-07-21 No::Worries::DN(3)