)]}'
{
  "commit": "ccd665d2aa30375710957f3c357425fa10883613",
  "tree": "9ce0ed9994df92c1c8235a2162c5b88941b79451",
  "parents": [
    "5cb597e3ec19996f18a049c78cfa5e9e1a0da280"
  ],
  "author": {
    "name": "Bob Beck",
    "email": "bbe@google.com",
    "time": "Fri Jul 29 15:57:00 2022 -0600"
  },
  "committer": {
    "name": "Boringssl LUCI CQ",
    "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Fri Jul 29 22:12:19 2022 +0000"
  },
  "message": "Make time_t conversions. Give up on the OS provided ones.\n\nWe only care about dates within years 0000 to 9999 for\nRFC5280. timegm() is only semi-standard. Some things require the\nsetting awkward defines to get libc to give it to you. Other things\nlet you have it but make it stop working at year 3000. Still other\nthings have 32 bit time_t.....\n\nLet\u0027s just make our own that actually works. all the time, does\neverything with an int64_t, and fails if you want to send something\nout that would overflow a 32 bit time_t.\n\nIn the process of doing this, we get rid of the old Julian date stuff\nfrom OpenSSL, which while functional was a bit awkward dealing only\nwith days, and using the Julian calendar as the reference point instead of potentially something more useful. Julian seconds since Jan 1 1970\n00:00:00 UCT are much more useful to us than Julian days since a\nJulian epoch.\n\nThe OS implementations of timegm() and gmtime() also can be pretty\ncomplex, due to the nature of needing multiple timezone, daylight\nsaving, day of week, and other stuff we simply do not need for\ndoing things with certificate times. A small microbenchmark of\n10000000 of each operation comparing this implementation to\nthe system version on my M1 mac gives:\n\nbbe-macbookpro:tmp bbe$ time ./openssl_gmtime\n\nreal    0m0.152s\nuser    0m0.127s\nsys     0m0.018s\nbbe-macbookpro:tmp bbe$ time ./gmtime\n\nreal    0m0.422s\nuser    0m0.403s\nsys     0m0.014s\nbbe-macbookpro:tmp bbe$ time ./openssl_timegm\n\nreal    0m0.041s\nuser    0m0.015s\nsys     0m0.019s\nbbe-macbookpro:tmp bbe$ time ./timegm\n\nreal    0m30.432s\nuser    0m30.383s\nsys     0m0.040s\n\nSimilarly On a glinux machine:\n\nbbe@bbe-glinux1:~$ time ./openssl_gmtime\n\nreal    0m0.157s\nuser    0m0.152s\nsys     0m0.008s\nbbe@bbe-glinux1:~$ time ./gmtime\n\nreal    0m0.336s\nuser    0m0.336s\nsys     0m0.002s\nbbe@bbe-glinux1:~$ time ./openssl_timegm\n\nreal    0m0.018s\nuser    0m0.019s\nsys     0m0.002s\nbbe@bbe-glinux1:~$ time ./timegm\n\nreal    0m0.680s\nuser    0m0.671s\nsys     0m0.011s\nbbe@bbe-glinux1:~$\n\n\nBug: 501\n\nChange-Id: If445272d365f2c9673b5f3264d082af1a342e0a1\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/53245\nCommit-Queue: Bob Beck \u003cbbe@google.com\u003e\nReviewed-by: David Benjamin \u003cdavidben@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0af3ea7df670e74bb00f38fe7f1971ce8507f9c3",
      "old_mode": 33188,
      "old_path": "crypto/CMakeLists.txt",
      "new_id": "c49eeec0f18dd5d69a3da55558af11ac5ffe2a6b",
      "new_mode": 33188,
      "new_path": "crypto/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "2252118843af24bc0b87cf39796102587281d79b",
      "old_mode": 33188,
      "old_path": "crypto/asn1/a_time.c",
      "new_id": "50829690c1aab97d0bbd17c48642913456ab1cde",
      "new_mode": 33188,
      "new_path": "crypto/asn1/a_time.c"
    },
    {
      "type": "modify",
      "old_id": "ac6b5984839aa0a7caf36f1d40380c94e66a8d99",
      "old_mode": 33188,
      "old_path": "crypto/asn1/a_utctm.c",
      "new_id": "201c654327a362c2be100c86a53b2ab8983051f9",
      "new_mode": 33188,
      "new_path": "crypto/asn1/a_utctm.c"
    },
    {
      "type": "modify",
      "old_id": "9df309a5e81c68b938491df5367e70a46e8886ce",
      "old_mode": 33188,
      "old_path": "crypto/asn1/asn1_test.cc",
      "new_id": "ffb3e4a57a467e1a9e8a4dd508773fb3f8c4fd69",
      "new_mode": 33188,
      "new_path": "crypto/asn1/asn1_test.cc"
    },
    {
      "type": "modify",
      "old_id": "f8ca8fe11a2041731aedba7d254a766d8202b5d1",
      "old_mode": 33188,
      "old_path": "crypto/asn1/internal.h",
      "new_id": "3d78dd6365ff1fc96b117113e1080409545160bd",
      "new_mode": 33188,
      "new_path": "crypto/asn1/internal.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "81fbe8331891c9e62713203e7a983fa65433b200",
      "new_mode": 33188,
      "new_path": "crypto/asn1/posix_time.c"
    },
    {
      "type": "delete",
      "old_id": "7929970bd974127f79a432b06e35c61ef5496fc4",
      "old_mode": 33188,
      "old_path": "crypto/asn1/time_support.c",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "e054629af10f8287ea085d74e53049618ef4fa01",
      "old_mode": 33188,
      "old_path": "crypto/x509/x509_vfy.c",
      "new_id": "f6089cd85e00da055b6938853ed59229a7acad1f",
      "new_mode": 33188,
      "new_path": "crypto/x509/x509_vfy.c"
    },
    {
      "type": "modify",
      "old_id": "5ae006444825a527d8c77c47bc6f3b9cc5e7c69b",
      "old_mode": 33188,
      "old_path": "include/openssl/asn1.h",
      "new_id": "b7dfed23908b3699048f392974aae701641fc55c",
      "new_mode": 33188,
      "new_path": "include/openssl/asn1.h"
    }
  ]
}
