signaturehash

package
v2.0.0-...-d117ae7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package signaturehash provides the SignatureHashAlgorithm as defined in TLS 1.2

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm struct {
	Hash      hash.Algorithm
	Signature signature.Algorithm
}

Algorithm is a signature/hash algorithm pairs which may be used in digital signatures.

https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1

func Algorithms

func Algorithms() []Algorithm

Algorithms are all the know SignatureHash Algorithms

func ParseSignatureSchemes

func ParseSignatureSchemes(sigs []tls.SignatureScheme, insecureHashes bool) ([]Algorithm, error)

ParseSignatureSchemes translates []tls.SignatureScheme to []signatureHashAlgorithm. It returns default signature scheme list if no SignatureScheme is passed.

func SelectSignatureScheme

func SelectSignatureScheme(sigs []Algorithm, privateKey crypto.PrivateKey) (Algorithm, error)

SelectSignatureScheme returns most preferred and compatible scheme.

Jump to

Keyboard shortcuts

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