cert

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cert provides helpers for reading PEM-encoded X.509 certificates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCN

func ReadCN(path string) (string, error)

ReadCN reads a PEM-encoded X.509 certificate at path and returns its Subject Common Name. Returns an error if the file cannot be read, contains no PEM block, or cannot be parsed as a certificate.

func SplitCN

func SplitCN(cn string) (clusterName, customerID string, err error)

SplitCN bisects a puppet certname on the first '.' and returns (clustername, customerid). Returns an error when no '.' is present or either component is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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