logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

timeless-mk-ca-bundle.patch (1866B)


  1. # SPDX-FileCopyrightText: 2023 Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>
  2. #
  3. # SPDX-License-Identifier: curl
  4. Disables checking current date in mk-ca-bundle script, so it produces
  5. reproducible bundles.
  6. diff -ru scripts/mk-ca-bundle.pl scripts/mk-ca-bundle.pl
  7. --- curl-8.5.0/scripts/mk-ca-bundle.pl
  8. +++ curl-8.5.0/scripts/mk-ca-bundle.pl
  9. @@ -499,19 +499,7 @@
  10. if($main_block) {
  11. push @precert, $_ if not /^#$/;
  12. if(/^# Not Valid After : (.*)/) {
  13. - my $stamp = $1;
  14. - use Time::Piece;
  15. - # Not Valid After : Thu Sep 30 14:01:15 2021
  16. - my $t = Time::Piece->strptime($stamp, "%a %b %d %H:%M:%S %Y");
  17. - my $delta = ($t->epoch - time()); # negative means no longer valid
  18. - if($delta < 0) {
  19. - $skipnum++;
  20. - report "Skipping: $main_block_name is not valid anymore" if ($opt_v);
  21. - $valid = 0;
  22. - }
  23. - else {
  24. - $valid = 1;
  25. - }
  26. + $valid = 1;
  27. }
  28. }
  29. next;
  30. @@ -573,24 +561,6 @@
  31. if($timestamp[12] ne "Z") {
  32. report "distrust date stamp is not using UTC";
  33. }
  34. - # Example date: 200617000000Z
  35. - # Means 2020-06-17 00:00:00 UTC
  36. - my $distrustat =
  37. - timegm($timestamp[10] . $timestamp[11], # second
  38. - $timestamp[8] . $timestamp[9], # minute
  39. - $timestamp[6] . $timestamp[7], # hour
  40. - $timestamp[4] . $timestamp[5], # day
  41. - ($timestamp[2] . $timestamp[3]) - 1, # month
  42. - "20" . $timestamp[0] . $timestamp[1]); # year
  43. - if(time >= $distrustat) {
  44. - # not trusted anymore
  45. - $skipnum++;
  46. - report "Skipping: $main_block_name is not trusted anymore" if ($opt_v);
  47. - $valid = 0;
  48. - }
  49. - else {
  50. - # still trusted
  51. - }
  52. }
  53. next;
  54. }