Signs the filename with the certificate associated with this builder.
        
        :param      filename | <str>
        
        :return     <bool> | success

def sign(self, filename):
        """
        Signs the filename with the certificate associated with this builder.
        
        :param      filename | <str>
        
        :return     <bool> | success
        """
        sign = self.signcmd()
        certificate = self.certificate()
        if not sign:
            log.error('No signcmd defined.')
            return False
        elif not certificate and '{cert}' in sign:
            log.error('No sign certificated defined.')
            return False

        log.info('Signing {0}...'.format(filename))
        sign = os.path.expandvars(sign)
        filename = os.path.expandvars(filename)
        cert = os.path.expandvars(certificate)

        # let the previous process finish fully, or we might get some file errors
        time.sleep(2)
        return cmdexec(sign.format(filename=filename, cert=cert)) == 0