Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-mode: T6400: pki: unable to generate fingerprint for ACME issued certificates (backport #3518) #3520

Merged
merged 1 commit into from
May 26, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 26, 2024

Change Summary

This fixes (for and ACME generated certificate)

vyos@vyos:~$ show pki certificate vyos fingerprint sha512 Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/pki.py", line 1081, in <module>
    show_certificate_fingerprint(args.certificate, args.fingerprint)
  File "/usr/libexec/vyos/op_mode/pki.py", line 934, in show_certificate_fingerprint
    print(get_certificate_fingerprint(cert, hash))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/pki.py", line 76, in get_certificate_fingerprint
    fp = cert.fingerprint(hash_algorithm)
         ^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'fingerprint'

After the fix:

vyos@vyos# run show pki certificate vyos fingerprint sha256 10:2C:EF:2C:DA:7A:EE:C6:D7:8E:53:12:F0:F5:DE:B9:E9:D0:6C:B4:49:1C:8B:70:2B:D9:AF:FC:9B:75:A3:D2

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

PKI op-mode

Proposed changes

How to test

vyos@vyos:~$ show pki certificate vyos fingerprint sha256 

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

This is an automatic backport of pull request #3518 done by [Mergify](https://mergify.com).

…ertificates

This fixes (for and ACME generated certificate)

vyos@vyos:~$ show pki certificate vyos fingerprint sha512
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/pki.py", line 1081, in <module>
    show_certificate_fingerprint(args.certificate, args.fingerprint)
  File "/usr/libexec/vyos/op_mode/pki.py", line 934, in show_certificate_fingerprint
    print(get_certificate_fingerprint(cert, hash))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/pki.py", line 76, in get_certificate_fingerprint
    fp = cert.fingerprint(hash_algorithm)
         ^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'fingerprint'

After the fix:

vyos@vyos# run show pki certificate vyos fingerprint sha256
10:2C:EF:2C:DA:7A:EE:C6:D7:8E:53:12:F0:F5:DE:B9:E9:D0:6C:B4:49:1C:8B:70:2B:D9:AF:FC:9B:75:A3:D2

(cherry picked from commit b6ee07c)
@c-po c-po merged commit b35188d into sagitta May 26, 2024
6 checks passed
@mergify mergify bot deleted the mergify/bp/sagitta/pr-3518 branch May 26, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sagitta VyOS 1.4 LTS
Development

Successfully merging this pull request may close these issues.

3 participants