upstream: github.com/mirleft/ocaml-tls
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use Result.Syntax instead of local let* bindings

Replace `let ( let* ) = Result.bind` with `open Result.Syntax` across
multiple packages: x509, tls, requests, ca-certs, cpio, jsonwt, matter,
tar, spake2, crypto, gpt, mbr.

The stdlib Result.Syntax module provides the same let* operator.

+8 -8
+7 -7
lib/config.ml
··· 361 361 supported_signature_algorithms) 362 362 | false, false -> Error (`Msg "ciphersuite list without RSA and EC keys") 363 363 in 364 - let ( let* ) = Result.bind in 364 + let open Result.Syntax in 365 365 match (ciphers, signature_algorithms) with 366 366 | None, None -> 367 367 let* sig_algs = default_sa_from_ciphers default_ciphers in ··· 417 417 else Ok (c, sa) 418 418 419 419 let validate_common config = 420 - let ( let* ) = Result.bind in 420 + let open Result.Syntax in 421 421 let v_min, v_max = config.protocol_versions in 422 422 if v_max < v_min then Error (`Msg "bad version range") 423 423 else ··· 486 486 487 487 let validate_certificate_chain = function 488 488 | s :: chain, priv -> ( 489 - let ( let* ) = Result.bind in 489 + let open Result.Syntax in 490 490 let pub = X509.Private_key.public priv in 491 491 let* () = 492 492 match pub with ··· 557 557 end) 558 558 559 559 let validate_server config = 560 - let ( let* ) = Result.bind in 560 + let open Result.Syntax in 561 561 let open Ciphersuite in 562 562 let usages = 563 563 List.fold_left ··· 639 639 Ok { config with ciphers } 640 640 641 641 let validate_keys_sig_algs config = 642 - let ( let* ) = Result.bind in 642 + let open Result.Syntax in 643 643 let _, v_max = config.protocol_versions in 644 644 if v_max = `TLS_1_2 || v_max = `TLS_1_3 then 645 645 let* certificate_chains = ··· 686 686 let client ~authenticator ?peer_name ?ciphers ?version ?signature_algorithms 687 687 ?reneg ?certificates ?cached_session ?cached_ticket ?ticket_cache 688 688 ?alpn_protocols ?groups ?ip () = 689 - let ( let* ) = Result.bind in 689 + let open Result.Syntax in 690 690 let* ciphers', groups = 691 691 ciphers_and_groups ?ciphers ?groups default_config.ciphers 692 692 in ··· 719 719 let server ?ciphers ?version ?signature_algorithms ?reneg ?certificates 720 720 ?acceptable_cas ?authenticator ?session_cache ?ticket_cache ?alpn_protocols 721 721 ?groups ?zero_rtt ?ip () = 722 - let ( let* ) = Result.bind in 722 + let open Result.Syntax in 723 723 let* ciphers', groups = 724 724 ciphers_and_groups ?ciphers ?groups default_config.ciphers 725 725 in
+1 -1
lib/engine.ml
··· 838 838 let channel_binding e = function 839 839 | `Tls_exporter -> Ok (export_key_material e "EXPORTER-Channel-Binding" 32) 840 840 | `Tls_server_endpoint -> 841 - let ( let* ) = Result.bind in 841 + let open Result.Syntax in 842 842 let* cert = 843 843 match (e.side, e.peer_certificate, e.own_certificate) with 844 844 | `Client, Some cert, _ -> Ok cert