Documentation ¶
Overview ¶
package certinfo analyzes encoded keys and certificates
Index ¶
- func Cert(cert *x509.Certificate, r *Report) string
- func CertRequest(csr *x509.CertificateRequest, e *reportstyle.Style) string
- func CertStore(store []*x509.Certificate, r *Report) string
- func CertStores(stores [][]*x509.Certificate, r *Report) string
- func Decode(asciiBlock string, r *Report) string
- func DecodePem(block *pem.Block, r *Report) string
- func KeyPinBase64(cert *x509.Certificate) string
- func KeyPinRaw(cert *x509.Certificate) string
- func PrivateKey(k any, e *reportstyle.Style) string
- func PublicKey(k any, e *reportstyle.Style) string
- func ReportAsAnsi(asciiBlock string) string
- func ReportAsHTML(asciiBlock string) string
- func ReportAsMarkdown(asciiBlock string) string
- func ReportAsText(asciiBlock string) string
- func SanitizePEM(asciiBlock string) string
- func SshDecode(asciiBlock, eval string, e *reportstyle.Style) string
- func SshDecodeCert(key ssh.PublicKey, comment string, options []string, rest []byte, ...) string
- func SshDecodePk(keytype, dbaa string, e *reportstyle.Style) string
- type Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertRequest ¶
func CertRequest(csr *x509.CertificateRequest, e *reportstyle.Style) string
CertRequest analyzses an x509 csr
func CertStore ¶
func CertStore(store []*x509.Certificate, r *Report) string
CertStore analyzes one x509 cert store
func CertStores ¶
func CertStores(stores [][]*x509.Certificate, r *Report) string
CertStores analyzes an array of x509 cert stores
func KeyPinBase64 ¶
func KeyPinBase64(cert *x509.Certificate) string
KeyPinBase64 generates an base64 encoded keypin
func KeyPinRaw ¶
func KeyPinRaw(cert *x509.Certificate) string
KeyPinRaw generates an hex encoded keypin
func PrivateKey ¶
func PrivateKey(k any, e *reportstyle.Style) string
PrivateKey reports an PrivateKey struct
func PublicKey ¶
func PublicKey(k any, e *reportstyle.Style) string
PublicKey reports an PublicKey struct
func ReportAsAnsi ¶
ReportAsAnsi In : Parse any mixed ascii input. Out: Report any decodeable certificate details and clean re-encoded pem as Color Terminal Console Output
func ReportAsHTML ¶
ReportAsHTML In : Parse any mixed ascii input. Out: Report any decodeable certificate details as HTML Code and a clean re-encoded sanitized pem as post URL.
func ReportAsMarkdown ¶
ReportAsMarkdown In : Parse any mixed ascii input. Out: Report any decodeable certificate details as Markdown Code and a clean re-encoded sanitized pem as post URL.
func ReportAsText ¶
ReportAsText In : Parse any mixed ascii input. Out: Report any decodeable certificate details and clean re-encoded pem as Plain ASCII Text Output.
func SanitizePEM ¶
SanitizePEM In : Parse any mixed ascii input. Out: Sanitizes and clean re-encode any decodable certificate as new pem container.
func SshDecode ¶
func SshDecode(asciiBlock, eval string, e *reportstyle.Style) string
SshDecode decodes an ascii block ssh key
func SshDecodeCert ¶
func SshDecodeCert(key ssh.PublicKey, comment string, options []string, rest []byte, e *reportstyle.Style) string
SshDecodeCert decodes an ssh certificate
func SshDecodePk ¶
func SshDecodePk(keytype, dbaa string, e *reportstyle.Style) string
SshDecodePk decocdes ssh key for <any> keytype
Types ¶
type Report ¶
type Report struct { Summary bool // add summary view to report OpenSSL bool // add openssl view to report PEM bool // add clean re-encoded pem to report (pem sanitizer) PINOnly bool // output the base64 encoded keypin only PEMLink bool // add an URL link that posts the PEM to an external resource (eg. any pastebin clone) PEMPostURL string // the URL for PEMLink, if PEMLink = false, PEMURL will be ignored Style *reportstyle.Style // output report style (text,html,ansi-color-console, custom ...) }
Report structure