1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-05 03:41:07 +01:00

Remove old, commented-out code and add TODOs

This commit is contained in:
Paul Schaub 2025-12-04 12:36:43 +01:00
parent 2b060a1273
commit bb796a6819
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 2 additions and 19 deletions

View file

@ -122,9 +122,6 @@ class YubikeyDecryptionTest : YubikeyTest() {
val hardwareBasedKey = helper.moveToYubikey(decKey.unlock(), yubikey, adminPin, KeyRef.DEC)
// Decrypt
// TODO: Make hardware decryption transparent as shown below!
val decIn =
api.processMessage()
.onInputStream(msgIn)
@ -138,21 +135,5 @@ class YubikeyDecryptionTest : YubikeyTest() {
val msg = decIn.readAllBytes()
decIn.close()
assertEquals("Hello, World!\n", String(msg))
/*
yubikey.device.openConnection(SmartCardConnection::class.java).use {
val decFac = YubikeyDataDecryptorFactory.createDecryptorFromConnection(it, decKey.pgpPublicKey)
val decIn = api.processMessage()
.onInputStream(msgIn)
.withOptions(
ConsumerOptions.get(api)
.addCustomDecryptorFactory(decFac)
)
val msg = decIn.readAllBytes()
decIn.close()
assertEquals("Hello, World!\n", String(msg))
}
*/
}
}

View file

@ -18,6 +18,8 @@ class YubikeyKeyGeneratorTest : YubikeyTest() {
val key = keyGen.generateModernKey(yubikey, adminPin, OpenPGPKeyVersion.v4, Date())
println(key.toAsciiArmoredString())
// TODO: More thorough checking once key generation is implemented with binding signatures,
// userids and other metadata
for (subkey in key.secretKeys) {
assertTrue(subkey.value.hasExternalSecretKey())
}