gpg --with-colon returns ????-??-??作为到期日期。 Linux 千年虫问题?

gpg --with-colon returns ????-??-?? as the expiration date. Linux Y2K issue?

gpg --with-colon 报告失效日期(尽管密钥可用于加密)参见“[expires: ????-??-??]”

gpg --with-colon key.ascii
pub:-:1024:17:77A54749D56561D6:2016-06-10:????-??-??::-:AAA AAA <AAA@somewhere.com>:
sub:-:2048:16:44479A86F9DB1538:2016-06-10:????-??-??::: [expires: ????-??-??]

当我 运行 --list-packets 我可以看到到期时间设置为未来 27 年:

gpg --list-packets key.ascii
...
        hashed subpkt 2 len 4 (sig created 2016-06-10)
        hashed subpkt 9 len 4 (key expires after 27y145d0h0m)

是否意味着gpg在处理2016-06-10 + 27y145d时有错误?

是否可以安全地假设日期 virtually 永不过期并假设它没有过期,因为 --with-colons 参数中的第二列是 '-' 而不是'e'(有关 --with-colons 输出的详细信息,请参阅 https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS

实际上这是 Linux y2k 问题。即使在 Windows 版本的 gpg 上。看到这个:

gpg --gen-key
...
Key is valid for? (0) 50y
Key expires at ????-??-??
Your system can't display dates beyond 2038.
However, it will be correctly handled up to 2106.
Is this correct? (y/N)

是的。请注意,当您设置过期 beyond 2038 时,它会影响 gpg 显示的过期日期以及 gpg 列出的任何依赖正确过期日期的软件。

编辑:使用gpg --with-colon --fixed-list-mode将纪元时间打印为整数,您可以处理到 2106 年。