]> err.no Git - yubikey-personalization/commitdiff
only need aes key for SLOT_CONFIG and SLOT_CONFIG2
authorKlas Lindfors <klas@yubico.com>
Tue, 27 Mar 2012 11:49:36 +0000 (13:49 +0200)
committerKlas Lindfors <klas@yubico.com>
Tue, 27 Mar 2012 11:49:36 +0000 (13:49 +0200)
ykpersonalize.c

index c60e82688504b9bc97312caa6112d167e4fdcd59..ef24ebca7a1667e2dd29039ea532ebc8140b9cef 100644 (file)
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
        if (inf) {
                if (!ykp_read_config(cfg, reader, inf))
                        goto err;
-       } else if (! aesviahash) {
+       } else if (! aesviahash && (ykp_command(cfg) == SLOT_CONFIG || ykp_command(cfg) == SLOT_CONFIG2)) {
                char passphrasebuf[256]; size_t passphraselen;
                fprintf(stderr, "Passphrase to create AES key: ");
                fflush(stderr);