Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ocamlPackages.asn1-combinators: 0.1.3 -> 0.2.0 (#33566)
* ocamlPackages.asn1-combinators: 0.1.3 -> 0.2.0 * ocamlPackages.x509: 0.5.3 -> 0.6.0 * ocamlPackages.x509: 0.6.0 -> 0.6.1 * ocamlPackages.tls: 0.7.1 -> 0.9.0 * jackline: fix build with ocaml-tls ≥ 0.9.0
- Loading branch information
Showing
5 changed files
with
76 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
pkgs/applications/networking/instant-messengers/jackline/tls-0.9.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/cli/cli_config.ml b/cli/cli_config.ml | ||
index 991ee77..59a0edb 100644 | ||
--- a/cli/cli_config.ml | ||
+++ b/cli/cli_config.ml | ||
@@ -207,7 +207,9 @@ let configure term () = | ||
ask above "CA file: " (fun x -> x) (fun x -> if Sys.file_exists x then `Ok x else `Invalid) term >>= fun trust_anchor -> | ||
Lwt_unix.access trust_anchor [ Unix.F_OK ; Unix.R_OK ] >>= fun () -> | ||
X509_lwt.certs_of_pem trust_anchor >>= fun tas -> | ||
- (match X509.Validation.valid_cas ~time:(Unix.time ()) tas with | ||
+ let time = match Ptime.of_float_s (Unix.time ()) | ||
+ with Some time -> time | None -> assert false in | ||
+ (match X509.Validation.valid_cas ~time tas with | ||
| [] -> Lwt.fail (Invalid_argument "trust anchor file is empty!") | ||
| _ -> Lwt.return (`Trust_anchor trust_anchor)) | ||
| Some fp -> Lwt.return (`Fingerprint fp) ) >>= fun authenticator -> | ||
diff --git a/cli/cli_state.ml b/cli/cli_state.ml | ||
index d5db502..91540c9 100644 | ||
--- a/cli/cli_state.ml | ||
+++ b/cli/cli_state.ml | ||
@@ -262,7 +262,8 @@ module Connect = struct | ||
(match config.Xconfig.authenticator with | ||
| `Trust_anchor x -> X509_lwt.authenticator (`Ca_file x) | ||
| `Fingerprint fp -> | ||
- let time = Unix.gettimeofday () in | ||
+ let time = match Ptime.of_float_s (Unix.gettimeofday ()) | ||
+ with Some time -> time | None -> assert false in | ||
let fp = | ||
Nocrypto.Uncommon.Cs.of_hex | ||
(String.map (function ':' -> ' ' | x -> x) fp) |
24 changes: 18 additions & 6 deletions
24
pkgs/development/ocaml-modules/asn1-combinators/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters