Skip to content

Commit

Permalink
Fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elonen committed Jul 22, 2024
1 parent 61a17a4 commit b8f06f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TARGET_BINS := $(VENV)/bin/hsm-secrets

$(TARGET_BINS): $(VENV) $(PY_SRC) $(VENV)/bin/mypy
@echo "Verifying with mypy..."
$(VENV)/bin/mypy $(MODULE)
$(VENV)/bin/mypy $(MODULE) --ignore-missing-imports
@echo "Installing the application..."
$(PIP) install -e .
@echo ""
Expand Down
2 changes: 1 addition & 1 deletion hsm_secrets/ssh/openssh/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def verify_ssh_cert(cert: OpenSSHCertificate) -> bool:
data_to_verify = cert.make_signing_request()

encoded_sig_key = cert.encode_signature_key_as_string()
issuer = cert_for_ssh_pub_id(encoded_sig_key, ssh.SSHCertificateType.USER)
issuer = cert_for_ssh_pub_id(encoded_sig_key, cert_id=cert.cert_id, cert_type=ssh.SSHCertificateType.USER)

# Parse the signature format and signature data
sig_data = cert.signature
Expand Down
5 changes: 3 additions & 2 deletions hsm_secrets/ssh/openssh/ssh_certificate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def print_certificate_details(cert: OpenSSHCertificate) -> None:
print(f" Key Cipher: {cert.cert_cipher_string()}")
print(f" Key ID: {cert.key_id}")
print(f" ID: {cert.cert_id}")
print(f" Serial: {cert.serial}")
print(f" Nonce: {base64.b64encode(cert.nonce).decode('ascii')}")
print(f" Type: {cert.cert_type}")
Expand Down Expand Up @@ -81,7 +81,8 @@ def parsepub(args: argparse.Namespace) -> None:

cert = cert_for_ssh_pub_id(
file_contents,
ssh.SSHCertificateType.USER,
cert_id = args.pub_file,
cert_type = ssh.SSHCertificateType.USER,
principals=["basic_users", "admins"])

print("Parsed public key into a certificate:")
Expand Down

0 comments on commit b8f06f0

Please sign in to comment.