mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-18 02:12:06 +01:00
Depend on pgp-certificate-store again
This commit is contained in:
parent
d486a17cf1
commit
6dc5b84d66
2 changed files with 7 additions and 6 deletions
|
@ -32,8 +32,8 @@ import org.pgpainless.key.SubkeyIdentifier;
|
||||||
import org.pgpainless.key.info.KeyAccessor;
|
import org.pgpainless.key.info.KeyAccessor;
|
||||||
import org.pgpainless.key.info.KeyRingInfo;
|
import org.pgpainless.key.info.KeyRingInfo;
|
||||||
import org.pgpainless.util.Passphrase;
|
import org.pgpainless.util.Passphrase;
|
||||||
import pgp.certificate_store.Certificate;
|
import pgp.certificate_store.PGPCertificateStore;
|
||||||
import pgp.certificate_store.CertificateStore;
|
import pgp.certificate_store.certificate.Certificate;
|
||||||
import pgp.certificate_store.exception.BadDataException;
|
import pgp.certificate_store.exception.BadDataException;
|
||||||
import pgp.certificate_store.exception.BadNameException;
|
import pgp.certificate_store.exception.BadNameException;
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ public class EncryptionOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a recipient by providing a {@link CertificateStore} and the {@link OpenPgpFingerprint} of the recipients key.
|
* Add a recipient by providing a {@link PGPCertificateStore} and the {@link OpenPgpFingerprint} of the recipients key.
|
||||||
* If no such certificate is found in the store, a {@link NoSuchElementException is thrown}.
|
* If no such certificate is found in the store, a {@link NoSuchElementException is thrown}.
|
||||||
*
|
*
|
||||||
* @param certificateStore certificate store
|
* @param certificateStore certificate store
|
||||||
|
@ -253,7 +253,7 @@ public class EncryptionOptions {
|
||||||
* @throws IOException in case of an IO error
|
* @throws IOException in case of an IO error
|
||||||
* @throws NoSuchElementException if the store does not contain a certificate for the given fingerprint
|
* @throws NoSuchElementException if the store does not contain a certificate for the given fingerprint
|
||||||
*/
|
*/
|
||||||
public EncryptionOptions addRecipient(@Nonnull CertificateStore certificateStore,
|
public EncryptionOptions addRecipient(@Nonnull PGPCertificateStore certificateStore,
|
||||||
@Nonnull OpenPgpFingerprint certificateFingerprint)
|
@Nonnull OpenPgpFingerprint certificateFingerprint)
|
||||||
throws BadDataException, BadNameException, IOException {
|
throws BadDataException, BadNameException, IOException {
|
||||||
String fingerprint = certificateFingerprint.toString().toLowerCase();
|
String fingerprint = certificateFingerprint.toString().toLowerCase();
|
||||||
|
@ -261,7 +261,8 @@ public class EncryptionOptions {
|
||||||
if (certificateRecord == null) {
|
if (certificateRecord == null) {
|
||||||
throw new NoSuchElementException("Cannot find certificate '" + certificateFingerprint + "'");
|
throw new NoSuchElementException("Cannot find certificate '" + certificateFingerprint + "'");
|
||||||
}
|
}
|
||||||
PGPPublicKeyRing recipientCertificate = PGPainless.readKeyRing().publicKeyRing(certificateRecord.getInputStream());
|
PGPPublicKeyRing recipientCertificate = PGPainless.readKeyRing()
|
||||||
|
.publicKeyRing(certificateRecord.getInputStream());
|
||||||
return addRecipient(recipientCertificate);
|
return addRecipient(recipientCertificate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ allprojects {
|
||||||
junitVersion = '5.8.2'
|
junitVersion = '5.8.2'
|
||||||
logbackVersion = '1.2.11'
|
logbackVersion = '1.2.11'
|
||||||
mockitoVersion = '4.5.1'
|
mockitoVersion = '4.5.1'
|
||||||
pgpCertificateStoreVersion = '0.1.1'
|
pgpCertificateStoreVersion = '0.1.2-SNAPSHOT'
|
||||||
slf4jVersion = '1.7.36'
|
slf4jVersion = '1.7.36'
|
||||||
sopJavaVersion = '4.0.7'
|
sopJavaVersion = '4.0.7'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue