blob: 90d25d7db5255438b74edc723f2300dbf0f3f5c4 (
plain)
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
|
From f8e0f3a0035b44fa2541e2c447ed1599f220c4b5 Mon Sep 17 00:00:00 2001
From: Alexander Shadchin <shadchin@yandex-team.com>
Date: Thu, 9 Apr 2026 12:22:29 +0300
Subject: [PATCH] Fix tests with new Python
---
src/ecdsa/der.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/ecdsa/der.py b/src/ecdsa/der.py
index 5d35d698..587d7852 100644
--- a/src/ecdsa/der.py
+++ b/src/ecdsa/der.py
@@ -464,12 +464,11 @@ def unpem(pem):
if isinstance(pem, text_type): # pragma: no branch
pem = pem.encode()
+ lines = (l.strip() for l in pem.split(b"\n"))
d = b"".join(
- [
- l.strip()
- for l in pem.split(b"\n")
- if l and not l.startswith(b"-----")
- ]
+ l
+ for l in lines
+ if l and not l.startswith(b"-----")
)
return base64.b64decode(d)
|