File: 2001_rand.patch

package info (click to toggle)
rust-mail-send 0.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 372 kB
  • sloc: makefile: 2; sh: 1
file content (28 lines) | stat: -rw-r--r-- 1,034 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: use older minor version of crate rand
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2024-09-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -36,7 +36,7 @@
 [dependencies]
 smtp-proto = { version = "0.2" }
 base64 = "0.22"
-rand = { version = "0.9", optional = true }
+rand = { version = "0.8.5", optional = true }
 md5 = { version = ">= 0.7, <= 0.8", optional = true }
 tokio = { version = "1.47", features = ["net", "io-util", "time"]}
 rustls = { version = "0.23", default-features = false, features = ["std"]}
--- a/src/smtp/auth.rs
+++ b/src/smtp/auth.rs
@@ -235,7 +235,7 @@
                     let cnonce = {
                         use rand::RngCore;
                         let mut buf = [0u8; 16];
-                        rand::rng().fill_bytes(&mut buf);
+                        rand::thread_rng().fill_bytes(&mut buf);
                         engine::general_purpose::STANDARD.encode(buf)
                     };