File tree Expand file tree Collapse file tree
FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,19 +28,19 @@ import org.pgpainless.policy.Policy
2828import org.pgpainless.policy.Policy.HashAlgorithmPolicy
2929import org.pgpainless.util.Passphrase
3030
31- @Ignore(" fix me" )
3231class PgpKeyTest {
3332 companion object {
3433 @Suppress(" SameParameterValue" )
3534 private fun loadSecretKey (keyFile : String ): PGPSecretKeyRing ? {
36- return PGPainless .getInstance().generateKey()
37- .simpleEcKeyRing(TestUtil .readResourceAsString(" pgp/keys/$keyFile " )).pgpSecretKeyRing
35+ return PGPainless .getInstance().readKey().parseKey(
36+ (TestUtil .readResourceAsString(" pgp/keys/$keyFile " ))
37+ ).pgpSecretKeyRing
3838 }
3939
4040 @Suppress(" SameParameterValue" )
4141 private fun loadPublicKey (keyFile : String ): PGPPublicKeyRing ? {
42- return PGPainless .getInstance().generateKey ()
43- .simpleEcKeyRing( TestUtil .readResourceAsString(" pgp/keys/$keyFile " )).pgpPublicKeyRing
42+ return PGPainless .getInstance().readKey ()
43+ .parseCertificate(( TestUtil .readResourceAsString(" pgp/keys/$keyFile " ) )).pgpPublicKeyRing
4444 }
4545 }
4646
@@ -150,6 +150,7 @@ class PgpKeyTest {
150150 }
151151
152152 @Test
153+ @Ignore(" temporary disabled due to https://github.com/pgpainless/pgpainless/issues/488" )
153154 fun testPublicKey_Issue1358 () {
154155 val keyText = TestUtil .readResourceAsString(" pgp/keys/issue-1358.public.gpg-key" )
155156 val actual = PgpKey .parseKeys(source = keyText)
You can’t perform that action at this time.
0 commit comments