diff -Nru yubikey-luks-0.3.2/debian/changelog yubikey-luks-0.3.3/debian/changelog --- yubikey-luks-0.3.2/debian/changelog 2014-07-22 21:43:12.000000000 +0000 +++ yubikey-luks-0.3.3/debian/changelog 2014-07-22 21:43:13.000000000 +0000 @@ -1,3 +1,10 @@ +yubikey-luks (0.3.3-1) trusty; uegency=low + + * added option, to clear the slot, so that an empty slot will also work + + -- Cornelius Kölbel Tue, 22 Jul 2014 21:46:00 +0200 + + yubikey-luks (0.3.2-1) trusty; uegency=low * added parameters for slot and partition. diff -Nru yubikey-luks-0.3.2/Makefile yubikey-luks-0.3.3/Makefile --- yubikey-luks-0.3.2/Makefile 2014-07-22 19:22:10.000000000 +0000 +++ yubikey-luks-0.3.3/Makefile 2014-07-22 21:41:43.000000000 +0000 @@ -3,7 +3,7 @@ @echo "ppa-dev - upload to ppa launchpad. Development" @echo "ppa - upload to ppa launchpad. Stable" -VERSION=0.3.2 +VERSION=0.3.3 SRC_DIR = yubikey_luks.orig debianize: diff -Nru yubikey-luks-0.3.2/yubiky-luks-enroll yubikey-luks-0.3.3/yubiky-luks-enroll --- yubikey-luks-0.3.2/yubiky-luks-enroll 2014-07-22 19:22:13.000000000 +0000 +++ yubikey-luks-0.3.3/yubiky-luks-enroll 2014-07-22 21:41:43.000000000 +0000 @@ -1,12 +1,13 @@ #!/bin/sh SLOT=7 DISK="/dev/sda3" +CLEAR_SLOT=0 TMP_FILE=/tmp/new_key set -e -while getopts ":s:d:h" opt; do +while getopts ":s:d:hc" opt; do case $opt in s) SLOT=$OPTARG @@ -16,10 +17,14 @@ DISK=$OPTARG echo "setting disk to $OPTARG." ;; + c) CLEAR_SLOT=1 + echo "clearing slot" + ;; h) echo - echo " -d : set the partition" - echo " -s : set the slot" + echo " -d : set the partition" + echo " -s : set the slot" + echo " -c : clear the slot prior to writing" echo exit 1 ;; @@ -29,9 +34,10 @@ esac done - -echo "Killing LUKS slot $SLOT" -cryptsetup luksKillSlot $DISK $SLOT +if [ $CLEAR_SLOT -eq 1 ]; then + echo "Killing LUKS slot $SLOT" + cryptsetup luksKillSlot $DISK $SLOT +fi echo "Adding yubikey to initrd" P1=$(/lib/cryptsetup/askpass "Please insert a yubikey and enter a new password:") P2=$(/lib/cryptsetup/askpass "again:") Binary files /tmp/kaEqEImEBr/yubikey-luks-0.3.2/yubiky-luks-enroll.zip and /tmp/bcmWapl4bJ/yubikey-luks-0.3.3/yubiky-luks-enroll.zip differ