Airflow: pgpy encrypt gives NotImplementedError: PubKeyAlgorithm.RSAEncrypt error

36 Views Asked by At

If I execute the following in AWS managed Airflow:


import pgpy
public_key = r'/encryption/pubkey.asc'
key_public, _ = pgpy.PGPKey.from_file(public_key)
key_public._require_usage_flags = False
message = pgpy.PGPMessage.new("42 is quite a pleasant number")
encrypted_message = key_public.encrypt(message)

I get the following error: NotImplementedError: PubKeyAlgorithm.RSAEncrypt

Anybody has any ideas why this is happening?

I expected the content to encrypt

0

There are 0 best solutions below