dn

package module
v0.0.0-...-e86f733 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 5 Imported by: 1

README

PkgGoDev Go

dn

This library provides an comparison of distinguished name described in RFC 5280 section-7 in Go.

Documentation

Overview

Package dn implements comparison of distinguished name described in RFC 5280( Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile) section-7

Comparison algorithm is following:

1) Check two distinguished names have the same number of RDNs, for each RDN in DN1 there is a matching RDN in DN2, and the matching RDNs appear in the same order in both DNs.

2) Check two relative distinguished names have the same number of naming attributes and for each naming attribute in RDN1 there is a matching naming attribute in RDN2.

  1. Check two naming attributes are the same types and the values of the attributes are matched. The rules for value of the attribute matching are: 3-1. If two naming attributes are domain component, then they are compared by case-insensitive exact match( RFC5280-section7.2, 7.3). 3-2. If both two naming attributes of values are encoded in UTF8String or PrintableString, then they are compared by caseIgnoreMatch( RFC4517section-4.2.11) after processing with the string preparation algorithm( RFC4518, RFC5280-section7.1). 3-3. If any other cases, then two naming attributes of values are compared by binary comparison( RFC5280-section7.1).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(issuer []byte, subject []byte) (result bool, err error)

Compare reports whether issuer and subject matches.

Types

This section is empty.

Jump to

Keyboard shortcuts

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