Skip to content

Query trusted web servers for time #78

@fhunleth

Description

@fhunleth

It's possible to set the time by using the Date header in HTTPS requests. While this won't be near as accurate as NTP, it should be plenty good for TLS certificate expiration checks.

See the following links for examples of this method:

  1. sdwdate
  2. secure-time-date

The second link is basically a curl command and a regex to extract the date field:

$ curl -sI --tlsv1.2 -s https://nerves-project.org
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Tue, 04 Aug 2020 10:59:08 GMT
access-control-allow-origin: *
etag: "5f293f7c-ea"
expires: Thu, 07 Jan 2021 08:24:26 GMT
cache-control: max-age=600
accept-ranges: bytes
date: Thu, 07 Jan 2021 13:13:57 GMT
age: 0
content-length: 234

This feature would be intended as an alternative to using NTP, so #77 would be nice to have first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions