x509ext

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package x509ext provides functions for (un)marshalling X.509 extensions not supported by the crypto/x509 package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalSubjectAltName

func MarshalSubjectAltName(san *SubjectAltName) (pkix.Extension, error)

MarshalSubjectAltName converts a SubjectAltName struct into a pkix.Extension.

Types

type PermanentIdentifier

type PermanentIdentifier struct {
	IdentifierValue string                `asn1:"utf8,optional"`
	Assigner        asn1.ObjectIdentifier `asn1:"optional"`
}

PermanentIdentifier represents an ASN.1 encoded "permanent identifier" as defined by RFC4043.

PermanentIdentifier ::= SEQUENCE {
    identifierValue    UTF8String OPTIONAL,
    assigner           OBJECT IDENTIFIER OPTIONAL
   }

https://datatracker.ietf.org/doc/html/rfc4043

type SubjectAltName

type SubjectAltName struct {
	DirectoryNames       []pkix.Name
	PermanentIdentifiers []PermanentIdentifier
}

SubjectAltName contains GeneralName variations not supported by the crypto/x509 package.

https://datatracker.ietf.org/doc/html/rfc5280

func ParseSubjectAltName

func ParseSubjectAltName(ext pkix.Extension) (*SubjectAltName, error)

ParseSubjectAltName parses a pkix.Extension into a SubjectAltName struct.

Jump to

Keyboard shortcuts

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