Documentation ¶
Index ¶
- Constants
- Variables
- func GetFullChain(entry *ct.LogEntry) [][]byte
- func IsPrecert(entry *ct.LogEntry) bool
- func MarshalRDNSequence(rdns RDNSequence) ([]byte, error)
- func MatchesWildcard(dnsName string, pattern string) bool
- func ReadSTHFile(path string) (*ct.SignedTreeHead, error)
- func VerifyConsistencyProof(proof ct.ConsistencyProof, first *ct.SignedTreeHead, second *ct.SignedTreeHead) bool
- func VerifyPrecertSCT(sct *ct.SignedCertificateTimestamp, precert ct.PreCert, ...) error
- func VerifyX509SCT(sct *ct.SignedCertificateTimestamp, cert []byte, verify *ct.SignatureVerifier) error
- func WriteProofFile(path string, proof ct.ConsistencyProof) error
- func WriteSTHFile(path string, sth *ct.SignedTreeHead) error
- type AttributeTypeAndValue
- type CertInfo
- type CertValidity
- type Certificate
- type CollapsedMerkleTree
- func (tree *CollapsedMerkleTree) Add(hash ct.MerkleTreeNode)
- func (tree *CollapsedMerkleTree) CalculateRoot() ct.MerkleTreeNode
- func (tree *CollapsedMerkleTree) GetSize() uint64
- func (tree *CollapsedMerkleTree) MarshalJSON() ([]byte, error)
- func (tree *CollapsedMerkleTree) UnmarshalJSON(b []byte) error
- type EntryInfo
- type Extension
- type Identifiers
- type LogInfo
- type LogInfoFile
- type PrecertInfo
- type ProcessCallback
- type RDNSequence
- type RelativeDistinguishedNameSET
- type Scanner
- func (s *Scanner) CheckConsistency(first *ct.SignedTreeHead, second *ct.SignedTreeHead) (bool, error)
- func (s *Scanner) GetSTH() (*ct.SignedTreeHead, error)
- func (s Scanner) Log(msg string)
- func (s *Scanner) MakeCollapsedMerkleTree(sth *ct.SignedTreeHead) (*CollapsedMerkleTree, error)
- func (s *Scanner) Scan(startIndex int64, endIndex int64, processCert ProcessCallback, ...) error
- func (s Scanner) Warn(msg string)
- type ScannerOptions
- type SubjectAltName
- type TBSCertificate
- func (tbs *TBSCertificate) GetExtension(id asn1.ObjectIdentifier) []Extension
- func (tbs *TBSCertificate) GetRawIssuer() []byte
- func (tbs *TBSCertificate) GetRawPublicKey() []byte
- func (tbs *TBSCertificate) GetRawSubject() []byte
- func (tbs *TBSCertificate) ParseBasicConstraints() (*bool, error)
- func (tbs *TBSCertificate) ParseIssuer() (RDNSequence, error)
- func (tbs *TBSCertificate) ParseSerialNumber() (*big.Int, error)
- func (tbs *TBSCertificate) ParseSubject() (RDNSequence, error)
- func (tbs *TBSCertificate) ParseSubjectAltNames() ([]SubjectAltName, error)
- func (tbs *TBSCertificate) ParseSubjectCommonNames() ([]string, error)
- func (tbs *TBSCertificate) ParseValidity() (*CertValidity, error)
Constants ¶
View Source
const ( FETCH_RETRIES = 10 FETCH_RETRY_WAIT = 1 )
View Source
const UnparsableDNSLabelPlaceholder = "<unparsable>"
Variables ¶
View Source
var DefaultLogs = []LogInfo{
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEfahLEimAoz2t01p3uMziiLOl/fHTDM0YDOhBRuiBARsV4UvxG2LdNgoIGLrtCzWE0J5APC2em4JlvR8EEEFMoA=="),
Url: "ct.googleapis.com/pilot",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1/TMabLkDpCjiupacAlP7xNi0I1JYP8bQFAHDG1xhtolSY1l4QgNRzRrvSe8liE+NPWHdjGxfx3JhTsN9x8/6Q=="),
Url: "ct.googleapis.com/aviator",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAkbFvhu7gkAW6MHSrBlpE1n4+HCFRkC5OLAjgqhkTH+/uzSfSl8ois8ZxAD2NgaTZe1M9akhYlrYkes4JECs6A=="),
Url: "ct1.digicert-ct.com/log",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIFsYyDzBi7MxCAC/oJBXK7dHjG+1aLCOkHjpoHPqTyghLpzA9BYbqvnV16mAw04vUjyYASVGJCUoI3ctBcJAeg=="),
Url: "ct.googleapis.com/rocketeer",
MMD: 86400,
},
{
Key: mustDecodeBase64("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv7UIYZopMgTTJWPp2IXhhuAf1l6a9zM7gBvntj5fLaFm9pVKhKYhVnno94XuXeN8EsDgiSIJIj66FpUGvai5samyetZhLocRuXhAiXXbDNyQ4KR51tVebtEq2zT0mT9liTtGwiksFQccyUsaVPhsHq9gJ2IKZdWauVA2Fm5x9h8B9xKn/L/2IaMpkIYtd967TNTP/dLPgixN1PLCLaypvurDGSVDsuWabA3FHKWL9z8wr7kBkbdpEhLlg2H+NAC+9nGKx+tQkuhZ/hWR65aX+CNUPy2OB9/u2rNPyDydb988LENXoUcMkQT0dU3aiYGkFAY0uZjD2vH97TM20xYtNQIDAQAB"),
Url: "ctserver.cnnic.cn",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAETtK8v7MICve56qTHHDhhBOuV4IlUaESxZryCfk9QbG9co/CqPvTsgPDbCpp6oFtyAHwlDhnvr7JijXRD9Cb2FA=="),
Url: "ct.googleapis.com/icarus",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEmyGDvYXsRJsNyXSrYc9DjHsIa2xzb4UR7ZxVoV6mrc9iZB7xjI6+NrOiwH+P/xxkRmOFG6Jel20q37hTh58rA=="),
Url: "ct.googleapis.com/skydiver",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEjicnerZVCXTrbEuUhGW85BXx6lrYfA43zro/bAna5ymW00VQb94etBzSg4j/KS/Oqf/fNN51D8DMGA2ULvw3AQ=="),
Url: "ctlog-gen2.api.venafi.com",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7+R9dC4VFbbpuyOL+yy14ceAmEf7QGlo/EmtYU6DRzwat43f/3swtLr/L8ugFOOt1YU/RFmMjGCL17ixv66MZw=="),
Url: "mammoth.ct.comodo.com",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8m/SiQ8/xfiHHqtls9m7FyOMBg4JVZY9CgiixXGz0akvKD6DEL8S0ERmFe9U4ZiA0M4kbT5nmuk3I85Sk4bagA=="),
Url: "sabre.ct.comodo.com",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEI3MQm+HzXvaYa2mVlhB4zknbtAT8cSxakmBoJcBKGqGwYS0bhxSpuvABM1kdBTDpQhXnVdcq+LSiukXJRpGHVg=="),
Url: "ct.googleapis.com/logs/argon2019",
MMD: 86400,
CertExpiryBegin: makeTime(1546300800),
CertExpiryEnd: makeTime(1577836800),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6Tx2p1yKY4015NyIYvdrk36es0uAc1zA4PQ+TGRY+3ZjUTIYY9Wyu+3q/147JG4vNVKLtDWarZwVqGkg6lAYzA=="),
Url: "ct.googleapis.com/logs/argon2020",
MMD: 86400,
CertExpiryBegin: makeTime(1577836800),
CertExpiryEnd: makeTime(1609459200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAETeBmZOrzZKo4xYktx9gI2chEce3cw/tbr5xkoQlmhB18aKfsxD+MnILgGNl0FOm0eYGilFVi85wLRIOhK8lxKw=="),
Url: "ct.googleapis.com/logs/argon2021",
MMD: 86400,
CertExpiryBegin: makeTime(1609459200),
CertExpiryEnd: makeTime(1640995200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzF05L2a4TH/BLgOhNKPoioYCrkoRxvcmajeb8Dj4XQmNY+gxa4Zmz3mzJTwe33i0qMVp+rfwgnliQ/bM/oFmhA=="),
Url: "ct2.digicert-ct.com/log",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEkZHz1v5r8a9LmXSMegYZAg4UW+Ug56GtNfJTDNFZuubEJYgWf4FcC5D+ZkYwttXTDSo4OkanG9b3AI4swIQ28g=="),
Url: "ct.cloudflare.com/logs/nimbus2019",
MMD: 86400,
CertExpiryBegin: makeTime(1546300800),
CertExpiryEnd: makeTime(1577836800),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE01EAhx4o0zPQrXTcYjgCt4MVFsT0Pwjzb1RwrM0lhWDlxAYPP6/gyMCXNkOn/7KFsjL7rwk78tHMpY8rXn8AYg=="),
Url: "ct.cloudflare.com/logs/nimbus2020",
MMD: 86400,
CertExpiryBegin: makeTime(1577836800),
CertExpiryEnd: makeTime(1609459200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExpon7ipsqehIeU1bmpog9TFo4Pk8+9oN8OYHl1Q2JGVXnkVFnuuvPgSo2Ep+6vLffNLcmEbxOucz03sFiematg=="),
Url: "ct.cloudflare.com/logs/nimbus2021",
MMD: 86400,
CertExpiryBegin: makeTime(1609459200),
CertExpiryEnd: makeTime(1640995200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESLJHTlAycmJKDQxIv60pZG8g33lSYxYpCi5gteI6HLevWbFVCdtZx+m9b+0LrwWWl/87mkNN6xE0M4rnrIPA/w=="),
Url: "ct.cloudflare.com/logs/nimbus2022",
MMD: 86400,
CertExpiryBegin: makeTime(1640995200),
CertExpiryEnd: makeTime(1672531200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEi/8tkhjLRp0SXrlZdTzNkTd6HqmcmXiDJz3fAdWLgOhjmv4mohvRhwXul9bgW0ODgRwC9UGAgH/vpGHPvIS1qA=="),
Url: "ct.cloudflare.com/logs/nimbus2023",
MMD: 86400,
CertExpiryBegin: makeTime(1672531200),
CertExpiryEnd: makeTime(1704067200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEkZd/ow8X+FSVWAVSf8xzkFohcPph/x6pS1JHh7g1wnCZ5y/8Hk6jzJxs6t3YMAWz2CPd4VkCdxwKexGhcFxD9A=="),
Url: "yeti2019.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1546300800),
CertExpiryEnd: makeTime(1577836800),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEURAG+Zo0ac3n37ifZKUhBFEV6jfcCzGIRz3tsq8Ca9BP/5XUHy6ZiqsPaAEbVM0uI3Tm9U24RVBHR9JxDElPmg=="),
Url: "yeti2020.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1577836800),
CertExpiryEnd: makeTime(1609459200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6J4EbcpIAl1+AkSRsbhoY5oRTj3VoFfaf1DlQkfi7Rbe/HcjfVtrwN8jaC+tQDGjF+dqvKhWJAQ6Q6ev6q9Mew=="),
Url: "yeti2021.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1609459200),
CertExpiryEnd: makeTime(1640995200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEn/jYHd77W1G1+131td5mEbCdX/1v/KiYW5hPLcOROvv+xA8Nw2BDjB7y+RGyutD2vKXStp/5XIeiffzUfdYTJg=="),
Url: "yeti2022.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1640995200),
CertExpiryEnd: makeTime(1672531200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4hHIyMVIrR9oShgbQMYEk8WX1lmkfFKB448Gn93KbsZnnwljDHY6MQqEnWfKGgMOq0gh3QK48c5ZB3UKSIFZ4g=="),
Url: "nessie2020.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1577836800),
CertExpiryEnd: makeTime(1609459200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9o7AiwrbGBIX6Lnc47I6OfLMdZnRzKoP5u072nBi6vpIOEooktTi1gNwlRPzGC2ySGfuc1xLDeaA/wSFGgpYFg=="),
Url: "nessie2021.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1609459200),
CertExpiryEnd: makeTime(1640995200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEJyTdaAMoy/5jvg4RR019F2ihEV1McclBKMe2okuX7MCv/C87v+nxsfz1Af+p+0lADGMkmNd5LqZVqxbGvlHYcQ=="),
Url: "nessie2022.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1640995200),
CertExpiryEnd: makeTime(1672531200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEXu8iQwSCRSf2CbITGpUpBtFVt8+I0IU0d1C36Lfe1+fbwdaI0Z5FktfM2fBoI1bXBd18k2ggKGYGgdZBgLKTg=="),
Url: "nessie2023.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1672531200),
CertExpiryEnd: makeTime(1704067200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEfQ0DsdWYitzwFTvG3F4Nbj8Nv5XIVYzQpkyWsU4nuSYlmcwrAp6m092fsdXEw6w1BAeHlzaqrSgNfyvZaJ9y0Q=="),
Url: "yeti2023.ct.digicert.com/log",
MMD: 86400,
CertExpiryBegin: makeTime(1672531200),
CertExpiryEnd: makeTime(1704067200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeIPc6fGmuBg6AJkv/z7NFckmHvf/OqmjchZJ6wm2qN200keRDg352dWpi7CHnSV51BpQYAj1CQY5JuRAwrrDwg=="),
Url: "ct.googleapis.com/logs/argon2022",
MMD: 86400,
CertExpiryBegin: makeTime(1640995200),
CertExpiryEnd: makeTime(1672531200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0JCPZFJOQqyEti5M8j13ALN3CAVHqkVM4yyOcKWCu2yye5yYeqDpEXYoALIgtM3TmHtNlifmt+4iatGwLpF3eA=="),
Url: "ct.googleapis.com/logs/argon2023",
MMD: 86400,
CertExpiryBegin: makeTime(1672531200),
CertExpiryEnd: makeTime(1704067200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEchY+C+/vzj5g3ZXLY3q5qY1Kb2zcYYCmRV4vg6yU84WI0KV00HuO/8XuQqLwLZPjwtCymeLhQunSxgAnaXSuzg=="),
Url: "ct.googleapis.com/logs/xenon2023",
MMD: 86400,
CertExpiryBegin: makeTime(1672531200),
CertExpiryEnd: makeTime(1704067200),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEfzb42Zdr/h7hgqgDCo1vrNJqGqbcUvJGJEER9DDqp19W/wFSB0l166hD+U5cAXchpH8ZkBNUuvOHS0OnJ4oJrQ=="),
Url: "oak.ct.letsencrypt.org/2020",
MMD: 86400,
CertExpiryBegin: makeTime(1577836800),
CertExpiryEnd: makeTime(1609977600),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAELsYzGMNwo8rBIlaklBIdmD2Ofn6HkfrjK0Ukz1uOIUC6Lm0jTITCXhoIdjs7JkyXnwuwYiJYiH7sE1YeKu8k9w=="),
Url: "oak.ct.letsencrypt.org/2021",
MMD: 86400,
CertExpiryBegin: makeTime(1609459200),
CertExpiryEnd: makeTime(1641513600),
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEhjyxDVIjWt5u9sB/o2S8rcGJ2pdZTGA8+IpXhI/tvKBjElGE5r3de4yAfeOPhqTqqc+o7vPgXnDgu/a9/B+RLg=="),
Url: "oak.ct.letsencrypt.org/2022",
MMD: 86400,
CertExpiryBegin: makeTime(1640995200),
CertExpiryEnd: makeTime(1673049600),
},
}
View Source
var OpenLogs = []LogInfo{
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEfahLEimAoz2t01p3uMziiLOl/fHTDM0YDOhBRuiBARsV4UvxG2LdNgoIGLrtCzWE0J5APC2em4JlvR8EEEFMoA=="),
Url: "ct.googleapis.com/pilot",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIFsYyDzBi7MxCAC/oJBXK7dHjG+1aLCOkHjpoHPqTyghLpzA9BYbqvnV16mAw04vUjyYASVGJCUoI3ctBcJAeg=="),
Url: "ct.googleapis.com/rocketeer",
MMD: 86400,
},
{
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAELPXCMfVjQ2oWSgrewu4fIW4Sfh3lco90CwKZ061pvAI1eflh6c8ACE90pKM0muBDHCN+j0HV7scco4KKQPqq4A=="),
Url: "dodo.ct.comodo.com",
MMD: 86400,
},
}
Logs which accept submissions from anyone
View Source
var UnderwaterLogs = []LogInfo{
{
Description: "Google 'Submariner' log",
Key: mustDecodeBase64("MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOfifIGLUV1Voou9JLfA5LZreRLSUMOCeeic8q3Dw0fpRkGMWV0Gtq20fgHQweQJeLVmEByQj9p81uIW4QkWkTw=="),
Url: "ct.googleapis.com/submariner",
MMD: 86400,
},
}
Logs which monitor certs from distrusted roots
Functions ¶
func GetFullChain ¶
func MarshalRDNSequence ¶
func MarshalRDNSequence(rdns RDNSequence) ([]byte, error)
func MatchesWildcard ¶
func ReadSTHFile ¶
func ReadSTHFile(path string) (*ct.SignedTreeHead, error)
func VerifyConsistencyProof ¶
func VerifyConsistencyProof(proof ct.ConsistencyProof, first *ct.SignedTreeHead, second *ct.SignedTreeHead) bool
func VerifyPrecertSCT ¶
func VerifyPrecertSCT(sct *ct.SignedCertificateTimestamp, precert ct.PreCert, verify *ct.SignatureVerifier) error
func VerifyX509SCT ¶
func VerifyX509SCT(sct *ct.SignedCertificateTimestamp, cert []byte, verify *ct.SignatureVerifier) error
func WriteProofFile ¶
func WriteProofFile(path string, proof ct.ConsistencyProof) error
func WriteSTHFile ¶
func WriteSTHFile(path string, sth *ct.SignedTreeHead) error
Types ¶
type AttributeTypeAndValue ¶
type AttributeTypeAndValue struct { Type asn1.ObjectIdentifier Value asn1.RawValue }
type CertInfo ¶
type CertInfo struct { TBS *TBSCertificate Subject RDNSequence SubjectParseError error Issuer RDNSequence IssuerParseError error SANs []SubjectAltName SANsParseError error SerialNumber *big.Int SerialNumberParseError error Validity *CertValidity ValidityParseError error IsCA *bool IsCAParseError error }
func MakeCertInfoFromRawCert ¶
func MakeCertInfoFromRawTBS ¶
func MakeCertInfoFromTBS ¶
func MakeCertInfoFromTBS(tbs *TBSCertificate) *CertInfo
func (*CertInfo) ParseIdentifiers ¶
func (cert *CertInfo) ParseIdentifiers() (*Identifiers, error)
func (*CertInfo) PubkeyHash ¶
func (*CertInfo) PubkeyHashBytes ¶
type Certificate ¶
type Certificate struct { Raw asn1.RawContent TBSCertificate asn1.RawValue SignatureAlgorithm asn1.RawValue SignatureValue asn1.RawValue }
func ParseCertificate ¶
func ParseCertificate(certBytes []byte) (*Certificate, error)
func (*Certificate) GetRawTBSCertificate ¶
func (cert *Certificate) GetRawTBSCertificate() []byte
func (*Certificate) ParseTBSCertificate ¶
func (cert *Certificate) ParseTBSCertificate() (*TBSCertificate, error)
type CollapsedMerkleTree ¶
type CollapsedMerkleTree struct {
// contains filtered or unexported fields
}
func CloneCollapsedMerkleTree ¶
func CloneCollapsedMerkleTree(source *CollapsedMerkleTree) *CollapsedMerkleTree
func EmptyCollapsedMerkleTree ¶
func EmptyCollapsedMerkleTree() *CollapsedMerkleTree
func NewCollapsedMerkleTree ¶
func NewCollapsedMerkleTree(nodes []ct.MerkleTreeNode, size uint64) (*CollapsedMerkleTree, error)
func (*CollapsedMerkleTree) Add ¶
func (tree *CollapsedMerkleTree) Add(hash ct.MerkleTreeNode)
func (*CollapsedMerkleTree) CalculateRoot ¶
func (tree *CollapsedMerkleTree) CalculateRoot() ct.MerkleTreeNode
func (*CollapsedMerkleTree) GetSize ¶
func (tree *CollapsedMerkleTree) GetSize() uint64
func (*CollapsedMerkleTree) MarshalJSON ¶
func (tree *CollapsedMerkleTree) MarshalJSON() ([]byte, error)
func (*CollapsedMerkleTree) UnmarshalJSON ¶
func (tree *CollapsedMerkleTree) UnmarshalJSON(b []byte) error
type EntryInfo ¶
type EntryInfo struct { LogUri string Entry *ct.LogEntry IsPrecert bool FullChain [][]byte // first entry is logged X509 cert or pre-cert CertInfo *CertInfo ParseError error // set iff CertInfo is nil Identifiers *Identifiers IdentifiersParseError error Filename string Bygone bool }
func (*EntryInfo) Fingerprint ¶
func (*EntryInfo) FingerprintBytes ¶
func (*EntryInfo) HasParseErrors ¶
func (*EntryInfo) InvokeHookScript ¶
type Extension ¶
type Extension struct { Id asn1.ObjectIdentifier Critical bool `asn1:"optional"` Value []byte }
type Identifiers ¶
type Identifiers struct { DNSNames []string // stored as ASCII, with IDNs in Punycode IPAddrs []net.IP }
func NewIdentifiers ¶
func NewIdentifiers() *Identifiers
func (*Identifiers) AddCN ¶
func (ids *Identifiers) AddCN(value string)
func (*Identifiers) AddDnsSAN ¶
func (ids *Identifiers) AddDnsSAN(value []byte)
func (*Identifiers) AddIPAddress ¶
func (ids *Identifiers) AddIPAddress(value net.IP)
type LogInfo ¶
type LogInfoFile ¶
type LogInfoFile struct {
Logs []LogInfo `json:"logs"`
}
type PrecertInfo ¶
type PrecertInfo struct { SameIssuer bool // The pre-certificate was issued from the same CA as the final certificate Issuer []byte // The pre-certificate's issuer, if different from the final certificate AKI []byte // The pre-certificate's AKI, if present and different from the final certificate }
func ValidatePrecert ¶
func ValidatePrecert(precertBytes []byte, tbsBytes []byte) (*PrecertInfo, error)
type ProcessCallback ¶
type RDNSequence ¶
type RDNSequence []RelativeDistinguishedNameSET
func CanonicalizeRDNSequence ¶
func CanonicalizeRDNSequence(oldSequence RDNSequence) (RDNSequence, error)
func ParseRDNSequence ¶
func ParseRDNSequence(rdnsBytes []byte) (RDNSequence, error)
func (RDNSequence) ParseCNs ¶
func (rdns RDNSequence) ParseCNs() ([]string, error)
func (RDNSequence) String ¶
func (rdns RDNSequence) String() string
type RelativeDistinguishedNameSET ¶
type RelativeDistinguishedNameSET []AttributeTypeAndValue
type Scanner ¶
type Scanner struct { // Base URI of CT log LogUri string LogId []byte // contains filtered or unexported fields }
Scanner is a tool to scan all the entries in a CT Log.
func NewScanner ¶
func NewScanner(logUri string, logId []byte, publicKey crypto.PublicKey, opts *ScannerOptions) *Scanner
Creates a new Scanner instance using |client| to talk to the log, and taking configuration options from |opts|.
func (*Scanner) CheckConsistency ¶
func (s *Scanner) CheckConsistency(first *ct.SignedTreeHead, second *ct.SignedTreeHead) (bool, error)
func (*Scanner) MakeCollapsedMerkleTree ¶
func (s *Scanner) MakeCollapsedMerkleTree(sth *ct.SignedTreeHead) (*CollapsedMerkleTree, error)
func (*Scanner) Scan ¶
func (s *Scanner) Scan(startIndex int64, endIndex int64, processCert ProcessCallback, tree *CollapsedMerkleTree) error
type ScannerOptions ¶
type ScannerOptions struct { // Number of entries to request in one batch from the Log BatchSize int // Number of concurrent proecssors to run NumWorkers int // Don't print any status messages to stdout Quiet bool }
ScannerOptions holds configuration options for the Scanner
func DefaultScannerOptions ¶
func DefaultScannerOptions() *ScannerOptions
Creates a new ScannerOptions struct with sensible defaults
type SubjectAltName ¶
func (SubjectAltName) String ¶
func (san SubjectAltName) String() string
type TBSCertificate ¶
type TBSCertificate struct { Raw asn1.RawContent Version int `asn1:"optional,explicit,default:1,tag:0"` SerialNumber asn1.RawValue SignatureAlgorithm asn1.RawValue Issuer asn1.RawValue Validity asn1.RawValue Subject asn1.RawValue PublicKey asn1.RawValue UniqueId asn1.BitString `asn1:"optional,tag:1"` SubjectUniqueId asn1.BitString `asn1:"optional,tag:2"` Extensions []Extension `asn1:"optional,explicit,tag:3"` }
func ParseTBSCertificate ¶
func ParseTBSCertificate(tbsBytes []byte) (*TBSCertificate, error)
func ReconstructPrecertTBS ¶
func ReconstructPrecertTBS(tbs *TBSCertificate) (*TBSCertificate, error)
func (*TBSCertificate) GetExtension ¶
func (tbs *TBSCertificate) GetExtension(id asn1.ObjectIdentifier) []Extension
func (*TBSCertificate) GetRawIssuer ¶
func (tbs *TBSCertificate) GetRawIssuer() []byte
func (*TBSCertificate) GetRawPublicKey ¶
func (tbs *TBSCertificate) GetRawPublicKey() []byte
func (*TBSCertificate) GetRawSubject ¶
func (tbs *TBSCertificate) GetRawSubject() []byte
func (*TBSCertificate) ParseBasicConstraints ¶
func (tbs *TBSCertificate) ParseBasicConstraints() (*bool, error)
func (*TBSCertificate) ParseIssuer ¶
func (tbs *TBSCertificate) ParseIssuer() (RDNSequence, error)
func (*TBSCertificate) ParseSerialNumber ¶
func (tbs *TBSCertificate) ParseSerialNumber() (*big.Int, error)
func (*TBSCertificate) ParseSubject ¶
func (tbs *TBSCertificate) ParseSubject() (RDNSequence, error)
func (*TBSCertificate) ParseSubjectAltNames ¶
func (tbs *TBSCertificate) ParseSubjectAltNames() ([]SubjectAltName, error)
func (*TBSCertificate) ParseSubjectCommonNames ¶
func (tbs *TBSCertificate) ParseSubjectCommonNames() ([]string, error)
func (*TBSCertificate) ParseValidity ¶
func (tbs *TBSCertificate) ParseValidity() (*CertValidity, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
client
Package client is a CT log client implementation and contains types and code for interacting with RFC6962-compliant CT Log instances.
|
Package client is a CT log client implementation and contains types and code for interacting with RFC6962-compliant CT Log instances. |
Click to show internal directories.
Click to hide internal directories.