mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-11 11:19:39 +02:00
Progress on SOP04 support
This commit is contained in:
parent
3f16c54867
commit
2d60650cc6
5 changed files with 131 additions and 19 deletions
|
@ -42,7 +42,13 @@ public final class ClearsignedMessageUtil {
|
|||
public static PGPSignatureList detachSignaturesFromInbandClearsignedMessage(InputStream clearsignedInputStream,
|
||||
OutputStream messageOutputStream)
|
||||
throws IOException, WrongConsumingMethodException {
|
||||
ArmoredInputStream in = ArmoredInputStreamFactory.get(clearsignedInputStream);
|
||||
ArmoredInputStream in;
|
||||
if (clearsignedInputStream instanceof ArmoredInputStream) {
|
||||
in = (ArmoredInputStream) clearsignedInputStream;
|
||||
} else {
|
||||
in = ArmoredInputStreamFactory.get(clearsignedInputStream);
|
||||
}
|
||||
|
||||
if (!in.isClearText()) {
|
||||
throw new WrongConsumingMethodException("Message is not using the Cleartext Signature Framework.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue