File: Revert-Update-getrandom-and-bcrypt.patch

package info (click to toggle)
python-bcrypt 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 212 kB
  • sloc: python: 515; makefile: 19; sh: 4
file content (35 lines) | stat: -rw-r--r-- 918 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
29
30
31
32
33
34
35
From: Bastian Germann <bage@debian.org>
Date: Wed, 10 Sep 2025 16:22:10 +0200
Subject: Revert "Update getrandom and bcrypt (#966)"

This reverts commit 3181f2101ab370c73b1cbb83c38cb110e25d1fcb.
---
--- a/src/_bcrypt/Cargo.toml
+++ b/src/_bcrypt/Cargo.toml
@@ -7,11 +7,11 @@ publish = false
 
 [dependencies]
 pyo3 = { version = "0.23.5", features = ["abi3"] }
-bcrypt = "0.17"
+bcrypt = "0.15"
 bcrypt-pbkdf = "0.10.0"
 base64 = "0.22.1"
 subtle = "2.6"
-getrandom = "0.3"
+getrandom = "0.2"
 
 [features]
 extension-module = ["pyo3/extension-module"]
diff --git a/src/_bcrypt/src/lib.rs b/src/_bcrypt/src/lib.rs
index a2bd012..127f2e7 100644
--- a/src/_bcrypt/src/lib.rs
+++ b/src/_bcrypt/src/lib.rs
@@ -46,7 +46,7 @@ fn gensalt<'p>(
     }
 
     let mut salt = [0; 16];
-    getrandom::fill(&mut salt).unwrap();
+    getrandom::getrandom(&mut salt).unwrap();
 
     let encoded_salt = BASE64_ENGINE.encode(salt);