Skip to contentSkip to conversation

package/ca-certificates: bump version to 20230311

PATCH In review Daniel Lang 2 participants 3 messages Mar 16, 2023 – Mar 19, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/ca-certificates: bump version to 20230311

---
 ...2pem.py-make-cryptography-module-opt.patch | 10 ++++---
 ...2pem.py-Fix-compat-with-cryptography.patch | 29 -------------------
 package/ca-certificates/ca-certificates.hash  |  4 +--
 package/ca-certificates/ca-certificates.mk    |  4 +--
 4 files changed, 10 insertions(+), 37 deletions(-)
 delete mode 100644 package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch
package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch +6 -4
index b76c1bfd7f..ce6fa19e12 100644
@@ -14,6 +14,8 @@ cryptography Python module is there, we perform the check, otherwise
 the check is skipped.
 
 Signed-off-by: Thomas Petazzoni <[email protected]>
+[Daniel: update patch for 20230311]
+Signed-off-by: Daniel Lang <[email protected]>
 ---
  mozilla/certdata2pem.py | 18 ++++++++++--------
  1 file changed, 10 insertions(+), 8 deletions(-)
@@ -36,16 +38,16 @@ index ede23d4..a6261f8 100644
          if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]:
              continue
 
--        cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
--        if cert.not_valid_after < datetime.datetime.now():
+-        cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE']))
+-        if cert.not_valid_after < datetime.datetime.utcnow():
 -            print('!'*74)
 -            print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
 -            print('!'*74)
 +        try:
 +            from cryptography import x509
 +
-+            cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
-+            if cert.not_valid_after < datetime.datetime.now():
++            cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE']))
++            if cert.not_valid_after < datetime.datetime.utcnow():
 +                print('!'*74)
 +                print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
 +                print('!'*74)
package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch deleted +0 -29
deleted file mode 100644
index 0537da9224..0000000000
@@ -1,29 +0,0 @@
-From 5e493ca307a031e81528ceddb96f3da40bc062cf Mon Sep 17 00:00:00 2001
-From: Wataru Ashihara <[email protected]>
-Date: Wed, 2 Nov 2022 12:40:05 -0400
-Subject: [PATCH] mozilla/certdata2pem.py: Fix compat with cryptography > 3.0
-
-In newer cryptography packages, load_der_x509_certificate is enforced to be 'bytes' rather than currently used 'bytearray'.  This fixes that.
-
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008244
-Signed-off-by: Justin Wood <[email protected]>
----
- mozilla/certdata2pem.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mozilla/certdata2pem.py b/mozilla/certdata2pem.py
-index a6261f8..c0fa52c 100644
---- a/mozilla/certdata2pem.py
-+++ b/mozilla/certdata2pem.py
-@@ -122,7 +122,7 @@ for obj in objects:
-         try:
-             from cryptography import x509
-
--            cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
-+            cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE']))
-             if cert.not_valid_after < datetime.datetime.now():
-                 print('!'*74)
-                 print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
---
-2.38.1
-
package/ca-certificates/ca-certificates.hash +2 -2
index a1675b999e..b07ddb924f 100644
@@ -1,6 +1,6 @@
 # hashes from: $(CA_CERTIFICATES_SITE)/ca-certificates_$(CA_CERTIFICATES_VERSION).dsc :
-sha1  bce5a8fac45456dbebf256f3a812c6cd0a853e3e  ca-certificates_20211016.tar.xz
-sha256  2ae9b6dc5f40c25d6d7fe55e07b54f12a8967d1955d3b7b2f42ee46266eeef88  ca-certificates_20211016.tar.xz
+sha1  61ca9ac8493972dffd304a94f3cb2c63b3ac697e  ca-certificates_20230311.tar.xz
+sha256  83de934afa186e279d1ed08ea0d73f5cf43a6fbfb5f00874b6db3711c64576f3  ca-certificates_20230311.tar.xz
 
 # Locally computed
 sha256  e85e1bcad3a915dc7e6f41412bc5bdeba275cadd817896ea0451f2140a93967c  debian/copyright
package/ca-certificates/ca-certificates.mk +2 -2
index 0b6962ab7b..a31d3a35fd 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-CA_CERTIFICATES_VERSION = 20211016
+CA_CERTIFICATES_VERSION = 20230311
 CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz
-CA_CERTIFICATES_SITE = https://snapshot.debian.org/archive/debian/20211022T144903Z/pool/main/c/ca-certificates
+CA_CERTIFICATES_SITE = https://snapshot.debian.org/archive/debian/20230314T211539Z/pool/main/c/ca-certificates
 CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python3
 CA_CERTIFICATES_LICENSE = GPL-2.0+ (script), MPL-2.0 (data)
 CA_CERTIFICATES_LICENSE_FILES = debian/copyright

--
2.40.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw
Quoted 8 lines · On Thu, 16 Mar 2023 21:47:43 +0100 Daniel Lang <[email protected]> wrote:
---
 ...2pem.py-make-cryptography-module-opt.patch | 10 ++++---
 ...2pem.py-Fix-compat-with-cryptography.patch | 29 -------------------
 package/ca-certificates/ca-certificates.hash  |  4 +--
 package/ca-certificates/ca-certificates.mk    |  4 +--
 4 files changed, 10 insertions(+), 37 deletions(-)
 delete mode 100644 package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch

I didn't look carefully, but it doesn't apply here:

Applying patch #1757985 using "git am -s"
Description: package/ca-certificates: bump version to 20230311
Applying: package/ca-certificates: bump version to 20230311
error: patch failed: package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch:36
error: package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch: patch does not apply
error: patch failed: package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch:1
error: package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch: patch does not apply Patch failed at 0001 package/ca-certificates: bump version to 20230311
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'git am' failed with exit status 128

Does your patch apply on the master branch?

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 28 lines · Thomas Petazzoni
Quoted 8 lines · On Thu, 16 Mar 2023 21:47:43 +0100 Daniel Lang <[email protected]> wrote:
---
 ...2pem.py-make-cryptography-module-opt.patch | 10 ++++---
 ...2pem.py-Fix-compat-with-cryptography.patch | 29 -------------------
 package/ca-certificates/ca-certificates.hash  |  4 +--
 package/ca-certificates/ca-certificates.mk    |  4 +--
 4 files changed, 10 insertions(+), 37 deletions(-)
 delete mode 100644 package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch

I didn't look carefully, but it doesn't apply here:

Applying patch #1757985 using "git am -s"
Description: package/ca-certificates: bump version to 20230311
Applying: package/ca-certificates: bump version to 20230311
error: patch failed: package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch:36
error: package/ca-certificates/0001-mozilla-certdata2pem.py-make-cryptography-module-opt.patch: patch does not apply
error: patch failed: package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch:1
error: package/ca-certificates/0002-mozilla-certdata2pem.py-Fix-compat-with-cryptography.patch: patch does not apply Patch failed at 0001 package/ca-certificates: bump version to 20230311
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'git am' failed with exit status 128

Quoted 1 line

Does your patch apply on the master branch?

It does locally, but unfortunately my private email provider decided to start eating trailing white spaces. Will try to figure out how to stop it from doing that.

Steve's patch [1] is probably applied by then, but would still be helpful for the future.

Regards
Daniel

[1]: https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Quoted 2 lines

Thomas

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot