'Sign the original file (`file_path`), then move signed extension
file to the signed path (`signed_file_path`) on public storage. The
original file remains on private storage.
Return the signed file size.'

def sign_file(self):

    if (not self.extension.uuid):
        raise SigningError('Need    uuid    to    be    set    to    sign')
    if (not self.pk):
        raise SigningError('Need    version    pk    to    be    set    to    sign')
    if self.extension.is_blocked():
        raise SigningError('Trying    to    signed    a    blocked    extension')
    ids = json.dumps({'id': self.extension.uuid, 'version': self.pk})
    with statsd.timer('extensions.sign'):
        try:
            sign_app(private_storage.open(self.file_path), self.signed_file_path, ids)
        except SigningError:
            log.info(('[ExtensionVersion:%s]    Signing    failed' % self.pk))
            self.remove_public_signed_file()
            raise
    return public_storage.size(self.signed_file_path)
