Skip to content

Stop using deprecated backend argument in cryptography #29454

@jiasli

Description

@jiasli

Per

cryptography stopped requiring the use of backend arguments in version 3.1 and deprecated their use in version 36.0. If you are on an older version that requires these arguments please view the appropriate documentation version or upgrade to the latest release.

Note that for forward compatibility backend is still silently accepted by functions that previously required it, but it is ignored and no longer documented.

A lot of code in Azure CLI (mainly keyvault module) still uses backend argument in cryptography:

pkey = load_pem_private_key(pem_data, pem_password, default_backend())

return public.public_key(default_backend())

The best practice is to bump cryptography to newer versions (>=3.1):

'cryptography',

and stop using deprecated backend argument, just in case cryptography totally removes backend one day.

Additional context
Related issue in Azure Python SDK repo: Azure/azure-sdk-for-python#36579

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions