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 #3518

Merged
merged 1 commit into from
May 26, 2024

Conversation

c-po
Copy link
Member

@c-po c-po commented May 25, 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

…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
@c-po c-po requested a review from a team as a code owner May 25, 2024 19:56
@c-po c-po enabled auto-merge May 25, 2024 19:57
@c-po
Copy link
Member Author

c-po commented May 25, 2024

@Mergifyio backport sagitta

Copy link
Contributor

mergify bot commented May 25, 2024

backport sagitta

✅ Backports have been created

src/op_mode/pki.py Dismissed Show dismissed Hide dismissed
@c-po c-po merged commit b9cbf6c into vyos:current May 26, 2024
8 checks passed
c-po added a commit that referenced this pull request May 26, 2024
op-mode: T6400: pki: unable to generate fingerprint for ACME issued certificates (backport #3518)
@c-po c-po deleted the pki-t6400 branch May 26, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants