Fix the previous commit.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2022-07-06 15:09:44 +09:00
parent 3dfc9d0fe3
commit 67b9af936f
5 changed files with 3 additions and 53 deletions

View File

@ -1,2 +1,2 @@
from skip_gnuk_only_tests import * from skip_gnuk_only_tests import *
from card_test_remove_keys import * from card_test_personalize_reset import *

View File

@ -1,2 +1,2 @@
from skip_gnuk_only_tests import * from skip_gnuk_only_tests import *
from card_test_personalize_admin_less_3 import * from card_test_remove_keys import *

View File

@ -1,2 +1,2 @@
from skip_gnuk_only_tests import * from skip_gnuk_only_tests import *
from card_test_personalize_reset import * from card_test_reset_pw3 import *

View File

@ -1,2 +0,0 @@
from skip_gnuk_only_tests import *
from card_test_reset_pw3 import *

View File

@ -1,48 +0,0 @@
"""
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