rfc2253

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package rfc2253 does Name manipulation for RFC2253 names. It parses * names as used by OpenSSL (/OU=IT/CN=hans), and names as used by other * x509 tools (CN=hans, OU=IT).

Index

Constants

View Source
const (
	CNlast  int = iota // least significant attribute right /C=…/…/CN=hans (like OpenSSL)
	CNfirst            // most significant attribute right CN=hans,…,C= (like RFC2253)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Name

type Name struct {
	pkix.Name
}

Name represents a pkix.Name

Country, Organization, OrganizationalUnit []string
// Locality, Province          []string
// StreetAddress, PostalCode   []string
// SerialNumber                string
// CommonName                  string

func Parse

func Parse(s string) (*Name, error)

func (Name) Text

func (n Name) Text(leader, sep string, order int) string

Text returns the name in the format given by the leader and the seperator. To get the "slashed" format, use n.Text("/", "/") for the comma separated one, use n.Text("", ",")

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL