Skip to content

Commit

Permalink
Fix more lints
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Feb 29, 2024
1 parent b0b5d38 commit 830f358
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pynitrokey/cli/nk3/piv.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ def generate_key(
key_data = key_data[1:]
public_x = int.from_bytes(key_data[:32], byteorder="big", signed=False)
public_y = int.from_bytes(key_data[32:], byteorder="big", signed=False)
public_numbers = ec.EllipticCurvePublicNumbers(
public_numbers_ecc = ec.EllipticCurvePublicNumbers(
public_x,
public_y,
cryptography.hazmat.primitives.asymmetric.ec.SECP256R1(),
)
public_key = public_numbers.public_key()
public_key_der = public_key.public_bytes(
public_key_ecc = public_numbers_ecc.public_key()
public_key_der = public_key_ecc.public_bytes(
serialization.Encoding.DER,
serialization.PublicFormat.SubjectPublicKeyInfo,
)
Expand All @@ -354,9 +354,9 @@ def generate_key(

modulus = int.from_bytes(modulus_data, byteorder="big", signed=False)
exponent = int.from_bytes(exponent_data, byteorder="big", signed=False)
public_numbers = rsa.RSAPublicNumbers(exponent, modulus)
public_key = public_numbers.public_key()
public_key_der = public_key.public_bytes(
public_numbers_rsa = rsa.RSAPublicNumbers(exponent, modulus)
public_key_rsa = public_numbers_rsa.public_key()
public_key_der = public_key_rsa.public_bytes(
serialization.Encoding.DER,
serialization.PublicFormat.SubjectPublicKeyInfo,
)
Expand Down

0 comments on commit 830f358

Please sign in to comment.