Compare commits

..

No commits in common. "main" and "0.2.0" have entirely different histories.
main ... 0.2.0

4 changed files with 10 additions and 18 deletions

View file

@ -5,13 +5,6 @@ SPDX-License-Identifier: CC0-1.0
# Cert-D-PGPainless Changelog
## 0.2.2
- Bump `pgpainless-core` to `1.5.6`
- Bump `cert-d-java` to `0.2.2`
## 0.2.1
- Bump `pgpainless-core` to `1.3.12`
## 0.2.0
- `get`: Apply `toLowerCase()` to fingerprints
- Use BCs `PGPPublicKeyRing.join(first, second)` method to properly merge certificates

View file

@ -4,6 +4,7 @@
package pgp.cert_d.cli.commands;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPPublicKeyRing;
import org.bouncycastle.openpgp.PGPPublicKeyRingCollection;
import org.pgpainless.PGPainless;
@ -45,6 +46,9 @@ public class Import implements Runnable {
} catch (BadDataException e) {
LOGGER.error("Certificate contains bad data.", e);
System.exit(-1);
} catch (PGPException e) {
LOGGER.error("PGP Exception.", e);
System.exit(-1);
}
}
}

View file

@ -23,13 +23,8 @@ public class KeyMaterialReader implements KeyMaterialReaderBackend {
try {
keyMaterial = PGPainless.readKeyRing().keyRing(data);
} catch (IOException e) {
String msg = e.getMessage();
if (msg == null) {
throw e;
}
if (msg.contains("unknown object in stream") ||
msg.contains("unexpected end of file in armored stream.") ||
msg.contains("invalid header encountered")) {
if (e.getMessage().contains("unknown object in stream") ||
e.getMessage().contains("unexpected end of file in armored stream.")) {
throw new BadDataException();
} else {
throw e;

View file

@ -4,16 +4,16 @@
allprojects {
ext {
shortVersion = '0.2.3'
isSnapshot = true
shortVersion = '0.2.0'
isSnapshot = false
minAndroidSdk = 10
javaSourceCompatibility = 1.8
slf4jVersion = '1.7.36'
logbackVersion = '1.2.11'
junitVersion = '5.8.2'
mockitoVersion = '4.5.1'
pgpainlessVersion = '1.5.6'
pgpCertDJavaVersion = '0.2.2'
pgpainlessVersion = '1.3.5'
pgpCertDJavaVersion = '0.2.1'
picocliVersion = '4.6.3'
}
}