def initSigningStatus(self): #default path to check as file's path path = self.path #however for kexts, use their bundle # ->this avoids issue with where errSecCSInfoPlistFailed is returned when the kext's binary is checked if self.bundle and utils.isKext(self.bundle): #set path to bundle path = self.bundle #check the signature (status, self.signatureStatus, self.signingAuthorities) = utils.checkSignature(path, self.bundle) #check if 0 != status: #reset self.signatureStatus = None #reset self.signingAuthorities = [] return
def initSigningStatus(self): #signing info signingInfo = {} #default path to check as file's path path = self.path #however for kexts, use their bundle # ->this avoids issue with where errSecCSInfoPlistFailed is returned when the kext's binary is checked if self.bundle and utils.isKext(self.bundle): #set path to bundle path = self.bundle #check the signature (status, signingInfo) = utils.checkSignature(path, self.bundle) #on success # ->save into class var if 0 == status: #save sig status self.signatureStatus = signingInfo['status'] #save apple flag self.signedByApple = signingInfo['isApple'] #save authorities self.signingAuthorities = signingInfo['authorities'] return