René's URL Explorer Experiment


Title: crypto: X509Certificate returns "Bad time value" instead of throwing for an unreadable validity time · Issue #67285 · nodejs/node · GitHub

Open Graph Title: crypto: X509Certificate returns "Bad time value" instead of throwing for an unreadable validity time · Issue #67285 · nodejs/node

X Title: crypto: X509Certificate returns "Bad time value" instead of throwing for an unreadable validity time · Issue #67285 · nodejs/node

Description: Version v26.13.0 (also v26.12.0 and main) Platform Linux ARCH 7.2.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 30 Oct 2026 14:32:40 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the bug? The certificate below is signed by a...

Open Graph Description: Version v26.13.0 (also v26.12.0 and main) Platform Linux ARCH 7.2.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 30 Oct 2026 14:32:40 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the b...

X Description: Version v26.13.0 (also v26.12.0 and main) Platform Linux ARCH 7.2.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 30 Oct 2026 14:32:40 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the b...

Opengraph URL: https://github.com/nodejs/node/issues/67285

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"crypto: X509Certificate returns \"Bad time value\" instead of throwing for an unreadable validity time","articleBody":"### Version\n\nv26.13.0 (also v26.12.0 and `main`)\n\n### Platform\n\n```text\nLinux ARCH 7.2.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 30 Oct 2026 14:32:40 +0000 x86_64 GNU/Linux\n```\n\n### Subsystem\n\ncrypto\n\n### What steps will reproduce the bug?\n\nThe certificate below is signed by a test CA; its `notAfter` is a well-formed UTCTime with an invalid hour (`261205994748Z`).\n\n```js\nconst { X509Certificate } = require('node:crypto');\n\nconst pem = `-----BEGIN CERTIFICATE-----\nMIIC5TCCAc2gAwIBAgIBAjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdUZXN0\nIENBMB4XDTI2MTEwNTIyNDc0OFoXDTI2MTIwNTk5NDc0OFowFjEUMBIGA1UEAwwL\nZXhhbXBsZS5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNayUE\nWSzK683fVdu/NUbXxjf/q6NEspMkAQapmQeWGERAZvs67X+WvnGrNyHVfRnZ1T2m\nkj+mSoRtUFkUsGS1lrQMxurmh2CFszK+U27gZwLCamBZ823kEV5rL9exmSzH7ySV\nLe+IX5IauVEONSaKhvng1iMZyp0wdnHaNiPbfznrz6kjxcA3QeymfN45E3pcxKcN\nL2HvGRRsMmZgK0X3kwOVrr9EBm+tfZtEwcc4NCdA5P2iFKiwGsiCP4UWQiXVpV5l\nrC9WuoY0nBWL+SrpBi/TUPpKezMJt4WhTAUKTd5mJkz4oxfcKs9kgq5AC3cyCFbq\npRXUGFDYn1HGJY0pAgMBAAGjQjBAMB0GA1UdDgQWBBRTRZOBbsiOaLkPQvNbIuca\n5QtLmDAfBgNVHSMEGDAWgBQioYz7xbMnzJE0zuCU33ABjrroEDANBgkqhkiG9w0B\nAQsFAAOCAQEAfCcZz4yPRjXukSTl3dXBEYTWAum8KEUiXpXpFGjMVJVZUp1cPUVz\nDen67I34xJ4EPiu9VAOOtgmPrBX+531h4fCsHiw1frWSwvDKzDEFs413TMSIUbI0\nEWEJeMkrwquPjhFAvzmzuCDr1pdDvLkAc2Bl+IpwaFKiCtTSJ9GRIvn4JDZoCXxB\nuNAQu8DSrkuGjKowpDGutOOGjA5dtp308dU13Ae4WFY4ABoTIjpqu8V6fx85Eucd\nz97SfIMwqcaWPkPWr0bMQwwaTrzYkNYCa+Zy5qk8hx7V1lcBlHBAMRK8NA2t6Ptj\nIh0JzM/oAu6BuPAsmq1FbAkXEiCrvq0V6A==\n-----END CERTIFICATE-----`;\n\nconst x = new X509Certificate(pem);\nconsole.log(x.validTo);                            // 'Bad time value'\nconsole.log(x.validToDate);                        // Invalid Date\nconsole.log(x.toLegacyObject().valid_to);          // 'Bad time value'\nconsole.log(Date.now() > new Date(x.validTo));     // false\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways, for a `notBefore` or `notAfter` that OpenSSL cannot convert to a date.\n\n### What is the expected behavior? Why is that the expected behavior?\n\n`validTo`/`validToDate` (and `validFrom`/`validFromDate`) throw, as `subjectAltName` does for a malformed extension since fd3c87ed43.\n\n\n### What do you see instead?\n\n`\"Bad time value\"` and `Invalid Date`, without an error. Comparisons with `Invalid Date` are always `false`, so a check such as\n`Date.now() > new Date(x.validTo)` treats the certificate as not expired.\n\n### Additional information\n\n`X509View::getValidFrom/getValidTo` in `deps/ncrypto/ncrypto.cc` write the string for unprintable times; before v26.12.1 it was the partial output of a failed `ASN1_TIME_print()`.\n\nRelated: #63265, which also covered the unpropagated `ASN1_TIME_print()` failure.","author":{"url":"https://github.com/ndossche","@type":"Person","name":"ndossche"},"datePublished":"2026-11-05T23:03:31Z","url":"https://github.com/nodejs/node/issues/67285"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:04b47c5d-4b8e-e41c-67ae-a319ea8dc3ec
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB9F0:1FA287:4423EA:5BE8B7:6AFBECFC
html-safe-nonced2137bbe967563f76804d5c39d2292fe0c4e3f30519ce3c28558b7db39f8543a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUYwOjFGQTI4Nzo0NDIzRUE6NUJFOEI3OjZBRkJFQ0ZDIiwidmlzaXRvcl9pZCI6Ijg2MDgyNTExODUxNzc1MTAzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8a3605d11c35076f8c061e5f7abf96b075f18a115c081afeff3a765086e328b8
hovercard-subject-tagissue:6233241229
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/67285/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2b8d8e22c41d8abd7de66aa9684b75255c02879afc80a96f49b9dc3df2c74262/nodejs/node/issues/67285
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2b8d8e22c41d8abd7de66aa9684b75255c02879afc80a96f49b9dc3df2c74262/nodejs/node/issues/67285
og:image:altVersion v26.13.0 (also v26.12.0 and main) Platform Linux ARCH 7.2.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 30 Oct 2026 14:32:40 +0000 x86_64 GNU/Linux Subsystem crypto What steps will reproduce the b...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamendossche
hostnamegithub.com
expected-hostnamegithub.com
None744d4381b1c4dbd6d8736c7d7e5bbe7dc11217584e457a3555020c631764e8ec
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedf859c48a4c8b4c0009c19bb4e82101aacb4b998
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/67285#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67285
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67285
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/67285
Reloadhttps://github.com/nodejs/node/issues/67285
Reloadhttps://github.com/nodejs/node/issues/67285
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues644 (644)https://github.com/nodejs/node/issues
Pull requests679 (679)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67285
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67285
#67408https://github.com/nodejs/node/pull/67408
crypto: X509Certificate returns "Bad time value" instead of throwing for an unreadable validity timehttps://github.com/nodejs/node/issues/67285#top
#67408https://github.com/nodejs/node/pull/67408
https://github.com/ndossche
ndosschehttps://github.com/ndossche
on Nov 5, 2026https://github.com/nodejs/node/issues/67285#issue-6233241229
fd3c87ehttps://github.com/nodejs/node/commit/fd3c87ed430b0201ce8d59e975dff2b69a995c53
#63265https://github.com/nodejs/node/issues/63265
https://github.com/panva
panvahttps://github.com/panva
on Nov 6, 2026https://github.com/nodejs/node/issues/67285#issuecomment-6681829983
current X.509 serieshttps://github.com/nodejs/node/pull/67245
April 2027https://github.com/nodejs/Release#release-schedule
https://github.com/panva
panvahttps://github.com/panva
on Nov 6, 2026https://github.com/nodejs/node/issues/67285#issuecomment-6682893327
@pimterryhttps://github.com/pimterry
https://github.com/panva
panvahttps://github.com/panva
on Nov 11, 2026https://github.com/nodejs/node/issues/67285#issuecomment-6795557263
#67406https://github.com/nodejs/node/pull/67406
#67408https://github.com/nodejs/node/pull/67408
nodejs-github-bothttps://github.com/nodejs-github-bot
on Nov 13, 2026https://github.com/nodejs/node/issues/67285#event-36012540267
doc: document invalid X509Certificate validity timeshttps://github.com/nodejs/node/commit/11d74515f2b571a3a6d70a5ff77ff8f143021e1d
11d7451https://github.com/nodejs/node/commit/11d74515f2b571a3a6d70a5ff77ff8f143021e1d
panvahttps://github.com/panva
on Nov 13, 2026https://github.com/nodejs/node/issues/67285#event-36012946224
crypto: stop swallowing X.509 operation errorshttps://github.com/panva/node/commit/a6993af46fb4bc29b5ca495b067cac16764ad0ec
a6993afhttps://github.com/panva/node/commit/a6993af46fb4bc29b5ca495b067cac16764ad0ec
crypto: throw on X509Certificate operation errorshttps://github.com/panva/node/commit/6877d2ddd9fb2bbc6bb67d02d8f2cd8155758fb4
6877d2dhttps://github.com/panva/node/commit/6877d2ddd9fb2bbc6bb67d02d8f2cd8155758fb4
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#67408https://github.com/nodejs/node/pull/67408
on Nov 14, 2026https://github.com/nodejs/node/issues/67285#event-36141679705
aphrody-devhttps://github.com/aphrody-dev
on Nov 14, 2026https://github.com/nodejs/node/issues/67285#event-36142049236
crypto: throw on X509Certificate operation errorshttps://github.com/aphrody-labs/node/commit/bd08ba304ea8cb7f5f3e8fcc9c5bfedd14c9ed34
bd08ba3https://github.com/aphrody-labs/node/commit/bd08ba304ea8cb7f5f3e8fcc9c5bfedd14c9ed34
aduh95https://github.com/aduh95
on Nov 16, 2026https://github.com/nodejs/node/issues/67285#event-36262032683
doc: document invalid X509Certificate validity timeshttps://github.com/nodejs/node/commit/136ae6f518be51145f80ef9081467ee6838f0937
136ae6fhttps://github.com/nodejs/node/commit/136ae6f518be51145f80ef9081467ee6838f0937
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/67285
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67285
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.