2019-04-03 04:49:55 +00:00
|
|
|
"""
|
|
|
|
card_test_kdf_single.py - test KDF data object
|
|
|
|
|
|
|
|
Copyright (C) 2018, 2019 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 card_const import *
|
|
|
|
from constants_for_test import *
|
|
|
|
|
|
|
|
class Test_Card_KDF_Single(object):
|
|
|
|
def test_verify_pw3(self, card):
|
|
|
|
v = card.verify(3, FACTORY_PASSPHRASE_PW3)
|
|
|
|
assert v
|
|
|
|
|
|
|
|
def test_kdf_put_single(self, card):
|
2021-11-02 07:15:35 +00:00
|
|
|
r = card.configure_kdf(KDF_SINGLE)
|
2019-04-03 04:49:55 +00:00
|
|
|
assert r
|