certutil

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 9 Imported by: 0

README

certutil

build-img pkg-img reportcard-img coverage-img

Go helpers around certificates.

Rationale

TODO

Features

  • Simple API.
  • Clean and tested code.
  • Dependency-free.

Install

Go version 1.17+

go get github.com/cristalhq/certutil

Example

TODO

Documentation

See these docs.

License

MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePublicKeys

func ComparePublicKeys(key1, key2 crypto.PublicKey) (bool, error)

ComparePublicKeys reports whether 2 public keys are equal, error if not comparable.

func KeySize

func KeySize(key interface{}) int

KeySize returns the key size in bits for a given crypto.PrivateKey or crypto.PublicKey. Returns -1 it key type is unsupported.

func ParseECDSA

func ParseECDSA(s string) (*ecdsa.PrivateKey, error)

ParseECDSA private key from a PEM formatted block.

func ParsePublicKey

func ParsePublicKey(s string) (crypto.PublicKey, error)

ParsePublicKey RSA and ECDSA public keys from a PEM formatted block.

func ParseRSA

func ParseRSA(s string) (*rsa.PrivateKey, error)

ParseRSA private key from a PEM formatted block.

func ParseX509

func ParseX509(s string) (*x509.Certificate, error)

ParseX509 certificate from a PEM formatted block.

Types

This section is empty.

Jump to

Keyboard shortcuts

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