obsDiffCCADB

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// AllowLDAPCRLs determines whether or not to allow LDAP CR endpoints
	// into the CRL. Defaults to false.
	AllowLDAPCRLs = false
)
View Source
const (
	// EmptyArray is the CCADB's chosen representation of an empty collection.
	EmptyArray = "(not present)"
)

Variables

This section is empty.

Functions

func CSVToSlice

func CSVToSlice(c string) []string

CSVToSlice parses the provided CSV into a slice of strings.

func FmtDN

FmtDN formats the provide Organization struct into a single distinguished name string using the format "CN=%v, OU=%v, O=%v, C=%v". The distinguished name is constructed using the rules found at RFC1779 (https://tools.ietf.org/html/rfc1779). Double quotes are used as the escape mechanism, except in the case of double quotes themselves, which are escaped using a `\`. Refer to the following BNF outlined in section 2.3.

<name> ::= <name-component> ( <spaced-separator> )
       | <name-component> <spaced-separator> <name>

<spaced-separator> ::= <optional-space>
                <separator>
                <optional-space>

<separator> ::=  "," | ";"

<optional-space> ::= ( <CR> ) *( " " )

<name-component> ::= <attribute>
        | <attribute> <optional-space> "+"
          <optional-space> <name-component>

<attribute> ::= <string>
        | <key> <optional-space> "=" <optional-space> <string>

<key> ::= 1*( <keychar> ) | "OID." <oid> | "oid." <oid>
<keychar> ::= letters, numbers, and space

<oid> ::= <digitstring> | <digitstring> "." <oid>
<digitstring> ::= 1*<digit>
<digit> ::= digits 0-9

<string> ::= *( <stringchar> | <pair> )
         | '"' *( <stringchar> | <special> | <pair> ) '"'
         | "#" <hex>

<special> ::= "," | "=" | <CR> | "+" | "<" |  ">"
         | "#" | ";"

<pair> ::= "\" ( <special> | "\" | '"')
<stringchar> ::= any character except <special> or "\" or '"'

<hex> ::= 2*<hexchar>
<hexchar> ::= 0-9, a-f, A-F

func FmtMultivaluedRDN

func FmtMultivaluedRDN(rdn []string) string

FmtMultivaluedRDN performs any necessary escaping and concatenation of the provided string in order to make it a valid RDN field.

It returns the STRING "null" (not the null singleton) if the provided string is empty.

func FmtRDN

func FmtRDN(rdn string) string

FmtRDN performs any necessary escaping of the provided string in order to make it a valid RDN field.

It returns the STRING "null" (not the null singleton) if the provided string is empty.

func MapAlgorithm

func MapAlgorithm(key observatory.Key) string

MapAlgorithm maps the public key algorithm name from the CCADB format to the TLS Observatory's format.

func MapArray

func MapArray(a string) string

MapArray transforms the string representation of a CCADB array to the string representation of a TLS Observatory array.

func MapCRLs

func MapCRLs(c []string) string

MapCRLs trims the whitespace of each CR endpoint in the provided slice. If AllowLDAPCRLs is set to false, then LDAP CR endpoints are filtered from the return.

Returns the slice translated to a CSV string.

func MapExtendedKeyUsage

func MapExtendedKeyUsage(extendedKeyUsage string) string

MapExtendedKeyUsage transforms the CCADB EKU format and naming to the TLS Observatory's format and naming.

func MapSignature

func MapSignature(signature string) string

MapSignature maps the string describing the certificate's signature hash and encryption algorithm from the CCADB's enum set to the TLS Observatory's enum set.

func MapTechnicallyConstrained

func MapTechnicallyConstrained(t string) string

MapTechnicallyConstrained maps the strings "false" and "true" to the strings "0" and "1", respectively.

func MapTime

func MapTime(t time.Time) string

MapTime returns the string format of the provided Time using the TLS Observatory's time format.

func NormalizeIntermediate

func NormalizeIntermediate(intermediate ccadb.Certificate) *ccadb.Certificate

NormalizeIntermediate transforms the given CCADB intermediate certificate into the same formatting and style used by the TLS Observatory.

func NormalizeRoot

func NormalizeRoot(root ccadb.Certificate) *ccadb.Certificate

NormalizeRoot transforms the given CCADB root certificate into the same formatting and style used by the TLS Observatory.

func SliceToCSV

func SliceToCSV(s []string) string

SliceToCSV constructs a CSV string from the provided string slice.

func StripColons

func StripColons(s string) string

StripColons removes all colons. Typically from fingerprints.

func StripPEM

func StripPEM(p string) string

StripPEM removes all formatting from the given PEM string.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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