Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
add RFC2377 name forms, update readme, gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Coretta authored and Jesse Coretta committed Oct 18, 2024
1 parent 97cab52 commit 305bd48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions internal/rfc2377/nf.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ type NameFormDefinitions []NameFormDefinition
type NameFormDefinition string

func (r NameFormDefinitions) Len() int {
return len(r)
return len(r)
}

var AllNameForms NameFormDefinitions
var (
var (
DomainNameForm,
DCOrgNameForm,
DCOrgUnitNameForm,
Expand All @@ -17,7 +17,7 @@ var (
)

func (r NameFormDefinition) String() string {
return string(r)
return string(r)
}

func init() {
Expand All @@ -31,12 +31,12 @@ func init() {
DCLNameForm = NameFormDefinition(`( 1.3.6.1.1.2.4 NAME 'dcLocalityNameForm' OC locality MUST dc X-ORIGIN 'RFC2377' )`)
UIDOrgPersonNameForm = NameFormDefinition(`( 1.3.6.1.1.2.5 NAME 'uidOrganizationalPersonNameForm' OC organizationalPerson MUST uid X-ORIGIN 'RFC2377' )`)

AllNameForms = NameFormDefinitions{
AllNameForms = NameFormDefinitions{
DomainNameForm,
DCOrgNameForm,
DCOrgUnitNameForm,
DCLNameForm,
UIDOrgPersonNameForm,
}
}

}
8 changes: 4 additions & 4 deletions internal/x501/nf.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ type NameFormDefinitions []NameFormDefinition
type NameFormDefinition string

func (r NameFormDefinitions) Len() int {
return len(r)
return len(r)
}

var AllNameForms NameFormDefinitions
var SubentryNameForm NameFormDefinition

func (r NameFormDefinition) String() string {
return string(r)
return string(r)
}

func init() {

SubentryNameForm = NameFormDefinition(`( 2.5.15.16 NAME 'subentryNameForm' OC subentry MUST cn X-ORIGIN 'X.501' )`)
AllNameForms = NameFormDefinitions{
AllNameForms = NameFormDefinitions{
SubentryNameForm,
}
}

}

0 comments on commit 305bd48

Please sign in to comment.