Skip to content

put CERTIFICATE_UNKNOWN back #516

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

Merged
merged 1 commit into from
Aug 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/packet.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type alert_type =
| HANDSHAKE_FAILURE [@id 40] (*RFC5246*)
| BAD_CERTIFICATE [@id 42] (*RFC5246*)
| CERTIFICATE_EXPIRED [@id 45] (*RFC5246*)
| CERTIFICATE_UNKNOWN [@id 46] (*RFC5246*)
| DECODE_ERROR [@id 50] (*RFC5246*)
| PROTOCOL_VERSION [@id 70] (*RFC5246*)
| INAPPROPRIATE_FALLBACK [@id 86] (*draft-ietf-tls-downgrade-scsv*)
Expand All @@ -81,6 +82,7 @@ let alert_type_to_string = function
| HANDSHAKE_FAILURE -> "handshake failure"
| BAD_CERTIFICATE -> "bad certificate"
| CERTIFICATE_EXPIRED -> "certificate expired"
| CERTIFICATE_UNKNOWN -> "certificate unknown"
| DECODE_ERROR -> "decode error"
| PROTOCOL_VERSION -> "protocol version"
| INAPPROPRIATE_FALLBACK -> "inappropriate fallback"
Expand All @@ -100,6 +102,7 @@ let alert_type_to_int = function
| HANDSHAKE_FAILURE -> 40 (*RFC5246*)
| BAD_CERTIFICATE -> 42 (*RFC5246*)
| CERTIFICATE_EXPIRED -> 45 (*RFC5246*)
| CERTIFICATE_UNKNOWN -> 46 (*RFC5246*)
| DECODE_ERROR -> 50 (*RFC5246*)
| PROTOCOL_VERSION -> 70 (*RFC5246*)
| INAPPROPRIATE_FALLBACK -> 86 (*draft-ietf-tls-downgrade-scsv*)
Expand All @@ -118,6 +121,7 @@ and int_to_alert_type = function
| 40 -> HANDSHAKE_FAILURE
| 42 -> BAD_CERTIFICATE
| 45 -> CERTIFICATE_EXPIRED
| 46 -> CERTIFICATE_UNKNOWN
| 50 -> DECODE_ERROR
| 70 -> PROTOCOL_VERSION
| 86 -> INAPPROPRIATE_FALLBACK
Expand Down