Documentation ¶
Index ¶
- Variables
- func BuildASN1ExtKeyUsageRequest(usage x509.ExtKeyUsage) (pkix.Extension, error)
- func BuildASN1KeyUsageRequest(usage x509.KeyUsage) (pkix.Extension, error)
- func BuildHLFExtension() (pkix.Extension, error)
- func EncodeX509Certificate(crt *x509.Certificate) []byte
- func EncodeX509CertificatesToPem(crts []*x509.Certificate) []string
- func ExtKeyUsageFromOID(oid asn1.ObjectIdentifier) (eku x509.ExtKeyUsage, ok bool)
- func MakeReceptorSAN(DNSNames []string, IPAddresses []net.IP, NodeIDs []string) (pkix.Extension, error)
- func OIDFromExtKeyUsage(eku x509.ExtKeyUsage) (oid asn1.ObjectIdentifier, ok bool)
- func ParseX509Certificate(contents []byte) (*x509.Certificate, error)
- func ParseX509CertificateBase64(b64Cert string) (*x509.Certificate, error)
- type OtherNameEncode
- type UTFString
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OIDExtensionKeyUsage = []int{2, 5, 29, 15} OIDExtensionExtendedKeyUsage = []int{2, 5, 29, 37} )
Copied from x509.go
View Source
var ( // OIDSubjectAltName is the OID for subjectAltName OIDSubjectAltName = asn1.ObjectIdentifier{2, 5, 29, 17} // OIDReceptorName is the OID for a Receptor node ID OIDReceptorName = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 2312, 19, 1} // OIDHLFExtension is the OID for the HLF extensions 1.2.3.4.5.6.7.8.1 OIDHLFExtension = asn1.ObjectIdentifier{1, 2, 3, 4, 5, 6, 7, 8, 1} )
Functions ¶
func BuildASN1ExtKeyUsageRequest ¶
func BuildASN1ExtKeyUsageRequest(usage x509.ExtKeyUsage) (pkix.Extension, error)
func BuildASN1KeyUsageRequest ¶
Adapted from x509.go
func BuildHLFExtension ¶
func EncodeX509Certificate ¶
func EncodeX509Certificate(crt *x509.Certificate) []byte
func EncodeX509CertificatesToPem ¶
func EncodeX509CertificatesToPem(crts []*x509.Certificate) []string
func ExtKeyUsageFromOID ¶
func ExtKeyUsageFromOID(oid asn1.ObjectIdentifier) (eku x509.ExtKeyUsage, ok bool)
func MakeReceptorSAN ¶
func MakeReceptorSAN(DNSNames []string, IPAddresses []net.IP, NodeIDs []string) (pkix.Extension, error)
MakeReceptorSAN generates a subjectAltName extension, optionally containing Receptor names
func OIDFromExtKeyUsage ¶
func OIDFromExtKeyUsage(eku x509.ExtKeyUsage) (oid asn1.ObjectIdentifier, ok bool)
OIDFromExtKeyUsage returns the ASN1 Identifier for a x509.ExtKeyUsage
func ParseX509Certificate ¶
func ParseX509Certificate(contents []byte) (*x509.Certificate, error)
func ParseX509CertificateBase64 ¶
func ParseX509CertificateBase64(b64Cert string) (*x509.Certificate, error)
Types ¶
type OtherNameEncode ¶
type OtherNameEncode struct { OID asn1.ObjectIdentifier Value UTFString `asn1:"tag:0"` }
OtherNameEncode is used for encoding the OtherName field of an x.509 subjectAltName
Click to show internal directories.
Click to hide internal directories.