mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 19:08:00 +01:00
SOP KeyReader: wrap IOException in BadData
This commit is contained in:
parent
5bdd4f6ad0
commit
68886613a6
1 changed files with 3 additions and 2 deletions
|
@ -31,7 +31,7 @@ class KeyReader {
|
|||
}
|
||||
throw e;
|
||||
} catch (PGPException e) {
|
||||
throw new IOException("Cannot read keys.", e);
|
||||
throw new SOPGPException.BadData("Cannot read keys.", e);
|
||||
}
|
||||
|
||||
if (requireContent && (keys == null || keys.size() == 0)) {
|
||||
|
@ -41,7 +41,8 @@ class KeyReader {
|
|||
return keys;
|
||||
}
|
||||
|
||||
static PGPPublicKeyRingCollection readPublicKeys(InputStream certIn, boolean requireContent) throws IOException {
|
||||
static PGPPublicKeyRingCollection readPublicKeys(InputStream certIn, boolean requireContent)
|
||||
throws IOException {
|
||||
PGPPublicKeyRingCollection certs;
|
||||
try {
|
||||
certs = PGPainless.readKeyRing().publicKeyRingCollection(certIn);
|
||||
|
|
Loading…
Reference in a new issue