fuhry / initramfs-scencrypt

Arch Linux initramfs hook for smartcard support for LUKS full-disk encryption
MIT License
97 stars 18 forks source link

Fix regexp issue when determining keyid used to encrypt the key file #5

Closed s0crat closed 6 years ago

s0crat commented 7 years ago

Hi,

The current output of the command gpg --list-packets --list-only disk.bin.gpg differes from previous versions of GPG packaged in Arch.

Current output:

$ gpg --list-packets --list-only plop.gpg
# off=0 ctb=85 tag=1 hlen=3 plen=268
:pubkey enc packet: version 3, algo 1, keyid 02927E70ED932BAE
    data: [2047 bits]

# off=271 ctb=d2 tag=18 hlen=2 plen=120 new-ctb
:encrypted data packet:
    length: 120
    mdc_method: 2

The result is that during the installation of the hook, the keyid used to encrypt the key file isn't grabbed and the public keys not imported.

This pull request simplifies and corrects the regexp used to grab the keyid

Pierre.

fuhry commented 6 years ago

Fixed in recent releases