Skip to content

Unhandled alert #491

Closed
ocaml/opam-repository
#26387
@reynir

Description

@reynir

While testing https://github.com/hannesm/ocaml-tls/tree/no-cstruct I discovered that openssl s_client sends an alert in a place where we don't handle it:

| _ -> Error (`Fatal `InvalidMessage))

The alert in question is fatal bad record mac. I attempted the following to get better error reporting, but I suspect it is not quite right.

     | Packet.ALERT ->
       let* alert = map_reader_error (Reader.parse_alert buf) in
       (match alert with
        | _, BAD_RECORD_MAC -> Error (`Fatal `MACMismatch)
        | _, _ -> Error (`Fatal `InvalidMessage))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions