Skip to content

fix: reject empty certificate at DTLS 1.2 construction#102

Merged
algesten merged 1 commit intomainfrom
fix/101-reject-empty-certificate
Apr 23, 2026
Merged

fix: reject empty certificate at DTLS 1.2 construction#102
algesten merged 1 commit intomainfrom
fix/101-reject-empty-certificate

Conversation

@algesten
Copy link
Copy Markdown
Owner

Summary

  • Server::new and Client::new_from_hybrid now panic on empty certificate, restoring the pre-refactor CryptoContext::new fail-fast behaviour.
  • Adds a #[should_panic] regression test for Dtls::new_12 with an empty certificate.

Fixes #101.

Test plan

  • cargo test --all-features (full suite green, including new new_12_panics_on_empty_certificate)

Restore the pre-refactor fail-fast behaviour: constructing a DTLS 1.2
Server or Client with an empty certificate now panics at construction
instead of deferring the misconfiguration to handshake time.

Fixes #101
@xnorpx
Copy link
Copy Markdown
Collaborator

xnorpx commented Apr 23, 2026

lgtm

@algesten algesten merged commit a0698fe into main Apr 23, 2026
46 checks passed
@algesten algesten deleted the fix/101-reject-empty-certificate branch April 23, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Server12::new no longer rejects empty certificate at construction

2 participants