New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: getTSEnd() and getTSStart() return wrong timestamps #5507

bjoe2k4 opened this Issue Jul 8, 2017 · 3 comments


None yet
4 participants

bjoe2k4 commented Jul 8, 2017

  • Program: dnsdist
  • Issue type: Bug report

Short description

getTSEnd() and getTSStart() are supposed to return unix timestamps of the start- and end-date of the dnscrypt certificates, but the values are wrong.


  • Operating system: Archlinux
  • Software version: dnsdist 0.0.g6c3281444
  • Software source: dnsdist-git from AUR

Steps to reproduce

  1. Setup dnsdist with dnscrypt and certificates in place, according to the docs
  2. Run the following commands on the console:
> showDNSCryptBinds()
#   Address              Provider Name        Serial   Validity              P. Serial P. Validity
0   [::1]:8443           2.dnscrypt-cert.loca 12       2017-07-08 23:14:41   11        2017-07-08 22:37:48

> getDNSCryptBind(0):getCurrentCertificate():getSerial()

> getDNSCryptBind(0):getOldCertificate():getSerial()

So let's check the

Expected behaviour

> getDNSCryptBind(0):getCurrentCertificate():getTSEnd()

> getDNSCryptBind(0):getOldCertificate():getTSEnd()

Actual behaviour

> getDNSCryptBind(0):getCurrentCertificate():getTSEnd()

> getDNSCryptBind(0):getOldCertificate():getTSEnd()

This comment has been minimized.


zeha commented Jul 8, 2017

Looking at the code, the values are unix timestamps, but in network byte order.


This comment has been minimized.


Habbie commented Jul 8, 2017

Looking at the values in the ticket, this theory holds up :)


This comment has been minimized.

bjoe2k4 commented Jul 8, 2017

I am certainly no expert, but wouldn't it be more practical to be able to interact with lua's os.time() directly? If not, how to convert the values in lua?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment