Remove code to manually throw NSEE for missing certs

This is now done further down in the store itself
This commit is contained in:
Paul Schaub 2022-09-01 13:29:53 +02:00
parent b1bc13ffd1
commit e8b44f7438
1 changed files with 0 additions and 5 deletions

View File

@ -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);