subjhash

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package subjhash contains methods for replicating the functionality of `openssl x509 -subject_hash`.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCertificate = errors.New("invalid certificate")

ErrInvalidCertificate is returned when an invalid certificate is supplied.

Functions

This section is empty.

Types

type SubjHash

type SubjHash [4]byte

SubjHash is the certificate hash with fmt.Stringer interface support.

func Issuer

func Issuer(cert *x509.Certificate) (SubjHash, error)

Issuer takes a *x509.Certificate and returns the openssl 1.0.1+ compatible issuer_hash for the certificate.

func Subject

func Subject(cert *x509.Certificate) (SubjHash, error)

Subject takes a *x509.Certificate and returns the openssl 1.0.1+ compatible subject_hash for the certificate.

func (SubjHash) String

func (s SubjHash) String() string

Jump to

Keyboard shortcuts

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