Implement SHA256 fingerprints for TLS certificate trust #2070
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement SHA256 Fingerprints for TLS Certificate Trust
Summary
This PR implements SHA256 fingerprint support for TLS certificate verification, replacing the deprecated SHA1 algorithm. This enhancement improves security and aligns with modern cryptographic standards.
Motivation
Changes Made
Core Implementation
1.
src/xmpp/connection.c_xmppcert_to_profcert()to useXMPP_CERT_FINGERPRINT_SHA2562.
src/command/cmd_defs.c/tlscommands to clarify fingerprint algorithm3.
src/ui/console.ccons_show_tlscert_summary()to display "Fingerprint (SHA256)"cons_show_tlscert()to display "Fingerprint (SHA256)"4.
src/command/cmd_funcs.cDocumentation
5.
README.md6.
CHANGELOGSecurity Benefits
SHA256 vs SHA1
Use Cases Enhanced
Backward Compatibility
✅ Fully backward compatible:
Testing
Manual Testing Performed
/tls certcommand displays SHA256 fingerprint/tls trustadds certificate with SHA256 fingerprint/tls trustedlists certificates with SHA256 checksums/tls revokeremoves certificates by SHA256 fingerprintRecommended Testing
/tls always/tls trustedwith SHA256/tls revoke <sha256-fingerprint>Dependencies
XMPP_CERT_FINGERPRINT_SHA256constant from libstropheMigration Path
For Users
For Developers
Files Changed
Checklist
References
Screenshots
Before (SHA1)
After (SHA256)
Additional Notes
This implementation:
Related Issues
This PR addresses:
Thank you for reviewing this PR! This enhancement strengthens Profanity's security while maintaining the excellent user experience the project is known for.