Bump PGPainless dependencies

Bump pgpainless-core to 1.5.6
Bump cert-d-pgpainless to 0.2.2
Bump cert-d-java to 0.2.2
This commit is contained in:
Paul Schaub 2023-07-07 12:34:16 +02:00
parent df2e4fb61e
commit 873ca84af8
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 12 additions and 9 deletions

View file

@ -7,9 +7,9 @@ SPDX-License-Identifier: Apache-2.0
# Changelog
## 0.1.2-SNAPSHOT
- Bump `pgpainless-core` to `1.13.2`
- Bump `cert-d-pgpainless` to `0.2.1`
- Bump `cert-d-java` to `0.2.1`
- Bump `pgpainless-core` to `1.5.6`
- Bump `cert-d-pgpainless` to `0.2.2`
- Bump `cert-d-java` to `0.2.2`
## 0.1.1
- Bump `pgpainless-core` to `1.2.1`

View file

@ -16,10 +16,10 @@ allprojects {
slf4jVersion = '1.7.36'
logbackVersion = '1.2.11'
mockitoVersion = '4.5.1'
pgpainlessVersion = '1.3.12'
pgpainlessCertDVersion = '0.2.1'
pgpainlessVersion = '1.5.6'
pgpainlessCertDVersion = '0.2.2'
picocliVersion = '4.6.3'
certDJavaVersion = '0.2.1'
certDJavaVersion = '0.2.2'
zbase32Version = '1.0.0'
}
}

View file

@ -6,9 +6,9 @@ package pgp.wkd.cli;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPPublicKeyRing;
import org.bouncycastle.openpgp.PGPPublicKeyRingCollection;
import org.pgpainless.PGPainless;
import org.pgpainless.certificate_store.CertificateFactory;
import org.pgpainless.key.collection.PGPKeyRingCollection;
import org.pgpainless.key.info.KeyRingInfo;
import pgp.certificate_store.certificate.Certificate;
import pgp.wkd.CertificateAndUserIds;
@ -24,8 +24,11 @@ public class PGPainlessCertificateParser implements CertificateParser {
public List<CertificateAndUserIds> read(InputStream inputStream) throws IOException {
List<CertificateAndUserIds> certificatesAndUserIds = new ArrayList<>();
try {
PGPPublicKeyRingCollection certificates = PGPainless.readKeyRing().publicKeyRingCollection(inputStream);
for (PGPPublicKeyRing certificate : certificates) {
PGPKeyRingCollection keyMaterial = PGPainless.readKeyRing().keyRingCollection(inputStream, true);
if (keyMaterial.getPGPSecretKeyRingCollection().size() != 0) {
throw new PGPException("Secret key material encountered!");
}
for (PGPPublicKeyRing certificate : keyMaterial.getPgpPublicKeyRingCollection()) {
KeyRingInfo info = PGPainless.inspectKeyRing(certificate);
Certificate parsedCert = CertificateFactory.certificateFromPublicKeyRing(certificate, 0L);
List<String> userIds = info.getValidAndExpiredUserIds();