1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 03:17:58 +01:00

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 43e0f43bd9
commit a792952845

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