mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-20 02:40:08 +00:00
configure: When no kdf_do variable, default is "required".
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
af75bea08f
commit
3dfc9d0fe3
3
src/configure
vendored
3
src/configure
vendored
@ -45,7 +45,7 @@ certdo=no
|
||||
factory_reset=no
|
||||
ackbtn_support=yes
|
||||
flash_override=""
|
||||
kdf_do=${kdf_do:-optional}
|
||||
kdf_do=${kdf_do:-required}
|
||||
# For emulation
|
||||
prefix=/usr/local
|
||||
exec_prefix='${prefix}'
|
||||
@ -208,7 +208,6 @@ if test "$target" = "GNU_LINUX"; then
|
||||
emulation="yes"
|
||||
cross=""
|
||||
mcu="none"
|
||||
kdf_do=${kdf_do:-required}
|
||||
def_emulation="-DGNU_LINUX_EMULATION"
|
||||
def_memory_size="-DMEMORY_SIZE=1024"
|
||||
enable_hexoutput=""
|
||||
|
@ -1,2 +1,2 @@
|
||||
from skip_gnuk_only_tests import *
|
||||
from card_test_personalize_reset import *
|
||||
from card_test_remove_keys import *
|
||||
|
@ -1,2 +1,2 @@
|
||||
from skip_gnuk_only_tests import *
|
||||
from card_test_remove_keys import *
|
||||
from card_test_personalize_admin_less_3 import *
|
||||
|
@ -1,2 +1,2 @@
|
||||
from skip_gnuk_only_tests import *
|
||||
from card_test_reset_pw3 import *
|
||||
from card_test_personalize_reset import *
|
||||
|
2
tests/030_kdfsingle/test_077_adminless_kdfsingle.py
Normal file
2
tests/030_kdfsingle/test_077_adminless_kdfsingle.py
Normal file
@ -0,0 +1,2 @@
|
||||
from skip_gnuk_only_tests import *
|
||||
from card_test_reset_pw3 import *
|
48
tests/card_test_personalize_admin_less_3.py
Normal file
48
tests/card_test_personalize_admin_less_3.py
Normal file
@ -0,0 +1,48 @@
|
||||
"""
|
||||
card_test_personalize_admin_less_3.py - test admin-less mode
|
||||
|
||||
Copyright (C) 2022 g10 Code GmbH
|
||||
Author: NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
This file is a part of Gnuk, a GnuPG USB Token implementation.
|
||||
|
||||
Gnuk is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Gnuk is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from struct import pack
|
||||
from re import match, DOTALL
|
||||
from util import *
|
||||
from card_const import *
|
||||
from constants_for_test import *
|
||||
|
||||
class Test_Card_Personalize_Adminless_SECOND(object):
|
||||
# Being removed keys, it's now in admin-full mode (both of Gnuk 1 and 2)
|
||||
|
||||
def test_setup_pw3_1(self, card):
|
||||
if card.is_gnuk2:
|
||||
r = card.change_passwd(3, FACTORY_PASSPHRASE_PW3, PW3_TEST0)
|
||||
assert r
|
||||
else:
|
||||
pytest.skip("Gnuk 1 now in admin-full mode, with PW3_TEST0")
|
||||
|
||||
def test_verify_pw3_1(self, card):
|
||||
if card.is_gnuk2:
|
||||
r = card.verify(3, PW3_TEST0)
|
||||
assert r
|
||||
else:
|
||||
pytest.skip("Gnuk 1, it's authenticated already")
|
||||
|
||||
def test_reset_userpass_admin(self, card):
|
||||
r = card.reset_passwd_by_admin(PW1_TEST4)
|
||||
assert r
|
Loading…
Reference in New Issue
Block a user