mirror of
				https://github.com/SSLMate/certspotter.git
				synced 2025-07-03 10:47:17 +02:00 
			
		
		
		
	Add IsPreCert to CertInfo
This commit is contained in:
		
							parent
							
								
									c9aaa2782f
								
							
						
					
					
						commit
						8c14597721
					
				@ -124,6 +124,7 @@ type CertInfo struct {
 | 
			
		||||
	ValidityParseError     error
 | 
			
		||||
	IsCA                   *bool
 | 
			
		||||
	IsCAParseError         error
 | 
			
		||||
	IsPreCert              bool
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func MakeCertInfoFromTBS(tbs *TBSCertificate) *CertInfo {
 | 
			
		||||
@ -135,6 +136,7 @@ func MakeCertInfoFromTBS(tbs *TBSCertificate) *CertInfo {
 | 
			
		||||
	info.SerialNumber, info.SerialNumberParseError = tbs.ParseSerialNumber()
 | 
			
		||||
	info.Validity, info.ValidityParseError = tbs.ParseValidity()
 | 
			
		||||
	info.IsCA, info.IsCAParseError = tbs.ParseBasicConstraints()
 | 
			
		||||
	info.IsPreCert = len(tbs.GetExtension(oidExtensionCTPoison)) > 0
 | 
			
		||||
 | 
			
		||||
	return info
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user