Adding tests for OpenPGP.
All tests are taken from gnuk. Reader is migrated from pyusb to pyscard. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
test_011_adminfull_kdffull.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_test_kdf_full import *
|
||||
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
test_011_adminfull_kdffull.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_test_personalize_card_1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_rsa2k import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_nistp256r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_brainpoolp256r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_secp256k1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_nistp384r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_brainpoolp384r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_nistp521r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_brainpoolp512r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_curve25519 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_kg_pko_dsc_rsa2k import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_nistp256r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_kg_pko_dsc_brainpoolp256r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_kg_pko_dsc_secp256k1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_kg_pko_dsc_nistp384r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_kg_pko_dsc_brainpoolp384r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_kg_pko_dsc_nistp521r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_kg_pko_dsc_brainpoolp512r1 import *
|
||||
@@ -0,0 +1 @@
|
||||
from card_test_ki_pko_dsc_curve25519 import *
|
||||
15
tests/020_kdffull/05_finalize/test_000_reset_to_TEST4.py
Normal file
15
tests/020_kdffull/05_finalize/test_000_reset_to_TEST4.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import pytest
|
||||
from card_const import *
|
||||
from constants_for_test import *
|
||||
|
||||
def test_setup_pw1_4(card):
|
||||
r = card.change_passwd(1, FACTORY_PASSPHRASE_PW1, PW1_TEST4)
|
||||
assert r
|
||||
|
||||
def test_verify_pw1_4(card):
|
||||
v = card.verify(1, PW1_TEST4)
|
||||
assert v
|
||||
|
||||
def test_verify_pw1_4_2(card):
|
||||
v = card.verify(2, PW1_TEST4)
|
||||
assert v
|
||||
23
tests/020_kdffull/05_finalize/test_057_adminfull_kdffull.py
Normal file
23
tests/020_kdffull/05_finalize/test_057_adminfull_kdffull.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
test_011_adminfull_kdffull.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_test_personalize_reset import *
|
||||
23
tests/020_kdffull/05_finalize/test_058_adminfull_kdffull.py
Normal file
23
tests/020_kdffull/05_finalize/test_058_adminfull_kdffull.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
test_011_adminfull_kdffull.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_test_remove_keys import *
|
||||
23
tests/020_kdffull/05_finalize/test_059_adminfull_kdffull.py
Normal file
23
tests/020_kdffull/05_finalize/test_059_adminfull_kdffull.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
test_011_adminfull_kdffull.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_test_reset_pw3 import *
|
||||
1
tests/020_kdffull/conftest.py
Normal file
1
tests/020_kdffull/conftest.py
Normal file
@@ -0,0 +1 @@
|
||||
from skip_if_no_kdf_support import *
|
||||
Reference in New Issue
Block a user