mirror of
https://codeberg.org/PGPainless/wkd-java.git
synced 2024-11-23 07:42:06 +01:00
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:
parent
df2e4fb61e
commit
873ca84af8
3 changed files with 12 additions and 9 deletions
|
@ -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`
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue