mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-10 06:11:08 +01:00
Fix existing test for decrypting with missing hardware key
This commit is contained in:
parent
a1af39a4f7
commit
2b060a1273
4 changed files with 28 additions and 23 deletions
|
|
@ -38,7 +38,6 @@ class YubikeyDataDecryptorFactory(
|
|||
|
||||
@JvmStatic val LOGGER = LoggerFactory.getLogger(YubikeyDataDecryptorFactory::class.java)
|
||||
|
||||
val ADMIN_PIN: CharArray = "12345678".toCharArray()
|
||||
val USER_PIN: CharArray = "123456".toCharArray()
|
||||
|
||||
@JvmStatic
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ package org.pgpainless.yubikey
|
|||
import com.yubico.yubikit.openpgp.KeyRef
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.pgpainless.PGPainless
|
||||
import org.pgpainless.decryption_verification.ConsumerOptions
|
||||
import org.pgpainless.key.protection.SecretKeyRingProtector
|
||||
import org.pgpainless.util.Passphrase
|
||||
|
|
@ -107,6 +108,9 @@ class YubikeyDecryptionTest : YubikeyTest() {
|
|||
"=XVu4\n" +
|
||||
"-----END PGP MESSAGE-----"
|
||||
|
||||
override val api: PGPainless
|
||||
get() = PGPainless()
|
||||
|
||||
@Test
|
||||
fun decryptMessageWithYubikey() {
|
||||
val key = api.readKey().parseKey(KEY)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ package org.pgpainless.yubikey
|
|||
import org.gnupg.GnuPGDummyKeyUtil
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Assumptions.assumeTrue
|
||||
import org.junit.jupiter.api.Disabled
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class YubikeyHardwareTokenBackendTest : YubikeyTest() {
|
||||
|
|
@ -21,6 +22,7 @@ class YubikeyHardwareTokenBackendTest : YubikeyTest() {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Disabled("because yubikit-android 2.9.0 cannot extract fingerprints")
|
||||
fun testListKeys() {
|
||||
val keys = backend.listKeyFingerprints()
|
||||
assumeTrue(keys.isNotEmpty())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue