本文介绍了gpg --with-colon返回????-??-??作为到期日期. Linux Y2K问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gpg --with-冒号报告了错误的到期日期(尽管密钥可用于加密),请参阅"[到期:????-??-??]"

The gpg --with-colon reports bad expiration date (although the key is usable for encryption) See "[expires: ????-??-??]"

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

当我运行--list-packets时,我可以看到过期期限设置为27年:

When I run --list-packets I can see that the expiration is set to 27 years in future:

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时存在错误?

Does it mean that gpg has a bug in handling 2016-06-10 + 27y145d?

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

Is it safe to assume that the date virtually never expires and assume it did not expire because the second column in the --with-colons argument is '-' and not 'e' (see https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS for the details of --with-colons output)

推荐答案

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

Actually it IS Linux y2k issue. Even on Windows version of gpg. See this:

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)

是的.请注意,当您将到期时间设置为超过时,它将影响gpg显示的到期日期,并且任何依赖于正确到期日期的软件都会被gpg列出.

Yeap. Be aware that when you set expiration beyond 2038 it will impact gpg displaying expiration date and any software that relies on a proper expiration date being listed by gpg.

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

EDIT: Use gpg --with-colon --fixed-list-mode to print epoch time as an integer, which you can handle until 2106.

这篇关于gpg --with-colon返回????-??-??作为到期日期. Linux Y2K问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 17:27