def issDotCom(inputDomain):
    cert=readDomain(inputDomain)
    x509_One=crypto.load_certificate(crypto.FILETYPE_PEM, cert)
	psl = PublicSuffixList(idna=True)
	Issuer_is_com= False
	j= 'com'
	if j in psl.get_tld(cert.get_issuer().CN):
		Issuer_is_com = True
	else:
		Issuer_is_com = False
	return Issuer_is_com 
def subDotCom(inputDomain):
    cert=readDomain(inputDomain)
    x509_One=crypto.load_certificate(crypto.FILETYPE_PEM, cert)
	psl = PublicSuffixList(idna=True)
	Subject_is_com= False
	j= 'com'
	if j in psl.get_tld(cert.get_subject().CN):
		Subject_is_com = True
	else:
		Subject_is_com = False
	return  Subject_is_com 
Example #3
0
def issueriscom():
	psl = PublicSuffixList(idna=True)
	x509 = readCert()
	Issuer_is_com=[]
	for cert in x509:
		k= False
		j= 'com'
		if j in psl.get_tld(cert.get_issuer().CN):
				 k = True
		else:
				 k=False
		Issuer_is_com.append(k)
	return Issuer_is_com
Example #4
0
def subjectiscom():
	psl = PublicSuffixList(idna=True)
	x509 = readCert()
	Subject_is_com=[]
	for cert in x509:
		i= False
		j= 'com'
		if j in psl.get_tld(cert.get_subject().CN):
				 i = True
		else:
				 i=False		 
		Subject_is_com.append(i)
	return Subject_is_com