1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-16 01:12:05 +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 b1bc13ffd1
commit e8b44f7438

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