def verified_new_le_auto(get, tag, temp_dir):
 le_auto_dir = (environ.get('LE_AUTO_DIR_TEMPLATE', 'https://raw.githubusercontent.com/certbot/certbot/%s/letsencrypt-auto-source/') % tag)
 write(get((le_auto_dir + 'letsencrypt-auto')), temp_dir, 'letsencrypt-auto')
 write(get((le_auto_dir + 'letsencrypt-auto.sig')), temp_dir, 'letsencrypt-auto.sig')
 write(PUBLIC_KEY, temp_dir, 'public_key.pem')
 try:
  with open(devnull, 'w') as dev_null:
   check_call(['openssl', 'dgst', '-sha256', '-verify', join(temp_dir, 'public_key.pem'), '-signature', join(temp_dir, 'letsencrypt-auto.sig'), join(temp_dir, 'letsencrypt-auto')], stdout=dev_null, stderr=dev_null)
 except CalledProcessError as exc:
  raise ExpectedError("Couldn't verify signature of downloaded certbot-auto.", exc)

def verified_new_le_auto ( get , tag , temp_dir ) : le_auto_dir = ( environ . get ( 'LE_AUTO_DIR_TEMPLATE' , 'https://raw.githubusercontent.com/certbot/certbot/%s/letsencrypt-auto-source/' ) % tag ) write ( get ( ( le_auto_dir + 'letsencrypt-auto' ) ) , temp_dir , 'letsencrypt-auto' ) write ( get ( ( le_auto_dir + 'letsencrypt-auto.sig' ) ) , temp_dir , 'letsencrypt-auto.sig' ) write ( PUBLIC_KEY , temp_dir , 'public_key.pem' ) try : with open ( devnull , 'w' ) as dev_null : check_call ( [ 'openssl' , 'dgst' , '-sha256' , '-verify' , join ( temp_dir , 'public_key.pem' ) , '-signature' , join ( temp_dir , 'letsencrypt-auto.sig' ) , join ( temp_dir , 'letsencrypt-auto' ) ] , stdout = dev_null , stderr = dev_null ) except CalledProcessError as exc : raise ExpectedError ( "Couldn't verify signature of downloaded certbot-auto." , exc )
return the path to a verified .