From a7929528455c5587b4e3064167970ba6aabeac10 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Thu, 1 Sep 2022 13:29:53 +0200 Subject: [PATCH] Remove code to manually throw NSEE for missing certs This is now done further down in the store itself --- .../org/pgpainless/encryption_signing/EncryptionOptions.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java index 8d7098d3..cf3b426a 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java +++ b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java @@ -258,11 +258,6 @@ public class EncryptionOptions { throws BadDataException, BadNameException, IOException { String fingerprint = certificateFingerprint.toString().toLowerCase(); Certificate certificateRecord = certificateStore.getCertificate(fingerprint); - // TODO: getCertificate throws NSEE automatically in 0.2.2+ - // Remove if statement below when bumping - if (certificateRecord == null) { - throw new NoSuchElementException("Cannot find certificate '" + certificateFingerprint + "'"); - } PGPPublicKeyRing recipientCertificate = PGPainless.readKeyRing() .publicKeyRing(certificateRecord.getInputStream()); return addRecipient(recipientCertificate);