GPG 智能卡获取公共子密钥时出错

Tre*_*ent 5 smartcard gnupg openpgp

我正在尝试使用 YubiKey 设置 OpenPGP 智能卡。
这是一个 YubiKey 4,所以理论上应该接受 4096 位的密钥,但我使用的是 2048 位的子密钥。

我有一个主密钥(仅设置为证书)和三个子密钥(签名、加密、身份验证),我已将其复制到 YubiKey。

我已将公钥上传到我的网站,并在智能卡中设置了公钥的 URL。

当我尝试使用 fetch 时,我收到一个错误,因为卡寻找错误的公钥。示例(使用 Windows 和 GPGWin):

Keys: 
11111111 - Master Key
22222222 - Signing sub
33333333 - Encrypt sub
44444444 - Auth sub

C:\gpg> gpg2 --card-status
...
URL of public key: https://my.server/pgp.key
...
General key info:  pub 2048/22222222 2016-01-09 Me <me@my.server>
sec# 4096R/11111111  created: 2016-01-09
ssb> 2048R/22222222  created: 2016-01-09
                     card-no: 0006 12345678
ssb> 2048R/33333333  created: 2016-01-09
                     card-no  0006 12345678
ssb> 2048R/44444444  created: 2016-01-09
                     card-no  0006 12345678
Run Code Online (Sandbox Code Playgroud)

然后尝试从智能卡获取:

 C:\gpg> gpg2 --card-edit
 gpg> admin
 Admin commands are allowed
 gpg> fetch
 gpg: requesting key 22222222 from https server my.server
 gpg: no valid OpenPGP data found.
 gpg: Total number processed: 0
 gpg: keyserver communications error: keyserver helper internal error
 gpg: keyserver communications error: General Error
Run Code Online (Sandbox Code Playgroud)

当我运行时gpg -a --export 11111111 > pgp.key,生成的公钥与您一样--export 22222222(我认为这是子键的预期行为),所以我不清楚它为什么要寻找另一个键。

我已经尝试在带和不带装甲的情况下导出密钥,并确认文件的所有权设置为www-data:www-data我服务器的/var/web.

任何进一步的建议将不胜感激。