Documentation
¶
Index ¶
- Variables
- func BER2DER(ber []byte) ([]byte, error)
- func BadFormatGroup(data []byte) ([]byte, bool, error)
- func DecodeASN(data []byte) ([]ASNCertificateInformation, []ASNCertificateInformation, error)
- func DecodeIP(addrfamily []byte, addr asn1.BitString) (*net.IPNet, error)
- func DecodeIPMinMax(addrfamily []byte, addr asn1.BitString, max bool) (net.IP, error)
- func DecodeKeyAuthority(data []byte) ([]byte, error)
- func DecodeKeyIdentifier(data []byte) ([]byte, error)
- func DecryptSignatureRSA(signature []byte, pubKey *rsa.PublicKey) ([]byte, error)
- func DeleteLineEnd(line string) string
- func GetRangeIP(ipnet *net.IPNet) (net.IP, net.IP)
- func RSA_public_decrypt(pubKey *rsa.PublicKey, data []byte) []byte
- func ValidateASNCertificateList(list []ASNCertificateInformation, parent *RPKI_Certificate) ([]ASNCertificateInformation, []ASNCertificateInformation, ...)
- func ValidateIPCertificateList(list []IPCertificateInformation, parent *RPKI_Certificate) ([]IPCertificateInformation, []IPCertificateInformation, ...)
- func ValidateIPRoaCertificateList(entries []*ROA_Entry, cert *RPKI_Certificate) ([]*ROA_Entry, []*ROA_Entry, []*ROA_Entry)
- type ASN
- type ASNCertificateInformation
- type ASNRange
- type ASNull
- type Attribute
- type CMS
- type CmsSignedData
- type FileList
- type IPAddressNull
- type IPAddressRange
- type IPCertificateInformation
- type IPNet
- type Manifest
- type ManifestContent
- type ROA
- type ROAAddressFamily
- type ROAContent
- type ROAIPAddresses
- type ROA_Entry
- type RPKI_Certificate
- func (cert *RPKI_Certificate) IsASRangeInCertificate(min int, max int) (bool, bool)
- func (cert *RPKI_Certificate) IsIPRangeInCertificate(min net.IP, max net.IP) (bool, bool)
- func (cert *RPKI_Certificate) String() string
- func (cert *RPKI_Certificate) Validate(parent *RPKI_Certificate) error
- func (cert *RPKI_Certificate) ValidateASNCertificate(parent *RPKI_Certificate) ([]ASNCertificateInformation, []ASNCertificateInformation, ...)
- func (cert *RPKI_Certificate) ValidateIPCertificate(parent *RPKI_Certificate) ([]IPCertificateInformation, []IPCertificateInformation, ...)
- func (cert *RPKI_Certificate) ValidateTime(comp time.Time) error
- type RPKI_Manifest
- type RPKI_ROA
- type RPKI_TAL
- type SIA
- type SignatureDecoded
- type SignatureInner
- type SignedAttributesDigest
- type SignerInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IpAddrBlock = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1, 7} AutonomousSysIds = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1, 8} IpAddrBlockV2 = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1, 28} AutonomousSysIdsV2 = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1, 29} IpAddrAndASIdent = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1, 30} SubjectInfoAccess = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 7, 1, 11} SubjectKeyIdentifier = asn1.ObjectIdentifier{2, 5, 29, 14} AuthorityKeyIdentifier = asn1.ObjectIdentifier{2, 5, 29, 35} )
View Source
var ( MessageDigest = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 4} SigningTime = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 5} )
View Source
var (
RSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 1}
)
Functions ¶
func DecodeASN ¶
func DecodeASN(data []byte) ([]ASNCertificateInformation, []ASNCertificateInformation, error)
func DecodeIPMinMax ¶
func DecodeKeyAuthority ¶
func DecodeKeyIdentifier ¶
func DecryptSignatureRSA ¶
func DeleteLineEnd ¶
func ValidateASNCertificateList ¶
func ValidateASNCertificateList(list []ASNCertificateInformation, parent *RPKI_Certificate) ([]ASNCertificateInformation, []ASNCertificateInformation, []ASNCertificateInformation)
func ValidateIPCertificateList ¶
func ValidateIPCertificateList(list []IPCertificateInformation, parent *RPKI_Certificate) ([]IPCertificateInformation, []IPCertificateInformation, []IPCertificateInformation)
func ValidateIPRoaCertificateList ¶
func ValidateIPRoaCertificateList(entries []*ROA_Entry, cert *RPKI_Certificate) ([]*ROA_Entry, []*ROA_Entry, []*ROA_Entry)
Types ¶
type ASNCertificateInformation ¶
type ASNCertificateInformation interface { GetRange() (int, int, bool) IsASNInRange(int) (bool, bool) String() string }
func DecodeASIdentifier ¶
func DecodeASIdentifier(data asn1.RawValue) ([]ASNCertificateInformation, error)
type Attribute ¶
type Attribute struct { AttrType asn1.ObjectIdentifier AttrValue []asn1.RawValue `asn1:"set"` }
type CMS ¶
type CMS struct { OID asn1.ObjectIdentifier SignedData CmsSignedData `asn1:"explicit,tag:0"` }
func (*CMS) GetRPKICertificate ¶
func (cms *CMS) GetRPKICertificate() (*RPKI_Certificate, error)
type CmsSignedData ¶
type IPAddressNull ¶
type IPAddressNull struct {
Family uint8
}
func (*IPAddressNull) GetAfi ¶
func (ipan *IPAddressNull) GetAfi() uint8
func (*IPAddressNull) IsIPInRange ¶
func (ipan *IPAddressNull) IsIPInRange(ip net.IP) (bool, bool)
func (*IPAddressNull) String ¶
func (ipan *IPAddressNull) String() string
type IPAddressRange ¶
func (*IPAddressRange) GetAfi ¶
func (ipr *IPAddressRange) GetAfi() uint8
func (*IPAddressRange) IsIPInRange ¶
func (ipr *IPAddressRange) IsIPInRange(ip net.IP) (bool, bool)
func (*IPAddressRange) String ¶
func (ipr *IPAddressRange) String() string
type IPCertificateInformation ¶
type IPCertificateInformation interface { GetRange() (net.IP, net.IP, bool) IsIPInRange(net.IP) (bool, bool) String() string GetAfi() uint8 }
func DecodeIPAddressBlock ¶
func DecodeIPAddressBlock(data []byte) ([]IPCertificateInformation, error)
type Manifest ¶
type Manifest struct { OID asn1.ObjectIdentifier EContent asn1.RawValue `asn1:"tag:0,explicit,optional"` }
type ManifestContent ¶
type ROA ¶
type ROA struct { OID asn1.ObjectIdentifier EContent asn1.RawValue `asn1:"tag:0,explicit,optional"` }
type ROAAddressFamily ¶
type ROAAddressFamily struct { AddressFamily []byte Addresses []ROAIPAddresses }
type ROAContent ¶
type ROAContent struct { ASID int IpAddrBlocks []ROAAddressFamily }
type ROAIPAddresses ¶
type ROA_Entry ¶
func ConvertROAEntries ¶
func ConvertROAEntries(roacontent ROAContent) ([]*ROA_Entry, int, error)
type RPKI_Certificate ¶
type RPKI_Certificate struct { SubjectInformationAccess []SIA IPAddresses []IPCertificateInformation ASNums []ASNCertificateInformation ASNRDI []ASNCertificateInformation Certificate *x509.Certificate }
func DecodeCertificate ¶
func DecodeCertificate(data []byte) (*RPKI_Certificate, error)
func (*RPKI_Certificate) IsASRangeInCertificate ¶
func (cert *RPKI_Certificate) IsASRangeInCertificate(min int, max int) (bool, bool)
func (*RPKI_Certificate) IsIPRangeInCertificate ¶
func (*RPKI_Certificate) String ¶
func (cert *RPKI_Certificate) String() string
func (*RPKI_Certificate) Validate ¶
func (cert *RPKI_Certificate) Validate(parent *RPKI_Certificate) error
func (*RPKI_Certificate) ValidateASNCertificate ¶
func (cert *RPKI_Certificate) ValidateASNCertificate(parent *RPKI_Certificate) ([]ASNCertificateInformation, []ASNCertificateInformation, []ASNCertificateInformation)
func (*RPKI_Certificate) ValidateIPCertificate ¶
func (cert *RPKI_Certificate) ValidateIPCertificate(parent *RPKI_Certificate) ([]IPCertificateInformation, []IPCertificateInformation, []IPCertificateInformation)
func (*RPKI_Certificate) ValidateTime ¶
func (cert *RPKI_Certificate) ValidateTime(comp time.Time) error
type RPKI_Manifest ¶
type RPKI_Manifest struct { Certificate *RPKI_Certificate Content ManifestContent BadFormat bool InnerValid bool InnerValidityError error }
func DecodeManifest ¶
func DecodeManifest(data []byte) (*RPKI_Manifest, error)
type RPKI_ROA ¶
type RPKI_ROA struct { ASN int Entries []*ROA_Entry Certificate *RPKI_Certificate BadFormat bool SigningTime time.Time InnerValid bool InnerValidityError error Valids []*ROA_Entry Invalids []*ROA_Entry CheckParent []*ROA_Entry }
func (*RPKI_ROA) ValidateEntries ¶
func (*RPKI_ROA) ValidateIPRoaCertificate ¶
func (roa *RPKI_ROA) ValidateIPRoaCertificate(cert *RPKI_Certificate) ([]*ROA_Entry, []*ROA_Entry, []*ROA_Entry)
type RPKI_TAL ¶
type RPKI_TAL struct { URI string Algorithm x509.PublicKeyAlgorithm OID asn1.ObjectIdentifier PublicKey interface{} }
func (*RPKI_TAL) CheckCertificate ¶
func (tal *RPKI_TAL) CheckCertificate(cert *x509.Certificate) bool
type SIA ¶
type SIA struct { AccessMethod asn1.ObjectIdentifier GeneralName []byte `asn1:"tag:6"` }
type SignatureDecoded ¶
type SignatureDecoded struct { Inner SignatureInner Hash []byte }
type SignatureInner ¶
type SignatureInner struct {
OID asn1.ObjectIdentifier
}
type SignedAttributesDigest ¶
type SignedAttributesDigest struct {
SignedAttrs []Attribute `asn1:"set"`
}
Click to show internal directories.
Click to hide internal directories.